html body .opportunity-kanban__card .opportunity-kanban__title{font-size:12px!important;}
html body .opportunity-kanban__card .opportunity-kanban__assigned,html body .opportunity-kanban__card .opportunity-kanban__assigned a,html body .opportunity-kanban__card .opportunity-kanban__assigned span{font-size:10px!important;}
html body #opportunity-table .opportunity-kanban__quality{display:flex;align-items:center;gap:2px;color:#f5b400;}
html body #opportunity-table .opportunity-kanban__quality .onecup-quality-star{fill:currentColor!important;stroke:currentColor!important;width:12px!important;height:12px!important;}
@media(min-width:1200px){html body .onecup-desktop-kanban-menu{display:block!important;position:fixed!important;z-index:20000!important;margin:0!important;max-height:calc(100vh - 16px)!important;overflow-y:auto;background:#fff;border:1px solid #e0eeff;border-radius:3px;box-shadow:0 8px 24px rgba(24,26,85,.14);padding:4px 0;}
html body .onecup-desktop-kanban-menu>li>a{display:block;padding:10px 15px;font-size:11px!important;color:#4b4f56;}
html body .onecup-desktop-kanban-menu>li>a>svg,html body .onecup-desktop-kanban-menu>li>a>i{width:11px!important;height:11px!important;margin-right:7px;}}

/* Record titles share the same bold emphasis in desktop and mobile Kanban. */
html body .opportunity-kanban__card .opportunity-kanban__title,
html body .onecup-task-card .website-header > a,
html body .onecup-alphabet-view .website-header > p:first-child,
html body .onecup-alphabet-view .website-header > p:first-child > a {
    font-weight: 700 !important;
}

/* Keep the desktop Kanban canvas continuous through its outer layout. */
@media (min-width: 769px) {
    body.onecup-table-page:has(.opportunity-kanban-view, .onecup-alphabet-view, .onecup-task-kanban),
    body.onecup-table-page:has(.opportunity-kanban-view, .onecup-alphabet-view, .onecup-task-kanban) #wrapper,
    body.onecup-table-page:has(.opportunity-kanban-view, .onecup-alphabet-view, .onecup-task-kanban) #wrapper-page,
    body.onecup-table-page:has(.opportunity-kanban-view, .onecup-alphabet-view, .onecup-task-kanban) #content {
        background-color: #f0f2f5;
    }
}

@media (max-width:1199px) {
    html body .opportunity-kanban__card .opportunity-kanban__mobile-stage {position:static!important;display:flex!important;width:100%;margin:10px 0 0!important;padding:0!important;}
    html body .opportunity-kanban__mobile-stage > .btn-select {background:#1a73e8!important;color:#fff!important;border:1px solid #1a73e8!important;border-radius:3px!important;font-size:12px!important;line-height:1.4!important;padding:5px 10px!important;min-height:28px;}
    html body .modal .modal-footer .btn,
    html body .modal .onecup-cancel-action {font-size:12px!important;}
    html body .modal .modal-footer .btn > span,
    html body .modal .onecup-cancel-action > span {display:inline!important;font-size:12px!important;}
    html body .modal .onecup-cancel-action > :is(i,svg) {margin-right:5px!important;}
}

/* Shared list search is an opt-in mobile toolbar action; desktop keeps its layout. */
html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .onecup-list-search-toggle-group {display:none!important;}
@media (max-width:1199px) {
 html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .onecup-list-search-toggle-group {display:flex!important;}
 html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .side-0 > section:last-child {display:flex!important;flex-direction:column!important;align-items:stretch!important;}
 html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .side-0 > section:last-child > nav {order:0;}
 html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .side-0 > section:last-child > .onecup-list-search {display:none!important;order:1;width:100%!important;max-width:100%!important;flex:none!important;margin:10px 0 0!important;}
 html body :is(#opportunity-table, #task-table, #contact-table, #business-table, #groups-table, #users, main[data-onecup-list]) .side-0 > section:last-child > .onecup-list-search.is-open {display:flex!important;}
 html body #opportunity-table .opportunity-kanban__card .opportunity-kanban__mobile-stage > button.btn-select.btn-blue {background:var(--onecup-primary,#1a73e8)!important;color:#fff!important;transition:background 160ms ease;}
 html body #opportunity-table .opportunity-kanban__card .opportunity-kanban__mobile-stage > button.btn-select.btn-blue:hover,
 html body #opportunity-table .opportunity-kanban__card .opportunity-kanban__mobile-stage > button.btn-select.btn-blue:focus-visible {background:var(--onecup-primary-hover,#1565c0)!important;color:#fff!important;}
}

/* The close control overlays the full-width mobile status heading. */
@media (max-width:1199px) {
 html body #opportunitystatuschange.onecup-field-options-sheet .modal-content {position:relative!important;}
 html body #opportunitystatuschange.onecup-field-options-sheet .modal-content > .modal-header {box-sizing:border-box!important;display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;align-self:stretch!important;margin:0!important;left:auto!important;right:auto!important;}
 html body #opportunitystatuschange.onecup-field-options-sheet .modal-content > .onecup-field-options-close {position:absolute!important;top:24px!important;right:12px!important;left:auto!important;bottom:auto!important;float:none!important;margin:0!important;z-index:3!important;}
}

/* R60: same drag affordance and accessible options across task cards. */
html body .onecup-task-card .onecup-task-drag{display:inline-flex;align-items:center;justify-content:center;position:absolute;top:5px;right:5px;bottom:auto;width:25px;height:25px;padding:0 4px 0 1px;border:1px solid #dce6f1;border-radius:6px;background:#f2f6fb;color:#0069e8;font-size:14px;letter-spacing:-3px;touch-action:none;cursor:grab}
html body .onecup-task-card .onecup-task-drag:hover{background:#e7f1ff}
html body .onecup-task-card .onecup-task-options{position:relative;display:flex;justify-content:flex-end;float:right;margin:30px 0 0 8px;z-index:5}
html body .onecup-task-card .onecup-task-options .onecup-record-options{display:inline-flex!important;align-items:center;justify-content:center;width:25px;height:25px;padding:0!important;border:1px solid #1a73e8;background:#fff;color:#1a73e8}
html body .onecup-task-card .onecup-task-options .onecup-record-options:hover{background:#e7f1ff}
html body .onecup-task-card .website-header>a{font-size:12px!important;font-weight:700!important}
html body .onecup-task-card .onecup-task-assignee,html body .onecup-task-card .onecup-task-assignee a{font-size:10px!important}
.onecup-task-mobile-move{display:none}
@media(max-width:768px){
 html body .onecup-task-card .onecup-task-drag{display:none!important}
 html body .onecup-task-card .onecup-task-options{margin-top:0}
 .onecup-task-mobile-move{display:flex;clear:both;margin-top:10px}
 html body .onecup-task-mobile-move>.btn-select{background:#1a73e8!important;color:white!important;border:1px solid #1a73e8!important;border-radius:3px!important;font-size:12px!important;padding:5px 10px!important;min-height:28px}
 html body .onecup-task-mobile-move>.btn-select:hover{background:linear-gradient(to right,#0389ff,#1c79c0)!important}
}

@media(max-width:768px){
 html body #taskstatuschange{top:55px!important;bottom:calc(var(--onecup-mobile-nav-height,64px) + var(--onecup-mobile-safe-bottom,0px))!important;height:auto!important;padding:0!important;overflow:hidden!important}
 html body #taskstatuschange .modal-dialog{position:absolute!important;bottom:0!important;top:auto!important;left:0!important;right:0!important;width:100%!important;max-width:100%!important;margin:0!important;max-height:100%!important;transform:translateY(100%)!important;transition:transform .2s ease!important}
 html body #taskstatuschange.in .modal-dialog,html body #taskstatuschange.show .modal-dialog{transform:translateY(0)!important}
 html body #taskstatuschange .modal-content{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 119px - var(--onecup-mobile-safe-bottom,0px))!important;width:100%!important;overflow:hidden!important}
 html body #taskstatuschange .modal-header,html body #taskstatuschange .modal-footer{flex:0 0 auto!important}
 html body #taskstatuschange .modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important}

}

/* Task Kanban reuses the opportunity card; only the task-specific date differs. */
html body .opportunity-kanban__card .opportunity-kanban__due {font-size:10px!important;font-weight:700;line-height:1.4;margin:10px 32px 0 0;}
html body .opportunity-kanban__due.is-overdue {color:#ea384d;}
html body .opportunity-kanban__due.is-current {color:#008a13;}
/* Reserve room for the common bottom-right menu, even without value/date metadata. */
.onecup-task-kanban-view .opportunity-kanban__card {min-height:86px;}
@media(max-width:1199px){
 html body .opportunity-kanban__card .opportunity-kanban__due {font-size:12px!important;margin:0 32px 0 0;}
}

/* Shared metadata rhythm for opportunity and task state cards, desktop and mobile.
   Keep card-level gaps out of metadata spacing; quality alone uses an 8px gap. */
html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card {
 --onecup-kanban-metadata-gap:5px;
 --onecup-kanban-metadata-font-size:10px;
 row-gap:0!important;
}
html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card .opportunity-kanban__details {
 display:flex!important;
 flex-direction:column!important;
 gap:var(--onecup-kanban-metadata-gap)!important;
 margin-bottom:0!important;
}
html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__details > * {
 margin-top:0!important;
 margin-bottom:0!important;
}
html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card :is(.opportunity-kanban__assigned, .opportunity-kanban__assigned a, .opportunity-kanban__assigned span, .opportunity-kanban__value) {
 font-size:var(--onecup-kanban-metadata-font-size)!important;
}
html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card > .opportunity-kanban__due {
 margin-top:var(--onecup-kanban-metadata-gap)!important;
 margin-bottom:0!important;
}
html body #opportunity-table .opportunity-kanban__card > .opportunity-kanban__quality {
 margin-top:8px!important;
 margin-bottom:0!important;
}
@media(max-width:1199px){
 html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card {
  --onecup-kanban-metadata-font-size:14px;
 }
 html body :is(#opportunity-table, #task-table, #projects[data-project-page="index"]) .opportunity-kanban__card > :is(.opportunity-kanban__details, .opportunity-kanban__mobile-stage) {
  margin-top:10px!important;
 }
}

/* R408: content-sized boards; only the outer work surface fills the viewport.
   Vue mounts these view containers only while Kanban is selected. */
@media (min-width:1200px) {
 html body.mini-navbar:has(.opportunity-kanban-view,.onecup-alphabet-view,.auto-kanban,.onecup-project-kanban-view) {
  display:flow-root;
  height:auto;
  min-height:100vh;
 }
 html body.mini-navbar:has(.opportunity-kanban-view,.onecup-alphabet-view,.auto-kanban,.onecup-project-kanban-view) :is(#wrapper-page,#content,#content>[id]) {
  min-height:0;
 }
 html body.mini-navbar:has(.opportunity-kanban-view,.onecup-alphabet-view,.auto-kanban,.onecup-project-kanban-view) #content main.wrapper-content {
  min-height:0!important;
 }
 html body .opportunity-kanban {
  min-height:0;
 }
}

/* Hidden filter panels must not extend the page below a compact board. */
@media(min-width:1200px){
 html body.mini-navbar:has(.opportunity-kanban-view,.onecup-alphabet-view,.auto-kanban,.onecup-project-kanban-view) .tabs-container>.side-1.hidden{
  max-height:0!important;
  overflow:hidden!important;
  padding-top:0!important;
  padding-bottom:0!important;
  margin-top:0!important;
  margin-bottom:0!important;
 }
}

/* Contact and company names follow the uppercase Kanban title convention. */
html body .onecup-contacts-kanban-view .opportunity-kanban__card > .opportunity-kanban__title,
html body .onecup-business-kanban-view .opportunity-kanban__card > .opportunity-kanban__title {
    text-transform: uppercase !important;
}

/* Desktop state boards use the remaining viewport, including the horizontal
   scrollbar. Floating email/chat controls do not reserve space underneath. */
@media (min-width:1200px) {
  html body main .tabs-container > .side-1.show {
    box-sizing:border-box;
    max-height:var(--onecup-filter-max-height,calc(100vh - 85px));
  }
  html body main .opportunity-kanban > .opportunity-kanban__column:not(.is-collapsed) {
  max-height:var(--onecup-kanban-column-max-height,calc(100vh - 230px));
 }
 html body.mini-navbar:has(main .opportunity-kanban) #wrapper-page {
  margin-bottom:0!important;
 }
 html body.mini-navbar #content main.wrapper-content:has(.opportunity-kanban) {
  padding-bottom:15px;
 }
}
