/*
  Osorno Group Company Theme
  --------------------
  Visual-only company skin using the Osorno Group navy, warm paper, gold, and copper palette.
  This file intentionally avoids data, workflow, print/PDF, and JavaScript changes.
*/

:root{
  --studio-ink:#1f2d4d;
  --studio-ink-2:#34466f;
  --studio-canvas:#e7e2d8;
  --studio-paper:#fffdf9;
  --studio-paper-2:#f5f1e8;
  --studio-line:#cbd2df;
  --studio-muted:#667085;
  --studio-copper:#c46a3a;
  --studio-copper-dark:#9f4c29;
  --studio-ochre:#d6a23d;
  --studio-teal:#466f8e;
  --studio-teal-dark:#2f5879;
  --studio-teal-soft:#dce8f0;
  --studio-sage:#e3ead9;
  --studio-plum:#5b557b;
  --studio-plum-soft:#e9e6f2;
  --studio-warning:#8e5f12;
  --studio-warning-soft:#f6e8c7;
  --studio-danger:#a33e35;
  --studio-danger-soft:#f4deda;
  --studio-success:#55734c;
  --studio-success-soft:#e3ecd9;
  --studio-shadow:0 16px 44px rgba(31,45,77,.14);
  --studio-shadow-sm:0 4px 14px rgba(31,45,77,.10);
  --studio-radius:18px;
}

body.company-theme{
  --nav:var(--studio-ink);
  --nav-2:var(--studio-ink-2);
  --blue:var(--studio-teal);
  --bright-blue:var(--studio-teal);
  --teal:var(--studio-teal);
  --gold:var(--studio-ochre);
  --bg:var(--studio-canvas);
  --card:var(--studio-paper);
  --line:var(--studio-line);
  --line-2:#e5ded2;
  --text:var(--studio-ink);
  --muted:var(--studio-muted);
  --green:var(--studio-success);
  --green-bg:var(--studio-success-soft);
  --red:var(--studio-danger);
  --red-bg:var(--studio-danger-soft);
  --blue-bg:var(--studio-teal-soft);
  --shadow:var(--studio-shadow-sm);
  --shadow-strong:var(--studio-shadow);
  margin:0;
  color:var(--studio-ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    linear-gradient(rgba(31,45,77,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(31,45,77,.035) 1px,transparent 1px),
    var(--studio-canvas);
  background-size:28px 28px;
}

body.company-theme h1,
body.company-theme h2,
body.company-theme h3,
body.company-theme .report-title-big,
body.company-theme .config-page-title{
  font-family:Georgia,"Times New Roman",serif;
  color:var(--studio-ink);
  letter-spacing:-.015em;
}

/* Shared application header */
body.company-theme .esub-top-nav,
body.company-theme .osorno-top-nav{
  min-height:66px;
  height:auto;
  padding:0 24px;
  gap:20px;
  color:#fffaf0;
  background:var(--studio-ink);
  border-bottom:4px solid var(--studio-copper);
  box-shadow:0 8px 22px rgba(31,45,77,.20);
}
body.company-theme .osorno-logo-mark{
  min-width:32px;
  min-height:32px;
  display:grid;
  place-items:center;
  padding:0;
  color:var(--studio-ink);
  background:var(--studio-ochre);
  border-radius:7px 7px 12px 7px;
  transform:rotate(-2deg);
}
body.company-theme .osorno-logo-text{
  color:#fffaf0;
  font-size:15px;
  letter-spacing:.18em;
}
body.company-theme .esub-start-link,
body.company-theme .osorno-start-trigger{
  color:#eee7dc !important;
}
body.company-theme .osorno-start-trigger:hover,
body.company-theme .osorno-start-trigger:focus-visible{
  color:#fffaf0 !important;
  background:rgba(255,255,255,.07) !important;
}
body.company-theme .osorno-start-dropdown{
  min-width:245px;
  padding:8px;
  color:var(--studio-ink);
  background:var(--studio-paper);
  border:1px solid rgba(99,89,72,.22);
  border-top:0;
  border-radius:0 0 14px 14px;
  box-shadow:var(--studio-shadow);
}
body.company-theme .osorno-start-dropdown a{
  padding:11px 13px;
  color:var(--studio-ink);
  background:transparent;
  border-radius:9px;
}
body.company-theme .osorno-start-dropdown a:hover,
body.company-theme .osorno-start-dropdown a:focus-visible{
  color:var(--studio-teal-dark);
  background:var(--studio-teal-soft);
}
body.company-theme .esub-top-icon,
body.company-theme .osorno-notification-trigger{
  color:#fffaf0;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.14);
}
body.company-theme .esub-top-icon:hover,
body.company-theme .osorno-notification-trigger:hover{
  background:rgba(255,255,255,.13);
}
body.company-theme .esub-user-name{color:#eee7dc}
body.company-theme .esub-user-dot{color:#7ed19b}
body.company-theme .osorno-notification-popover,
body.company-theme .local-user-dropdown{
  color:var(--studio-ink);
  background:var(--studio-paper);
  border:1px solid var(--studio-line);
  border-radius:14px;
  box-shadow:var(--studio-shadow);
}


/* Company logo */
body.company-theme .osorno-logo{
  min-width:230px;
  height:48px;
  display:flex;
  align-items:center;
  padding:0;
  background:transparent;
  overflow:visible;
}
body.company-theme .company-logo-image{
  display:block;
  width:230px;
  max-width:100%;
  max-height:42px;
  object-fit:contain;
  object-position:left center;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.16));
}
body.company-theme.auth-page .osorno-logo{
  justify-content:center;
  margin:0 auto;
}
body.company-theme.auth-page .company-logo-image{
  width:min(320px,80vw);
  max-height:62px;
}

/* Main page widths and title treatment */
body.company-theme .esub-main,
body.company-theme .config-shell,
body.company-theme .directory-page-shell,
body.company-theme .contact-form-shell,
body.company-theme .users-shell,
body.company-theme .auth-shell{
  width:min(1440px,calc(100% - 38px));
  margin-top:24px;
}
body.company-theme .esub-title-row,
body.company-theme .config-title-row,
body.company-theme .directory-page-header,
body.company-theme .contact-form-header,
body.company-theme .users-hero{
  margin-bottom:18px;
}
body.company-theme .esub-title-row h1,
body.company-theme .config-title-row h1,
body.company-theme .directory-page-header h1,
body.company-theme .contact-form-header h1,
body.company-theme .users-hero h1{
  color:var(--studio-ink);
  font-family:Georgia,"Times New Roman",serif;
  font-weight:700;
}
body.company-theme .osorno-title-icon,
body.company-theme .pr-mark,
body.company-theme .esub-title-icon{
  color:var(--studio-ink);
  background:var(--studio-ochre);
  border-radius:8px 8px 13px 8px;
  box-shadow:0 5px 13px rgba(214,162,61,.2);
}
body.company-theme .small-note,
body.company-theme .config-note,
body.company-theme .esub-subtext,
body.company-theme .config-title-meta{
  color:var(--studio-muted);
}

/* Cards and panels */
body.company-theme .panel,
body.company-theme .config-content,
body.company-theme .esub-project-detail-header,
body.company-theme .esub-log-panel,
body.company-theme .reports-module-panel,
body.company-theme .reports-intro-card,
body.company-theme .reports-drill-card,
body.company-theme .region-card,
body.company-theme .esub-project-card,
body.company-theme .esub-module,
body.company-theme .directory-card,
body.company-theme .directory-empty-state,
body.company-theme .contact-editor-card,
body.company-theme .users-card,
body.company-theme .user-editor-card,
body.company-theme .auth-card,
body.company-theme .side-card,
body.company-theme .health-card,
body.company-theme .report-drill-card-top,
body.company-theme .reports-drill-category-card{
  color:var(--studio-ink);
  background:var(--studio-paper);
  border:1px solid rgba(99,89,72,.22);
  border-radius:var(--studio-radius);
  box-shadow:var(--studio-shadow-sm);
}
body.company-theme .region-card,
body.company-theme .esub-project-card,
body.company-theme .esub-module,
body.company-theme .directory-card{
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
body.company-theme .region-card:hover,
body.company-theme .esub-project-card:hover,
body.company-theme .esub-module:hover,
body.company-theme .directory-card:hover{
  transform:translateY(-2px);
  border-color:#aeb9cc;
  box-shadow:var(--studio-shadow);
}
body.company-theme .region-card h2,
body.company-theme .esub-project-card h2,
body.company-theme .esub-project-detail-header h1,
body.company-theme .esub-module strong,
body.company-theme .dashboard-kpi strong,
body.company-theme .region-kpi strong{
  color:var(--studio-ink);
}
body.company-theme .region-card-grid{gap:18px}
body.company-theme .region-card{min-height:188px;padding:22px}
body.company-theme .region-kpi div,
body.company-theme .dashboard-kpi,
body.company-theme .esub-hours-box,
body.company-theme .reports-intro-metrics>div,
body.company-theme .report-drill-stats>div{
  color:var(--studio-ink);
  background:var(--studio-paper-2);
  border:1px solid var(--studio-line);
  border-radius:13px;
}

/* Buttons */
body.company-theme .esub-primary-btn,
body.company-theme .small-open-btn,
body.company-theme .btn-primary,
body.company-theme button.primary{
  color:#fff;
  background:var(--studio-copper);
  border-color:var(--studio-copper);
  border-radius:10px;
  box-shadow:0 7px 16px rgba(189,104,60,.2);
}
body.company-theme .esub-primary-btn:hover,
body.company-theme .small-open-btn:hover,
body.company-theme .btn-primary:hover,
body.company-theme button.primary:hover{
  background:var(--studio-copper-dark);
  border-color:var(--studio-copper-dark);
}
body.company-theme .esub-secondary-btn,
body.company-theme .small-bulk-btn,
body.company-theme .compact-btn,
body.company-theme .icon-action,
body.company-theme .icon-btn,
body.company-theme .esub-card-icons button,
body.company-theme .directory-row-actions button,
body.company-theme .users-row-actions button{
  color:var(--studio-ink);
  background:var(--studio-paper);
  border-color:var(--studio-line);
  border-radius:10px;
}
body.company-theme .esub-secondary-btn:hover,
body.company-theme .small-bulk-btn:hover,
body.company-theme .compact-btn:hover,
body.company-theme .icon-action:hover,
body.company-theme .icon-btn:hover,
body.company-theme .esub-card-icons button:hover{
  color:var(--studio-teal-dark);
  background:var(--studio-teal-soft);
  border-color:#9dbeb7;
}
body.company-theme .black-back-link,
body.company-theme .esub-back-btn{
  color:#fffaf0;
  background:var(--studio-ink);
  border-color:var(--studio-ink);
  border-radius:10px;
}
body.company-theme .black-back-link:hover,
body.company-theme .esub-back-btn:hover{background:var(--studio-ink-2)}
body.company-theme .esub-danger-btn,
body.company-theme .row-delete,
body.company-theme .mini-delete-btn{
  color:var(--studio-danger);
  background:var(--studio-paper);
  border-color:#dfb6af;
  border-radius:10px;
}
body.company-theme .esub-danger-btn:hover,
body.company-theme .row-delete:hover,
body.company-theme .mini-delete-btn:hover{background:var(--studio-danger-soft)}
body.company-theme .esub-open-button{
  color:#fff;
  background:var(--studio-teal);
  border-radius:10px;
  box-shadow:0 6px 14px rgba(47,115,112,.18);
}
body.company-theme .esub-open-button:hover{background:var(--studio-teal-dark)}

/* Forms */
body.company-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.company-theme select,
body.company-theme textarea,
body.company-theme .esub-search{
  color:var(--studio-ink);
  background:#fffef9;
  border:1px solid #bdb5a7;
  border-radius:10px;
  box-shadow:none;
}
body.company-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
body.company-theme select:focus,
body.company-theme textarea:focus,
body.company-theme .esub-search:focus{
  outline:3px solid rgba(47,115,112,.18);
  outline-offset:1px;
  border-color:var(--studio-teal);
}
body.company-theme .esub-checkbox-filter,
body.company-theme .region-filter-bar,
body.company-theme .bulk-costcode-actions,
body.company-theme .user-assignment-field{
  background:var(--studio-paper-2);
  border:1px solid var(--studio-line);
  border-radius:14px;
  box-shadow:none;
}
body.company-theme label{color:var(--studio-ink-2)}

/* Side menus and module navigation */
body.company-theme .config-layout{gap:18px}
body.company-theme .config-side-menu{
  overflow:hidden;
  padding:10px;
  color:#fffaf0;
  background:var(--studio-ink);
  border:1px solid rgba(31,40,36,.9);
  border-radius:18px;
  box-shadow:var(--studio-shadow-sm);
}
body.company-theme .config-menu-item{
  color:#d8ddd9;
  background:transparent;
  border:0;
  border-radius:12px;
}
body.company-theme .config-menu-item:hover{background:rgba(255,255,255,.06)}
body.company-theme .config-menu-item.active{
  color:var(--studio-ink);
  background:#fffaf0;
  box-shadow:none;
}
body.company-theme .config-menu-item .plusbox{
  color:var(--studio-ink);
  background:var(--studio-ochre);
  border-color:var(--studio-ochre);
  border-radius:7px 7px 7px 7px;
}
body.company-theme .esub-module.active{
  color:var(--studio-ink);
  background:var(--studio-teal-soft);
  border-color:#9dbeb7;
  box-shadow:inset 5px 0 0 var(--studio-teal);
}
body.company-theme .esub-module small,
body.company-theme .esub-project-pm,
body.company-theme .esub-project-location,
body.company-theme .esub-category-mini,
body.company-theme .esub-detail-meta{
  color:var(--studio-muted);
}

/* Section title bars and tables */
body.company-theme .esub-log-title-bar,
body.company-theme .reports-title-bar,
body.company-theme .esub-section-title-bar,
body.company-theme .users-card-head,
body.company-theme .worker-summary-head,
body.company-theme .editable-list-head{
  color:#fffaf0;
  background:var(--studio-ink);
  border-bottom:3px solid var(--studio-copper);
  border-radius:14px 14px 0 0;
}
body.company-theme .esub-log-title-bar h2,
body.company-theme .reports-title-bar h2,
body.company-theme .esub-section-title-bar h2,
body.company-theme .users-card-head h2{
  color:#fffaf0;
}
body.company-theme table{
  color:var(--studio-ink);
  background:var(--studio-paper);
}
body.company-theme table thead th,
body.company-theme .users-table th,
body.company-theme .reports-table th,
body.company-theme .daily-log-table th,
body.company-theme .esub-config-table th{
  color:var(--studio-ink-2);
  background:#edf0f5;
  border-color:var(--studio-line);
}
body.company-theme table td,
body.company-theme table th{
  border-color:#d9dee8;
}
body.company-theme table tbody tr:hover{background:#fbf5e8}
body.company-theme .subtotal-row,
body.company-theme .total-cell{
  background:var(--studio-sage);
}

/* Directory and contact pages */
body.company-theme .directory-page-shell,
body.company-theme .contact-form-shell{max-width:1180px}
body.company-theme .directory-avatar{
  color:#fff;
  background:var(--studio-teal);
  box-shadow:0 4px 10px rgba(47,115,112,.18);
}
body.company-theme .directory-name-main,
body.company-theme .directory-card-title{color:var(--studio-ink)}
body.company-theme .directory-empty-state{
  background:rgba(255,253,247,.86);
  border-style:dashed;
}
body.company-theme .contact-form-section{
  padding:18px;
  background:var(--studio-paper-2);
  border:1px solid var(--studio-line);
  border-radius:15px;
}

/* Users, roles, login */
body.company-theme .users-local-warning,
body.company-theme .access-local-note{
  color:var(--studio-warning);
  background:var(--studio-warning-soft);
  border:1px solid #ddc58f;
  border-radius:14px;
}
body.company-theme .role-chip,
body.company-theme .users-status-badge,
body.company-theme .current-user-chip{
  border-radius:999px;
}
body.company-theme .role-chip{color:var(--studio-teal-dark);background:var(--studio-teal-soft)}
body.company-theme.auth-page{
  background:
    radial-gradient(circle at top right,rgba(214,162,61,.18),transparent 32%),
    linear-gradient(rgba(31,45,77,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(31,45,77,.035) 1px,transparent 1px),
    var(--studio-canvas);
  background-size:auto,28px 28px,28px 28px,auto;
}
body.company-theme .auth-card{max-width:500px;padding:30px}
body.company-theme .auth-mark{
  color:var(--studio-ink);
  background:var(--studio-ochre);
  border-radius:10px 10px 16px 10px;
}

/* Charts and status accents */
body.company-theme .trend-chart-enhanced,
body.company-theme .trend-chart-powerbi{
  background:var(--studio-paper);
  border-color:var(--studio-line);
  border-radius:16px;
}
body.company-theme .trend-blue-titlebar{
  color:#fffaf0;
  background:var(--studio-teal);
}
body.company-theme .esub-hours-bar{background:#d9deea}
body.company-theme .esub-hours-bar span{background:var(--studio-teal)}
body.company-theme .esub-hours-bar.danger span{background:var(--studio-danger)}
body.company-theme .sent-pill,
body.company-theme .esub-open-pill{
  color:#fff;
  background:var(--studio-teal);
}

/* Modals and feedback */
body.company-theme .modal-overlay,
body.company-theme .app-feedback-modal,
body.company-theme .access-denied-overlay{background:rgba(20,29,51,.74)}
body.company-theme .modal-card,
body.company-theme .app-feedback-card,
body.company-theme .access-denied-card{
  color:var(--studio-ink);
  background:var(--studio-paper);
  border:1px solid var(--studio-line);
  border-radius:20px;
  box-shadow:0 30px 70px rgba(0,0,0,.3);
}
body.company-theme .modal-head{
  color:#fffaf0;
  background:var(--studio-ink);
  border-bottom:3px solid var(--studio-copper);
}
body.company-theme .toast{
  color:#fffaf0;
  background:var(--studio-ink);
  border-radius:13px;
  box-shadow:var(--studio-shadow);
}

/* Keep the redesigned Change Order workspace intact while aligning its shell. */
body.company-theme.change-orders-page .studio-editor-topbar,
body.company-theme.change-orders-page .studio-impact,
body.company-theme.change-orders-page .studio-sheet,
body.company-theme.change-orders-page .hybrid-cost-breakdown{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

/* Do not restyle generated PDF/print documents. */
body.company-theme .pdf-export-host,
body.company-theme .pdf-page,
body.company-theme .pdf-header,
body.company-theme .pdf-title-row,
body.company-theme .pdf-meta,
body.company-theme .pdf-section-title{
  font-family:Arial,Helvetica,sans-serif;
}

@media(max-width:760px){

  body.company-theme .osorno-logo{min-width:150px;height:42px}
  body.company-theme .company-logo-image{width:150px;max-height:34px}
  body.company-theme .esub-top-nav,
  body.company-theme .osorno-top-nav{padding:0 12px;gap:10px}
  body.company-theme .esub-main,
  body.company-theme .config-shell,
  body.company-theme .directory-page-shell,
  body.company-theme .contact-form-shell,
  body.company-theme .users-shell{width:min(100% - 18px,760px)}
  body.company-theme .region-card-grid{grid-template-columns:1fr}
  body.company-theme .config-side-menu{border-radius:14px}
}

@media print{
  body.company-theme{
    color:#111;
    background:#fff !important;
  }
  body.company-theme .esub-top-nav,
  body.company-theme .osorno-top-nav{box-shadow:none}
}
/* Main-theme refinements */
.region-card .green-cell,.region-card .red-cell,.project-hour-chip .green-cell,.project-hour-chip .red-cell{background:transparent!important;padding:0!important}
#region-dashboard-filters{grid-template-columns:repeat(5,minmax(150px,1fr))}
@media(max-width:1100px){#region-dashboard-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){#region-dashboard-filters{grid-template-columns:1fr}}
/* Change Order editor aligned with the approved company navy theme. */
body.company-theme.change-orders-page .studio-editor{
  --studio-ink:#1f2d4d;
  --studio-ink-2:#34466f;
  --studio-paper:#fffdf9;
  --studio-paper-2:#f5f1e8;
  --studio-line:#cbd2df;
  --studio-muted:#667085;
  --studio-copper:#c46a3a;
  --studio-copper-dark:#9f4c29;
  --studio-ochre:#d6a23d;
  --studio-teal:#466f8e;
  --studio-teal-soft:#dce8f0;
  --studio-sage:#e3ead9;
}
body.company-theme.change-orders-page .studio-impact,
body.company-theme.change-orders-page .studio-impact-head,
body.company-theme.change-orders-page .hybrid-cost-category[open]>summary{
  background-color:#1f2d4d;
}
body.company-theme.change-orders-page .hybrid-cost-category{border-color:#cbd2df;background:#fffdf9}

/* ===== Company theme polish: header, logs, configuration, and trend chart ===== */

/* Slashed company header: cream logo panel at left, navy navigation at right. */
body.company-theme .osorno-top-nav,
body.company-theme .esub-top-nav{
  --company-logo-zone:clamp(255px,18vw,315px);
  position:sticky;
  isolation:isolate;
  overflow:visible;
  min-height:58px;
  padding:0 20px;
  align-items:center;
  background:var(--studio-ink);
}
body.company-theme .osorno-top-nav::before,
body.company-theme .esub-top-nav::before{
  content:"";
  position:absolute;
  z-index:0;
  inset:0 auto 0 0;
  width:var(--company-logo-zone);
  background:linear-gradient(90deg,#f8f4eb 0%,#fffdf9 86%);
  clip-path:polygon(0 0,88% 0,100% 100%,0 100%);
  pointer-events:none;
}
 
body.company-theme .osorno-top-nav::after,
body.company-theme .esub-top-nav::after{
  content:"BEAM-X";
  position:absolute;
  z-index:1;
  left:50%;
  top:50%;
  width:178px;
  height:42px;
  transform:translate(-50%,-50%);
 /*  
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  background:#fffdf9 url("beamx-logo.jpg") center/158px auto no-repeat; 
  */
  box-shadow:0 3px 10px rgba(0,0,0,.18);
  pointer-events:none;
}
 
body.company-theme .osorno-top-nav>* ,
body.company-theme .esub-top-nav>*{
  position:relative;
  z-index:1;
}
body.company-theme .osorno-logo,
body.company-theme .esub-logo{
  flex:0 0 calc(var(--company-logo-zone) - 30px);
  min-width:calc(var(--company-logo-zone) - 30px);
  height:48px;
  padding:0 18px 0 2px;
}
body.company-theme .company-logo-image{
  width:min(238px,100%);
  max-height:40px;
  filter:drop-shadow(0 2px 4px rgba(31,45,77,.12));
}
body.company-theme .osorno-start-menu{
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.company-theme .osorno-start-trigger,
body.company-theme .esub-start-link{
  height:100%;
  min-height:58px;
  padding:0 10px !important;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1.1;
  transform:none !important;
}

/* Daily Report Log: retain table-cell borders and align action buttons inside a wrapper. */
body.company-theme .daily-log-table td.action-cell,
body.company-theme .esub-log-table td.action-cell{
  display:table-cell;
  width:176px;
  min-width:176px;
  padding:9px 10px;
  white-space:nowrap;
  vertical-align:middle;
}
body.company-theme .daily-log-table td.action-cell .log-actions,
body.company-theme .esub-log-table td.action-cell .log-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  width:max-content;
}
body.company-theme .daily-log-table td.action-cell .icon-action,
body.company-theme .esub-log-table td.action-cell .icon-action{
  flex:0 0 36px;
  width:36px;
  height:34px;
  margin:0;
}
body.company-theme .daily-log-table th,
body.company-theme .daily-log-table td,
body.company-theme .esub-log-table th,
body.company-theme .esub-log-table td{
  box-sizing:border-box;
}

/* General Configuration title and action alignment. */
body.company-theme .config-title-row h1{display:flex;align-items:center;gap:0}
body.company-theme .config-top-actions{
  align-items:center;
  gap:10px;
}
body.company-theme .config-top-actions .black-back-link,
body.company-theme .config-top-actions .esub-primary-btn{
  min-height:42px;
  margin:0;
  padding:10px 15px;
}
body.company-theme .config-menu-item{
  text-decoration:none;
}
body.company-theme .config-menu-item .plusbox,
body.company-theme .config-menu-item:link .plusbox,
body.company-theme .config-menu-item:visited .plusbox{
  text-decoration:none !important;
}

/* Match Cost Code headings to the editable row columns. */
body.company-theme .global-costcode-head{
  display:grid;
  grid-template-columns:150px 170px minmax(0,1fr) 42px;
  gap:8px;
  align-items:center;
  padding:9px 10px;
  overflow:visible;
}
body.company-theme .global-costcode-head>strong{
  min-width:0;
  white-space:normal;
}

/* Use the available viewport width so Market Areas and Employees fit without page scrolling. */
body.company-theme .config-shell{
  width:min(1720px,calc(100% - 30px));
  max-width:none;
}
body.company-theme .config-layout{
  grid-template-columns:250px minmax(0,1fr);
  align-items:start;
}
body.company-theme .config-content,
body.company-theme .config-content form,
body.company-theme .config-panel,
body.company-theme .category-editor-box{
  min-width:0;
  max-width:100%;
}
body.company-theme .employee-list-head,
body.company-theme .employee-row{
  grid-template-columns:82px minmax(130px,1.05fr) minmax(115px,.9fr) minmax(125px,1fr) minmax(105px,.8fr) minmax(105px,.82fr) minmax(150px,1.15fr) 72px 38px;
  gap:7px;
}
body.company-theme .market-area-list-head,
body.company-theme .market-area-row{
  grid-template-columns:minmax(145px,.85fr) 94px minmax(190px,1.5fr) 38px;
  gap:8px;
}
body.company-theme .employee-list-head,
body.company-theme .market-area-list-head{
  padding:9px 11px;
  overflow:visible;
  border-radius:11px 11px 0 0;
}
body.company-theme .employee-list-head>strong:first-child,
body.company-theme .market-area-list-head>strong:first-child{
  padding-left:2px;
}
body.company-theme .employee-row input,
body.company-theme .employee-row select,
body.company-theme .market-area-row input,
body.company-theme .market-area-row select{
  width:100%;
  min-width:0;
}

/* FTE labels are intentionally lighter and visually separate from bar totals. */
body.company-theme .trend-fte-label{
  fill:#6b5b7b;
  font-size:11px;
  font-weight:600;
  stroke:#fff;
  stroke-width:2px;
}

@media(max-width:1250px){
  body.company-theme .config-shell{width:min(100% - 20px,1180px)}
  body.company-theme .config-layout{grid-template-columns:220px minmax(0,1fr)}
  body.company-theme .employee-list-head{display:none}
  body.company-theme .employee-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:12px;
    border:1px solid var(--studio-line);
    border-radius:12px;
    background:var(--studio-paper-2);
  }
  body.company-theme .employee-row .mini-delete-btn{justify-self:end}
}

@media(max-width:1100px){
  body.company-theme .osorno-top-nav::after,
  body.company-theme .esub-top-nav::after{
    width:132px;
    height:38px;
    background-size:118px auto;
  }
}
@media(max-width:860px){
  body.company-theme .osorno-top-nav::after,
  body.company-theme .esub-top-nav::after{
    display:none;
  }
}

@media(max-width:760px){
  body.company-theme .osorno-top-nav,
  body.company-theme .esub-top-nav{
    --company-logo-zone:170px;
    min-height:54px;
    padding:0 9px;
    gap:7px;
  }
  body.company-theme .osorno-logo,
  body.company-theme .esub-logo{
    flex-basis:145px;
    min-width:145px;
    height:46px;
    padding-right:8px;
  }
  body.company-theme .company-logo-image{width:140px;max-height:32px}
  body.company-theme .osorno-start-trigger,
  body.company-theme .esub-start-link{min-height:54px;padding:0 6px !important}
  body.company-theme .config-layout{grid-template-columns:1fr}
  body.company-theme .global-costcode-head{display:none}
  body.company-theme .employee-row{grid-template-columns:1fr}
}



/* Phase 1 final workflow refinements */
body.company-theme .phase-list-head{
  display:grid;
  grid-template-columns:80px minmax(220px,1.4fr) 150px 160px minmax(220px,1fr) 42px;
  gap:8px;
  align-items:center;
  padding:9px 10px;
}
body.company-theme .phase-list-head strong{min-width:0;white-space:normal;line-height:1.2;}
.foreman-link-card{width:min(720px,94vw);padding:0!important;overflow:hidden;border:1px solid #d5cec1!important;border-radius:18px!important;background:#fffdf8!important;box-shadow:0 24px 70px rgba(15,28,55,.30)!important;}
.foreman-link-card .modal-head{padding:20px 22px 16px;background:#20345d;color:#fff;border-bottom:3px solid #c96c3b;}
.foreman-link-card .modal-head h2{margin:0;color:#fff!important;font-size:24px;}
.foreman-link-card .modal-head .small-note{margin-top:4px;color:#dce5f4!important;font-weight:750;}
.foreman-link-card .modal-close{background:#fff!important;color:#20345d!important;border:0!important;box-shadow:0 2px 8px rgba(0,0,0,.18);}
.foreman-link-card > .foreman-link-status,.foreman-link-card > .foreman-link-note,.foreman-link-card > .foreman-link-label,.foreman-link-card > .foreman-link-value-row,.foreman-link-card > .foreman-link-actions{margin-left:22px;margin-right:22px;}
.foreman-link-status{display:inline-flex;align-items:center;margin-top:18px!important;margin-bottom:10px!important;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;}
.foreman-link-status.is-shareable{background:#dcfce7;color:#166534;}
.foreman-link-status.is-local{background:#fff3cd;color:#805b00;}
.foreman-link-note{margin-top:0!important;margin-bottom:14px!important;color:var(--studio-muted,#68736e);line-height:1.5;}
.foreman-link-label{display:block;margin-bottom:6px!important;color:#20345d;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;}
.foreman-link-value-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;}
.foreman-link-value-row input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #cfc8ba;border-radius:10px;background:#fff;color:#102654;font:inherit;text-overflow:ellipsis;}
.foreman-link-value-row button:disabled{background:#d7d2c9!important;color:#6f6b65!important;cursor:not-allowed!important;}
.foreman-link-actions{align-items:center;justify-content:space-between;margin-top:14px!important;margin-bottom:20px!important;padding-top:14px;border-top:1px solid #e8e1d7;}
.foreman-link-feedback{color:#2f6a4a;font-weight:850;}
.co-status-bar-value{display:grid;gap:1px;text-align:center;}
.co-status-bar-value strong{font-size:12px;color:#102654;}
.co-status-bar-value small{font-size:10px;color:#64748b;font-weight:800;}
@media(max-width:900px){
  body.company-theme .phase-list-head{display:none;}
}
@media(max-width:620px){
  .foreman-link-value-row{grid-template-columns:1fr;}
  .foreman-link-value-row button{width:100%;}
}

