/* Shared VantriqAI workspace styling. Business and access rules stay in each app. */
:root{--radius:16px;--radius-sm:11px;--radius-lg:24px;--shadow-sm:0 2px 3px rgba(22,21,26,.025),0 12px 28px -22px rgba(22,21,26,.18);--shadow-md:0 3px 8px rgba(22,21,26,.04),0 18px 38px -25px rgba(22,21,26,.2);}
body{line-height:1.5;}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent;}
.workspace-eyebrow{font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);line-height:1.5;}
.btn{min-height:40px;justify-content:center;line-height:1.35;}
.btn-primary{box-shadow:0 3px 9px rgba(47,86,217,.13);}
.btn-ghost{box-shadow:none;}
.field label{font-weight:650;}
.field input,.field select,.field textarea{min-height:44px;}
.card,.chart-card,.table-wrap,.stat-card{box-shadow:var(--shadow-sm);}
.empty{line-height:1.7;}
.crm-shell .sidebar{width:248px;background:linear-gradient(165deg,#221f2b,#16151a 55%);}
.crm-shell .brand{padding:26px 22px 22px;}
.crm-shell .brand-name{font-size:18px;}
.crm-shell .brand-sub{color:#a49b8e;letter-spacing:.1em;font-size:9px;}
.crm-shell .nav{padding:14px 14px 20px;}
.crm-shell .nav-group-label{color:#a49b8e;font-size:9px;padding:18px 12px 8px;}
.crm-shell .nav-item{padding:11px 12px;margin-bottom:4px;border-radius:11px;color:#c8c1b7;}
.crm-shell .nav-item.active{background:linear-gradient(110deg,#2f56d9,#3f65e0);box-shadow:0 5px 14px rgba(47,86,217,.18);color:#fff;}
.crm-shell .sidebar-foot{padding:18px 22px;color:#a49b8e;}
.crm-shell .topbar{padding:20px 30px;background:rgba(251,249,246,.94);gap:16px;}
.crm-shell .topbar .workspace-eyebrow{margin-bottom:4px;color:var(--teal-dark);}
.crm-shell .topbar h1{font-size:23px;letter-spacing:-.04em;}
.crm-shell .topbar-sub{line-height:1.6;margin-top:4px;}
.crm-shell .content{padding-top:26px;}
.crm-shell .kpi{padding:22px;}
.crm-shell .kpi::after{left:22px;right:22px;top:0;bottom:auto;width:auto;height:3px;border-radius:0 0 4px 4px;opacity:.7;}
.crm-shell .kpi .label{font-size:10px;line-height:1.6;}
.crm-shell .kpi .value{margin-top:12px;font-size:30px;line-height:1.2;}
.crm-shell .kpi .delta{margin-top:10px;}
.crm-shell .section-title h2{font-size:16px;letter-spacing:-.025em;}
.crm-shell .kanban-col{background:#f0ede7;}
.crm-shell .kanban-col-head{padding:2px 2px 10px;}
.crm-shell .kcard{padding:16px;border-color:#e7e2da;}
.crm-shell th{padding-top:14px;padding-bottom:14px;}
.crm-shell td{padding-top:15px;padding-bottom:15px;}
.workspace-intro{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:28px 30px;margin-bottom:22px;border:1px solid #d8e0fa;border-radius:20px;background:linear-gradient(115deg,#e8ecfd 0%,#f3f5ff 60%,#fbf9f6 100%);}
.workspace-intro .workspace-eyebrow{color:var(--teal-dark);}
.workspace-intro h2{font-size:27px;line-height:1.3;margin:8px 0;letter-spacing:-.04em;}
.workspace-intro p{color:var(--muted);font-size:13px;line-height:1.7;margin:0;max-width:56ch;}
.workspace-intro-actions{display:flex;gap:10px;flex-wrap:wrap;flex-shrink:0;}
.workspace-intro-actions .btn{min-height:44px;}
/* A single, recognizable sign-in experience for staff and customers. */
.auth-screen{width:100%;min-height:100svh;padding:36px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 0 0,#e8ecfd,transparent 48%),var(--paper);}
.auth-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:68px;max-width:1120px;width:100%;}
.auth-story{min-height:540px;position:relative;overflow:hidden;border-radius:28px;padding:48px 42px;display:flex;flex-direction:column;justify-content:center;background:radial-gradient(ellipse at 110% 0,rgba(47,86,217,.55),transparent 55%),#1b1922;color:#fbf9f6;}
.auth-story .workspace-eyebrow{color:#c2cffe;}
.auth-story h1{font-size:clamp(32px,3.4vw,46px);line-height:1.18;letter-spacing:-.05em;margin:26px 0 20px;font-weight:600;}
.auth-story h1 em{color:#a9bbf7;font-style:normal;}
.auth-story>p{font-size:14px;line-height:1.8;color:#c8c1b7;max-width:38ch;margin:0;}
.auth-capabilities{display:flex;flex-wrap:wrap;gap:8px;margin-top:25px;}
.auth-capabilities span{padding:7px 11px;font-size:10px;font-weight:600;color:#ded9d2;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.03);border-radius:999px;}
.auth-story-note{margin-top:48px;padding-top:24px;border-top:1px solid rgba(255,255,255,.12);display:flex;align-items:center;gap:14px;}
.auth-story-note strong{font-size:12px;font-weight:600;}
.auth-story-note p{font-size:11px;color:#a49b8e;margin:3px 0 0;line-height:1.7;}
.auth-story-mark{width:50px;height:50px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#fbf9f6;flex-shrink:0;}
.auth-form-wrap{width:100%;max-width:440px;justify-self:center;}
.auth-card{width:100%;max-width:none;border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow-md);padding:34px 32px;background:#fff;}
.auth-brand{margin-bottom:28px;}
.auth-title{font-family:var(--f-head);font-size:25px;line-height:1.35;letter-spacing:-.035em;margin:0 0 8px;font-weight:650;}
.auth-description{font-size:13px;color:var(--muted);line-height:1.7;margin:0 0 26px;}
.auth-foot{text-align:center;font-size:11px;color:var(--muted-2);margin:18px 0 0;line-height:1.6;}
.auth-label{display:block;font-size:12px;color:var(--muted);font-weight:650;margin-bottom:7px;}
.auth-card input:not([type=checkbox]){min-height:46px;background:#fff!important;border-radius:11px!important;font-size:15px!important;padding:12px 14px!important;}
.auth-card input:focus{outline:2px solid var(--teal);outline-offset:2px;}
.auth-card .btn-primary{min-height:46px;}
/* The customer workspace has a stable navigation rail on larger screens. */
.portal-shell #app{max-width:1340px;padding:24px 24px 48px;}
.portal-shell #app:has(.auth-screen){max-width:none;padding:0;}
.portal-shell .topbar{padding:28px 32px;border-radius:24px;box-shadow:var(--shadow-md);}
.portal-shell .topbar-inner{position:relative;max-width:none;}
.portal-shell .brand-name{font-size:18px;}
.portal-shell .brand-sub{color:#bbb2a5;}
.portal-shell .portal-header-actions{position:absolute;top:0;right:0;display:flex;gap:10px;}
.portal-shell .portal-header-actions .btn{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.18);color:#fff;text-decoration:none;font-size:12px;}
.portal-shell .portal-header-actions .btn:hover{background:rgba(255,255,255,.13);}
.portal-account-heading{margin-top:30px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;}
.portal-account-heading .workspace-eyebrow{color:#a9bbf7;}
.portal-shell .company-name{margin-top:7px;font-size:30px;line-height:1.3;overflow-wrap:anywhere;}
.portal-shell .status-row{margin:0;flex-wrap:wrap;justify-content:flex-end;}
.portal-shell .content{padding:0;margin-top:24px;}
.portal-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px;align-items:start;}
.portal-shell .portal-navigation{display:flex;flex-direction:column;gap:5px;padding:12px;position:sticky;top:24px;overflow:visible;box-shadow:var(--shadow-sm);margin:0;}
.portal-nav-title{padding:10px 12px 12px;font-size:9px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:700;}
.portal-shell .portal-navigation .tab{display:flex;align-items:center;gap:10px;text-align:left;white-space:normal;min-height:43px;padding:11px 12px;border:0;border-radius:11px;background:transparent;color:var(--muted);font:600 12px var(--f-body);line-height:1.5;}
.portal-shell .portal-navigation .tab:hover{background:var(--border-2);color:var(--text);}
.portal-shell .portal-navigation .tab.active{background:var(--teal-light);color:var(--teal-dark);}
.portal-nav-icon{flex-shrink:0;}
.portal-shell .portal-navigation .tab .tab-n{margin-left:auto;}
.portal-shell .portal-navigation .tab.active .tab-n{background:var(--teal);color:#fff;}
.portal-main{min-width:0;}
.portal-view-heading{margin-bottom:22px;}
.portal-view-heading .workspace-eyebrow{color:var(--teal-dark);}
.portal-view-heading h1{font-size:25px;line-height:1.3;letter-spacing:-.04em;margin:6px 0;}
.portal-view-heading p{font-size:12.5px;line-height:1.7;color:var(--muted);margin:0;}
.portal-shell .card{padding:24px;margin-bottom:18px;}
.portal-shell .card h3{font-size:15px;letter-spacing:-.025em;}
.portal-shell .stat-card{padding:20px;position:relative;overflow:hidden;}
.portal-shell .stat-card .value{font-size:28px;line-height:1.3;margin-top:10px;overflow-wrap:anywhere;}
.portal-shell .stat-card .label{line-height:1.5;}
.portal-shell .kv{gap:16px;line-height:1.6;}
.portal-shell .kv .v{min-width:0;overflow-wrap:anywhere;}
.portal-shell .footer-note{border-top:1px solid var(--border);padding:20px 0 0;margin-top:22px;font-size:11px;line-height:1.8;}
.portal-shell .modal-overlay{padding:24px;}
.portal-shell .modal{max-height:calc(100dvh - 48px);overscroll-behavior:contain;}
.portal-shell .close-x{width:40px;height:40px;flex-shrink:0;}
.portal-shell .two-up{gap:0 18px;grid-template-columns:minmax(0,1fr);}
@media(min-width:1140px){.portal-shell .two-up{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1100px){.workspace-intro{align-items:flex-start;flex-direction:column;gap:20px;}.auth-layout{gap:32px;}.auth-story{padding:36px 30px;}.auth-card{padding:28px 24px;}}
@media(max-width:860px){
  .crm-shell .sidebar{width:min(310px,86vw);}
  .crm-shell .topbar{padding:16px;}
  .crm-shell .topbar h1{font-size:21px;}
  .crm-shell .kpi{padding:17px 15px;}
  .crm-shell .kpi .value{font-size:25px;}
  .crm-shell .content{padding-top:20px;}
  .portal-shell #app{padding:16px 16px 40px;}
  .portal-shell .topbar{padding:24px;}
  .portal-layout{grid-template-columns:minmax(0,1fr);gap:18px;}
  .portal-shell .portal-navigation{flex-direction:row;overflow-x:auto;position:relative;top:auto;padding:6px;gap:4px;scrollbar-width:thin;}
  .portal-shell .portal-navigation .tab{flex:0 0 auto;white-space:nowrap;min-height:44px;}
  .portal-nav-title{display:none;}
  .portal-shell .portal-navigation .tab .tab-n{margin-left:0;}
  .portal-shell .portal-header-actions{position:static;margin-top:20px;}
  .portal-account-heading{margin-top:22px;align-items:flex-start;flex-direction:column;gap:12px;}
  .portal-shell .status-row{justify-content:flex-start;}
  .auth-layout{grid-template-columns:minmax(0,1fr);gap:0;max-width:440px;}
  .auth-story{display:none;}
  .auth-screen{padding:28px 20px;}
}
@media(max-width:600px){
  .crm-shell .topbar{padding-top:calc(16px + env(safe-area-inset-top));}
  .crm-shell .kpi{padding:16px 13px;}
  .crm-shell .kpi .value{font-size:clamp(17px,4.5vw,23px);}
  .crm-shell .kpi::after{left:13px;right:13px;}
  .workspace-intro{padding:22px 20px;border-radius:16px;}
  .workspace-intro h2{font-size:23px;}
  .workspace-intro-actions{width:100%;}
  .workspace-intro-actions .btn{flex:1;}
  .btn{min-height:44px;}
  .crm-shell .mobile-table td{padding:8px;}
  .portal-shell #app{padding:12px 12px calc(32px + env(safe-area-inset-bottom));}
  .portal-shell .topbar{padding:22px 20px;border-radius:20px;}
  .portal-shell .company-name{font-size:25px;}
  .portal-shell .portal-header-actions{flex-wrap:wrap;gap:8px;}
  .portal-shell .content{margin-top:16px;}
  .portal-shell .card{padding:18px;}
  .portal-shell .stat-grid{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr));}
  .portal-shell .stat-card{padding:16px 13px;}
  .portal-shell .stat-card .value{font-size:21px;}
  .portal-shell .stat-card .label{font-size:9px;letter-spacing:.04em;}
  .portal-view-heading{margin-bottom:18px;}
  .portal-view-heading h1{font-size:23px;}
  .portal-shell .kv{font-size:12px;gap:12px;}
  .portal-mobile-table{display:block;width:100%;min-width:0!important;}
  .portal-mobile-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
  .portal-mobile-table tbody{display:block;}
  .portal-mobile-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:10px;border-bottom:1px solid var(--border);}
  .portal-mobile-table td{display:block;border:0;padding:8px!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;font-size:12px;}
  .portal-mobile-table td:first-child,.portal-mobile-table td:last-child{grid-column:1/-1;}
  .portal-mobile-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;}
  .portal-shell .field input,.portal-shell .field select{font-size:16px;min-height:46px;}
  .portal-shell .modal-overlay{padding:12px;align-items:center;}
  .portal-shell .modal{max-height:calc(100dvh - 24px);border-radius:20px;padding:22px 18px calc(22px + env(safe-area-inset-bottom));}
  .auth-card{padding:28px 22px;}
  .auth-card input:not([type=checkbox]){font-size:16px!important;}
  .auth-title{font-size:23px;}
}
@media(prefers-reduced-motion:reduce){.btn,.progress-fill,.field input,.field select,.field textarea{transition:none;}}
