/* LG Studio 5.0 — Premium interface layer.
 * Visual-only layer on top of the working LG Studio 4.1.3 application.
 * No customer data, authentication or sync logic is modified here.
 */
:root{
  --ink:#18243b;
  --muted:#6f7f97;
  --border:#e2e8f1;
  --teal:#6458eb;
  --green:#29bfaf;
  --pale:#f0edff;
  --bg:#f5f7fb;
  --shadow:0 8px 30px rgba(24,39,73,.045),0 2px 7px rgba(24,39,73,.025);
  --shadow-strong:0 22px 54px rgba(17,29,64,.14);
  --ui-surface:#fff;
  --ui-elevated:#fff;
  --ui-soft:#f5f7fd;
  --ui-heading:#14213a;
  --ui-outline:#e3e9f3;
  --ui-primary:#6256e8;
  --ui-primary-soft:#f0eeff;
  --ui-frost:rgba(255,255,255,.87);
  --ui-table:#f8faff;
  --ui-sidebar:#10192c;
  --ui-radius:20px;
  color-scheme:light;
}
html,body{min-height:100%;}
html{scroll-behavior:smooth;scroll-padding-top:95px}
body{background:linear-gradient(160deg,#f9fafe 0%,#f3f6fb 58%,#f4f8fa 100%);color:var(--ink);font-family:Inter,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;font-size:13.5px;line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body::before,body::after{display:none}
button,input,select,textarea{font-family:inherit}
button{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid rgba(99,89,231,.42);outline-offset:2px}
::selection{background:rgba(100,85,239,.20);color:#222256}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-thumb{background:#b8c5d9;border:2px solid transparent;border-radius:12px;background-clip:padding-box}
::-webkit-scrollbar-track{background:transparent}

/* Shell and workspace */
.shell{align-items:stretch;min-height:100dvh}
.main-wrap{min-width:0;width:calc(100% - 264px);min-height:100dvh}
.sidebar{flex:0 0 264px;width:264px;min-height:100dvh;height:100dvh;position:sticky;top:0;padding:25px 15px 17px;background:radial-gradient(circle at 120% -5%,rgba(105,91,231,.23),transparent 40%),linear-gradient(169deg,#121e35 0%,#111a30 55%,#0b1729 100%);border-right:1px solid rgba(255,255,255,.08);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:rgba(165,181,219,.5) transparent;box-shadow:9px 0 30px rgba(26,39,71,.025)}
.sidebar::before{right:-76px;top:-92px;opacity:.63}
.sidebar::after{bottom:24px;opacity:.3}
.brand{gap:12px;padding:0 10px 27px}
.brand-icon{width:45px;height:45px;border-radius:14px;background:linear-gradient(150deg,#fff,#e9eeff 59%,#d7fff3);font-size:19px;box-shadow:0 8px 23px rgba(0,0,0,.12)}
.brand strong{font-size:19px;letter-spacing:-.8px}
.brand small{font-size:8px;letter-spacing:1.3px;color:#9fb4d4}
.side-label{font-size:9px;letter-spacing:1.8px;margin:9px 12px 10px;color:#8195b7}
.side-label-bottom{margin-top:19px}
.sidebar .sidebar-nav{gap:4px;display:grid}
.sidebar .nav-link{min-height:49px;padding:7px 9px;border-radius:13px;gap:11px;font-size:12.3px;line-height:1.26;font-weight:650;letter-spacing:-.1px;transform:none;position:relative}
.sidebar .nav-link:hover{transform:none;background:rgba(255,255,255,.067);border-color:rgba(255,255,255,.06)}
.sidebar .nav-link.active{background:linear-gradient(105deg,rgba(108,101,246,.27),rgba(33,191,177,.12));border-color:rgba(133,155,247,.25);box-shadow:0 4px 14px rgba(8,12,31,.12),inset 3px 0 0 #a59cff}
.sidebar .nav-ico{width:34px;height:34px;flex:0 0 34px;border-radius:10px;box-shadow:none;background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.045)}
.sidebar .nav-ico svg{width:19px;height:19px}
.sidebar .nav-link.active .nav-ico{background:linear-gradient(145deg,#7971ff,#5a74ea 67%,#3bbaa9);box-shadow:0 5px 13px rgba(78,78,181,.27)}
.sidebar-bottom{margin-top:23px;padding:19px 7px 5px;gap:11px}
.sidebar-bottom .signal{width:8px;height:8px}
.sidebar-bottom b{font-size:11px}
.sidebar-bottom span:last-child{font-size:10px}
.nav-text{min-width:0;display:block;overflow-wrap:anywhere}
.sidebar-nav button[title]{cursor:pointer}

/* Header and layout */
.topbar{height:78px;padding:0 34px;gap:15px;background:var(--ui-frost);border-bottom:1px solid var(--ui-outline);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 1px 2px rgba(25,42,81,.02)}
.breadcrumbs{color:#8d9ab0;font-size:10px;letter-spacing:1.12px;white-space:nowrap}
.breadcrumbs b{color:#566986}
.top-actions{gap:9px}
.date-pill,#syncStatus,.top-actions .save-pill{border-radius:13px;min-height:35px;display:inline-flex;align-items:center;box-shadow:none;border:1px solid var(--ui-outline);font-size:10.5px;font-weight:700;line-height:1.2}
.date-pill{padding:9px 12px;color:#6f7d90;background:var(--ui-surface)}
#syncStatus{background:#f1f5ff;color:#545dd0;border-color:#dfe7fa;max-width:175px}
.save-pill{background:#effbf6;color:#16846c;border:1px solid #dcf3e7;padding:8px 11px}
.main{max-width:1560px;margin:0 auto;padding:32px 34px 90px}
.page-heading{margin-bottom:25px;gap:20px}
.page-heading h1{font-size:32px;font-weight:800;letter-spacing:-1.3px;color:var(--ui-heading)}
.page-heading p{margin-top:8px;color:var(--muted);font-size:12.5px}
.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:850;color:#7466eb;margin-bottom:8px}
.section-title{font-size:14px;font-weight:790;color:var(--ui-heading);letter-spacing:-.2px}

/* Theme / navigation controls — functional controls installed by premium-ui.js */
.lg-ui-control{border:1px solid var(--ui-outline);background:var(--ui-surface);color:var(--ui-heading);width:37px;height:37px;min-width:37px;border-radius:12px;display:inline-grid;place-items:center;padding:0;box-shadow:0 3px 10px rgba(23,35,64,.035);transition:background .17s ease,color .17s ease,transform .17s ease,border-color .17s ease}
.lg-ui-control:hover{background:var(--ui-primary-soft);border-color:#cec9fa;transform:translateY(-1px)}
.lg-ui-control svg{width:18px;height:18px;display:block}
#lg-sidebar-collapse{margin-right:3px}
.lg-theme-dark #lg-theme-toggle .sun{display:block}
.lg-theme-dark #lg-theme-toggle .moon{display:none}
#lg-theme-toggle .sun{display:none}
#lg-theme-toggle .moon{display:block}

/* Buttons and interaction */
.btn{border:1px solid var(--ui-outline);border-radius:12px;min-height:40px;padding:10px 15px;background:var(--ui-surface);color:var(--ui-heading);font-size:12px;font-weight:750;box-shadow:0 2px 5px rgba(22,35,70,.025);transition:background .17s ease,box-shadow .17s ease,border-color .17s ease,transform .17s ease}
.btn:hover{transform:translateY(-1px);border-color:#c8ccef;box-shadow:0 8px 20px rgba(32,45,85,.085)}
.btn:active{transform:translateY(0) scale(.99)}
.btn-primary{border:1px solid transparent;background:linear-gradient(115deg,#695de8,#665fe9 48%,#2dbda9);color:#fff;box-shadow:0 7px 18px rgba(92,85,219,.19)}
.btn-primary:hover{border-color:transparent;box-shadow:0 9px 23px rgba(83,74,212,.26)}
.btn-light{background:var(--ui-primary-soft);color:#5d54d2;border-color:#e4defe}
.btn-dark{background:#172540;color:#fff;border-color:#26344d}
.btn-plain{color:#6056de;font-size:12px}
.btn-red{background:#fff1f5;color:#c7476c;border-color:#fbdce5}

/* Main information architecture */
.metrics{gap:15px;margin-bottom:23px}
.metric{background:var(--ui-elevated);border:1px solid var(--ui-outline);box-shadow:var(--shadow);border-radius:19px;min-height:136px;padding:21px 20px;transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease}
.metric::before{height:3px;background:linear-gradient(90deg,#7568f1 0%,#41bbab 80%);opacity:.82}
.metric:nth-child(2n)::before{background:linear-gradient(90deg,#40bea8,#7498f6)}
.metric:nth-child(3n)::before{background:linear-gradient(90deg,#8a84f4,#a5beef)}
.metric:hover{border-color:#d1d6f2;box-shadow:0 13px 27px rgba(22,35,73,.07);transform:translateY(-2px)}
.metric-top{font-weight:680;color:var(--muted);font-size:11px}
.metric-icon{width:41px;height:41px;display:grid;place-items:center;background:linear-gradient(145deg,#f1f0ff,#e9fbf7);border-radius:12px;color:#6559e9;font-size:18px}
.metric-value{font-size:29px;font-weight:810;line-height:1.12;letter-spacing:-1.1px;margin-top:12px;color:var(--ui-heading)}
.metric-note{font-size:10.5px;color:#91a0b4}
.card{background:var(--ui-surface);border-radius:var(--ui-radius);border:1px solid var(--ui-outline);box-shadow:var(--shadow)}
.card-head{padding:23px 23px 16px}
.card-head h2{font-size:15px;font-weight:780;letter-spacing:-.3px;color:var(--ui-heading)}
.card-body{padding:0 23px 23px}
.card-subtitle{font-size:11.5px;color:var(--muted)}
.panel-pad{padding:23px}
.welcome-banner{padding:31px 31px;margin-bottom:24px;min-height:161px;border:1px solid rgba(255,255,255,.08);border-radius:22px;box-shadow:0 15px 33px rgba(34,42,83,.16);background:radial-gradient(ellipse at 93% -40%,rgba(95,222,204,.48),transparent 43%),linear-gradient(112deg,#131e3a 0%,#202f5a 50%,#236c76 100%)}
.welcome-banner::after{right:-48px;bottom:-95px;width:310px;height:310px;background:radial-gradient(circle,rgba(93,223,204,.19),rgba(255,255,255,0) 68%)}
.welcome-banner .banner-kicker{color:#8debd6;font-size:10px;letter-spacing:2.4px}
.welcome-banner h2{font-size:24px;font-weight:790;letter-spacing:-.65px}
.welcome-banner p{color:#dce9f8}
.welcome-banner .btn{color:#524bd5;border-radius:12px;background:#fff;box-shadow:0 8px 15px rgba(5,14,35,.08)}
.home-quick{gap:13px}
.quick-link{background:var(--ui-elevated);border:1px solid var(--ui-outline);border-radius:18px;box-shadow:var(--shadow);padding:20px;min-height:122px}
.quick-link:hover{border-color:#cbd3f5;box-shadow:0 10px 25px rgba(27,41,80,.07)}
.quick-link>span{color:#7568e9}
.quick-link b{color:var(--ui-heading)}
.quick-link small{color:var(--muted)}

/* Lists, tables, tags */
.toolbar{gap:14px}
.search,.select-filter{background:var(--ui-surface);border:1px solid var(--ui-outline);border-radius:12px;box-shadow:0 2px 4px rgba(22,34,68,.025);color:var(--ink);min-height:43px}
.search:focus,.select-filter:focus{border-color:#8379ef;outline:3px solid rgba(117,103,239,.12)}
.data-table{border-collapse:separate;border-spacing:0;min-width:650px}
.data-table thead th{background:var(--ui-table);border-bottom:1px solid var(--ui-outline);padding:14px 17px;letter-spacing:1px;font-size:9.6px;color:#8190a5}
.data-table td{padding:16px 17px;border-color:var(--ui-outline);font-size:11.8px}
.data-table tbody tr{transition:background .15s ease}
.data-table tbody tr:hover{background:var(--ui-soft)}
.name-cell b{color:var(--ui-heading);font-size:12.4px}
.chip,.tag{font-weight:760;letter-spacing:.05px}
.chip{padding:5px 10px}
.tag{background:#f1efff;color:#655bd8;padding:5px 9px}
.client-row,.timeline-item,.report-stat{border-color:var(--ui-outline)}
.client-row{background:var(--ui-elevated);border-radius:14px}
.client-row:hover{background:var(--ui-soft)}
.avatar{background:linear-gradient(150deg,#efeeff,#e0f7f5);color:#6658e7}
.empty-symbol{background:#eeefff;color:#6256e8}

/* Forms and dialogs */
.form-field label,.form-label,.quote-row label{color:#596983;font-size:11px;font-weight:750}
.form-field input,.form-field select,.form-field textarea,.quote-row input,.quote-row select,.quote-row textarea,.quote-browser-filters input,.quote-browser-filters select{background:var(--ui-elevated);border:1px solid #dce4ef;border-radius:12px;color:var(--ink);font-size:12.5px;min-height:44px;padding:11px 13px;box-shadow:none;transition:border-color .16s ease,box-shadow .16s ease}
.form-field input:focus,.form-field textarea:focus,.form-field select:focus,.quote-row input:focus,.quote-row textarea:focus,.quote-row select:focus{outline:none;border-color:#8c81ee;box-shadow:0 0 0 3px rgba(106,88,232,.12)}
.form-field textarea,.quote-row textarea{min-height:90px;resize:vertical}
input::placeholder,textarea::placeholder{color:#9ca8b8}
.check-item,.check-grid>label{border-radius:12px}
.check-item input, input[type="checkbox"]{accent-color:#6558e9}
dialog{border:1px solid var(--ui-outline);border-radius:22px;max-height:calc(100dvh - 30px);background:var(--ui-surface);box-shadow:0 28px 75px rgba(8,19,47,.23);padding:27px 29px}
dialog::backdrop{background:rgba(13,22,41,.53);backdrop-filter:blur(3px)}
.modal-heading h2{color:var(--ui-heading)}
.hint-warning{border-radius:14px}
.status-well,.summary-top{border-radius:16px}
.quote-panel{border-radius:20px}
.quote-row{border-top:1px solid var(--ui-outline)}
.quote-browser,.company-quote-picked{background:var(--ui-soft);border:1px solid var(--ui-outline);border-radius:16px}
.catalog-browser-item,.company-quote-item,.category-card,.category-mini-service{border-color:var(--ui-outline)}
.catalog-browser-item,.company-quote-item,.category-card{background:var(--ui-elevated);border-radius:13px}
.catalog-browser-item:hover,.company-quote-item:hover,.category-card:hover{border-color:#cfcbf8}
.category-card:has(input:checked){background:#f8f7ff;border-color:#9d95ea}
.category-mini-service>div b,.catalog-browser-main>strong,.company-quote-item b,.category-service-option b{color:var(--ui-heading)}
.quote-browser-top h3,.quote-selected-heading h3{color:var(--ui-heading)}
.company-chosen-item{background:var(--ui-soft)}
.quote-row textarea[data-line-field="description"]{background:var(--ui-elevated);color:var(--ink);border-radius:12px}
.timeline-item{background:var(--ui-elevated)}
.calendar-wrap{border-radius:18px;border-color:var(--ui-outline)}
.cal-day{background:var(--ui-elevated)}
.toast{border-radius:14px;box-shadow:0 15px 38px rgba(13,24,52,.22)}

/* Unlock / login visual redesign — no changes to authentication */
.vault-screen{background:linear-gradient(155deg,#f7f8fd,#f1f5fb)}
.vault-art{background:radial-gradient(circle at 68% 14%,rgba(113,103,249,.28),transparent 43%),radial-gradient(circle at 21% 89%,rgba(39,198,181,.18),transparent 39%),linear-gradient(142deg,#121d36,#1a2650 61%,#174654)}
.vault-art-hero{letter-spacing:-1.8px}
.vault-login-card{background:#fff;border:1px solid #e7e9f5;border-radius:24px;box-shadow:0 22px 60px rgba(23,37,75,.075)}
.vault-submit{background:linear-gradient(110deg,#675ae8,#32bba9)!important;border-radius:12px!important;box-shadow:0 9px 23px rgba(89,85,209,.17)}
.vault-login-card input{border-radius:12px}
.vault-remember,.vault-auto-opt{border-radius:13px}

/* Desktop collapsed mode; text remains accessible via title attributes */
@media(min-width:851px){
 html.lg-nav-collapsed .sidebar{flex-basis:83px;width:83px;padding:24px 13px 17px}
 html.lg-nav-collapsed .main-wrap{width:calc(100% - 83px)}
 html.lg-nav-collapsed .brand{padding:0 0 28px;justify-content:center}
 html.lg-nav-collapsed .brand-icon{flex:0 0 45px}
 html.lg-nav-collapsed .brand>div:last-child,html.lg-nav-collapsed .side-label,html.lg-nav-collapsed .nav-text,html.lg-nav-collapsed .sidebar-bottom>div{display:none}
 html.lg-nav-collapsed .sidebar-nav{gap:8px}
 html.lg-nav-collapsed .sidebar .nav-link{width:57px;min-height:53px;padding:8px 10px;justify-content:center;gap:0;border-radius:14px;margin-left:0}
 html.lg-nav-collapsed .sidebar .nav-link.active{box-shadow:inset 0 0 0 1px rgba(173,161,255,.17)}
 html.lg-nav-collapsed .sidebar .nav-ico{width:35px;height:35px;flex-basis:35px}
 html.lg-nav-collapsed .sidebar-bottom{justify-content:center;margin-top:20px;padding:18px 0}
}

/* Dark mode — visual preference only, no effect on encrypted data or session */
html.lg-theme-dark{
  --ink:#e7ecf7;--muted:#9daac3;--border:#2d3a55;--bg:#101a2c;--white:#18263b;
  --ui-surface:#1a2840;--ui-elevated:#202f48;--ui-soft:#1d2d46;--ui-heading:#f2f6ff;--ui-outline:#2d3d58;--ui-primary:#aca5ff;--ui-primary-soft:#2a2b52;--ui-frost:rgba(22,35,56,.9);--ui-table:#1d2d45;
  --shadow:0 7px 28px rgba(0,0,0,.10);color-scheme:dark;
}
.lg-theme-dark body{background:linear-gradient(150deg,#101928,#17243b 60%,#142638);color:var(--ink)}
.lg-theme-dark .topbar,.lg-theme-dark .date-pill,.lg-theme-dark .lg-ui-control,.lg-theme-dark .search,.lg-theme-dark .select-filter,.lg-theme-dark .btn:not(.btn-primary):not(.btn-dark):not(.btn-red){background:var(--ui-surface);color:var(--ink);border-color:var(--ui-outline)}
.lg-theme-dark .card,.lg-theme-dark .metric,.lg-theme-dark .quick-link{background:var(--ui-surface);border-color:var(--ui-outline)}
.lg-theme-dark .main .card:hover,.lg-theme-dark .metric:hover{box-shadow:0 14px 31px rgba(0,0,0,.14)}
.lg-theme-dark .section-title,.lg-theme-dark .page-heading h1,.lg-theme-dark .card h2,.lg-theme-dark .metric-value,.lg-theme-dark .quick-link b,.lg-theme-dark .name-cell b,.lg-theme-dark .modal-heading h2{color:var(--ui-heading)}
.lg-theme-dark .metric-icon,.lg-theme-dark .avatar{background:#32345d;color:#ccc6ff}
.lg-theme-dark .data-table th,.lg-theme-dark .data-table thead th{background:var(--ui-table);color:#a3b1c8;border-color:var(--ui-outline)}
.lg-theme-dark .data-table td,.lg-theme-dark .report-stat,.lg-theme-dark .quote-row{border-color:var(--ui-outline)}
.lg-theme-dark .data-table tbody tr:hover{background:#23324d}
.lg-theme-dark .client-row,.lg-theme-dark .timeline-item,.lg-theme-dark .category-card,.lg-theme-dark .category-mini-service,.lg-theme-dark .catalog-browser-item,.lg-theme-dark .company-quote-item,.lg-theme-dark .company-chosen-item{background:var(--ui-elevated);border-color:var(--ui-outline);color:var(--ink)}
.lg-theme-dark .client-row:hover{background:#283957}
.lg-theme-dark .tag,.lg-theme-dark .chip.blue{background:#31375c;color:#c5c4ff}
.lg-theme-dark .chip.gray{background:#30405a;color:#cad4e7}
.lg-theme-dark .chip.green{background:#1d4c45;color:#90ebd2}
.lg-theme-dark .chip.amber{background:#4e402c;color:#ffdea0}
.lg-theme-dark .chip.red{background:#502e43;color:#ffabc7}
.lg-theme-dark .quote-browser,.lg-theme-dark .company-quote-picked,.lg-theme-dark .summary-top,.lg-theme-dark .alert-panel{background:var(--ui-soft);border-color:var(--ui-outline)}
.lg-theme-dark .form-field input,.lg-theme-dark .form-field select,.lg-theme-dark .form-field textarea,.lg-theme-dark .quote-row input,.lg-theme-dark .quote-row select,.lg-theme-dark .quote-row textarea,.lg-theme-dark .catalog-browser-item input,.lg-theme-dark .quote-browser-filters input,.lg-theme-dark .quote-browser-filters select,.lg-theme-dark .quote-row textarea[data-line-field="description"]{background:#152339;color:var(--ink);border-color:#3b4b68}
.lg-theme-dark .form-field label,.lg-theme-dark .form-label,.lg-theme-dark .quote-row label{color:#b8c7de}
.lg-theme-dark .category-card:has(input:checked){background:#33345a;border-color:#7775e3}
.lg-theme-dark .category-mini-service b,.lg-theme-dark .category-service-option b,.lg-theme-dark .company-quote-item b,.lg-theme-dark .catalog-browser-main>strong{color:var(--ui-heading)}
.lg-theme-dark dialog{background:var(--ui-surface);border-color:var(--ui-outline);color:var(--ink)}
.lg-theme-dark .calendar-head{background:#292e54;color:#d0c7ff}
.lg-theme-dark .calendar-grid{background:#26344b}
.lg-theme-dark .cal-day{background:var(--ui-elevated)}
.lg-theme-dark .cal-day.cal-empty{background:#202e47}
.lg-theme-dark .cal-number,.lg-theme-dark .modal-heading p,.lg-theme-dark .muted,.lg-theme-dark .tiny,.lg-theme-dark .card-subtitle{color:#acbad1}
.lg-theme-dark .cal-event{background:#33355e;color:#ddd4ff}
.lg-theme-dark .hint-warning{background:#3e3638;color:#e4cdb8;border-color:#594e49}
.lg-theme-dark .status-well{background:#233b4a;color:#a6e7db;border-color:#36515b}
.lg-theme-dark .alert-item{background:var(--ui-elevated);border-color:var(--ui-outline);color:#b1aaff}
.lg-theme-dark .alert-item b{color:var(--ui-heading)}
.lg-theme-dark .report-stat strong{color:#aaa2ff}
.lg-theme-dark .quick-link small,.lg-theme-dark .metric-note{color:#a6b2c8}
.lg-theme-dark .vault-screen{background:#131e31}
.lg-theme-dark .vault-login-card{background:#1c2c44;border-color:#34435b;color:var(--ink)}
.lg-theme-dark .vault-login-card h1,.lg-theme-dark .vault-login-card strong{color:#f2f5ff}
.lg-theme-dark .vault-login-card input{background:#142239;color:#f2f5ff;border-color:#3c4b65}
.lg-theme-dark .vault-remember,.lg-theme-dark .vault-auto-opt{background:#243450;border-color:#394863;color:var(--ink)}
.lg-theme-dark .vault-security,.lg-theme-dark .vault-login-card p{color:#b5c2d5}
.lg-theme-dark #syncStatus{color:#c3c5ff;background:#2a3359;border-color:#404772}
.lg-theme-dark .save-pill{background:#1e433f;color:#91e0ce;border-color:#2e6259}
.lg-theme-dark .btn-light{background:#33355e!important;color:#ddd7ff!important;border-color:#47477e!important}
.lg-theme-dark .btn-red{background:#442b40!important;color:#ffb4d0!important;border-color:#6d415c!important}
.lg-theme-dark .breadcrumbs b{color:#c1cbde}

/* Small screens: preserve existing bottom navigation and sidebar scrolling */
@media(max-width:1180px){
 .topbar{padding:0 21px}
 .main{padding:27px 22px 75px}
 .top-actions{gap:7px}
 .date-pill{display:none}
}
@media(max-width:850px){
 .sidebar{width:min(305px,84vw);flex-basis:auto;position:fixed;left:-310px;top:0;height:100dvh;padding:25px 15px 25px;z-index:90}
 .sidebar.open{left:0}
 .main-wrap{width:100%}
 #lg-sidebar-collapse{display:none}
 .topbar{height:69px;padding:0 15px}
 .breadcrumbs{display:block;max-width:40vw;overflow:hidden;text-overflow:ellipsis}
 .main{padding:24px 16px 124px}
 .page-heading h1{font-size:29px}
 .metric{min-height:116px;padding:16px}
 .metric-value{font-size:25px}
 .welcome-banner{min-height:0;padding:24px;border-radius:21px}
 .welcome-banner h2{font-size:23px}
 .card{border-radius:18px}
 .mobile-bottom{background:var(--ui-frost);border-top:1px solid var(--ui-outline);box-shadow:0 -12px 33px rgba(20,30,58,.08)}
 .mobile-bottom button{border-radius:13px;color:#73839a}
 .mobile-bottom button.active{background:var(--ui-primary-soft);color:#6456e7}
 .lg-theme-dark .mobile-bottom button{color:#b1bed4}
 .lg-theme-dark .mobile-bottom button.active{color:#d8ccff}
 dialog{padding:22px 18px}
}
@media(max-width:540px){
 .main{padding:19px 12px 126px}
 .topbar{gap:8px;padding:0 11px}
 .lg-ui-control{min-width:34px;width:34px;height:34px;border-radius:10px}
 .breadcrumbs{font-size:9px;letter-spacing:.45px;max-width:33vw}
 .top-actions{gap:5px}
 #syncStatus{font-size:9.3px;max-width:121px;min-height:32px}
 .page-heading h1{font-size:25px}
 .page-heading p{font-size:11.6px}
 .page-heading{margin-bottom:19px}
 .metrics{gap:10px;margin-bottom:17px}
 .metric{border-radius:17px;padding:15px 12px;min-height:114px}
 .metric-value{font-size:23px}
 .metric-icon{width:35px;height:35px}
 .metric-top{font-size:10px}
 .welcome-banner{padding:22px;border-radius:20px;margin-bottom:18px}
 .welcome-banner h2{font-size:21px}
 .quick-link{padding:15px 13px;border-radius:15px}
 .card-head{padding:18px 16px 14px}
 .card-body{padding:0 16px 18px}
 .panel-pad{padding:17px}
 .toolbar{margin-bottom:13px}
 .vault-login-card{padding:24px 20px}
}
@media(max-width:375px){.breadcrumbs{display:none}.top-actions{margin-left:auto}#syncStatus{max-width:110px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Final polish and accessible contrast in the optional dark palette. */
.lg-theme-dark .client-row b,.lg-theme-dark .client-row strong,.lg-theme-dark .split-rows b,.lg-theme-dark .timeline-item strong{color:#f1f5ff}
.lg-theme-dark .client-row small,.lg-theme-dark .client-row .muted,.lg-theme-dark .timeline-item small{color:#b1bfd4}
.lg-theme-dark .welcome-banner .btn{background:#f3f8ff!important;color:#4539c5!important;border-color:transparent!important}
.lg-theme-dark .btn-plain{color:#bbb2ff}
.lg-theme-dark .quote-browser-top h3,.lg-theme-dark .quote-selected-heading h3,.lg-theme-dark .company-quote-picked-header h3{color:var(--ui-heading)}
.lg-theme-dark .form-field input::placeholder,.lg-theme-dark input::placeholder,.lg-theme-dark textarea::placeholder{color:#91a4bd}
.lg-theme-dark .calendar-wrap{border-color:var(--ui-outline)}
.lg-theme-dark .data-table tbody .btn{border-color:var(--ui-outline)}
.lg-theme-dark .empty h3{color:var(--ui-heading)}
.lg-theme-dark .xbtn{background:#273854;color:#e8effe}
.lg-theme-dark .modal-heading p{color:#afbed4}
@media(min-width:851px){
 .sidebar{transition:width .23s cubic-bezier(.2,.7,.2,1),flex-basis .23s cubic-bezier(.2,.7,.2,1)}
 .main-wrap{transition:width .23s cubic-bezier(.2,.7,.2,1)}
}
@media(max-width:850px){.sidebar{transition:left .22s cubic-bezier(.2,.7,.2,1)}}
@keyframes lg-appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference){
 .main>.page-heading,.main>.welcome-banner,.main>.metrics,.main>.home-quick,.main>.grid-2,.main>.quote-layout{animation:lg-appear .30s cubic-bezier(.2,.7,.2,1) both}
 .main>.metrics{animation-delay:45ms}
 .main>.grid-2,.main>.home-quick{animation-delay:65ms}
}


/* ===== LG Studio 5.2.2 — Premium Dark visual refresh ===== */
:root{
  --ink:#edf3ff;
  --muted:#97a5bb;
  --border:#243145;
  --teal:#7a6bff;
  --green:#22c7d6;
  --pale:#171f2f;
  --bg:#090b10;
  --shadow:0 18px 42px rgba(0,0,0,.34),0 2px 10px rgba(0,0,0,.22);
  --shadow-strong:0 30px 80px rgba(0,0,0,.46);
  --ui-surface:#101722;
  --ui-elevated:#131c29;
  --ui-soft:#182232;
  --ui-heading:#f7fbff;
  --ui-outline:#243145;
  --ui-primary:#7a6bff;
  --ui-primary-soft:#1c2140;
  --ui-frost:rgba(12,17,25,.88);
  --ui-table:#131d2a;
  --ui-sidebar:#0a0f17;
  color-scheme:dark;
}
html,body{background:#090b10;color:var(--ink)}
body{background:
 radial-gradient(circle at top right,rgba(122,107,255,.11) 0%,rgba(122,107,255,0) 24%),
 radial-gradient(circle at bottom left,rgba(34,199,214,.10) 0%,rgba(34,199,214,0) 28%),
 linear-gradient(180deg,#090b10 0%,#0b1017 100%);}
body::before,body::after{display:none!important}

.sidebar{background:
 radial-gradient(circle at 110% -5%,rgba(120,104,255,.24),transparent 34%),
 radial-gradient(circle at -10% 108%,rgba(34,199,214,.16),transparent 28%),
 linear-gradient(180deg,#090d14 0%,#0b1018 44%,#0a0f17 100%);
 border-right:1px solid rgba(255,255,255,.04);
 box-shadow:18px 0 46px rgba(0,0,0,.35);}
.brand{padding-bottom:30px}
.brand-icon{background:linear-gradient(145deg,#f7fbff 0%,#dce6ff 46%,#d8fff7 100%);box-shadow:0 16px 32px rgba(0,0,0,.25)}
.brand strong{font-size:22px;color:#fbfdff}
.brand small{color:#7e93b3}
.side-label{color:#62748f}
.sidebar .nav-link{color:#b7c4d9;border:1px solid transparent;background:transparent;border-radius:16px;min-height:52px;padding:8px 10px;transition:all .18s ease}
.sidebar .nav-link:hover{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.05);color:#fff;transform:translateX(1px)}
.sidebar .nav-link.active{background:linear-gradient(135deg,rgba(122,107,255,.22) 0%,rgba(34,199,214,.16) 100%);border-color:rgba(128,142,255,.24);box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 10px 26px rgba(0,0,0,.25)}
.sidebar .nav-ico{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.03);backdrop-filter:blur(6px)}
.sidebar .nav-link.active .nav-ico{background:linear-gradient(145deg,#7a6bff 0%,#5f78f3 58%,#22c7d6 100%);box-shadow:0 10px 22px rgba(53,80,200,.34)}
.sidebar-bottom{border-top:1px solid rgba(255,255,255,.05)}
.sidebar-bottom b{color:#e3ecfa}.sidebar-bottom span:last-child{color:#8092ad}

.main-wrap{background:transparent}
.topbar{background:rgba(10,14,21,.86);border-bottom:1px solid rgba(255,255,255,.05);box-shadow:0 8px 24px rgba(0,0,0,.22)}
.breadcrumbs{color:#7d8fa8}.breadcrumbs b{color:#d6e0ee}.breadcrumbs span{color:#405065}
.date-pill,.save-pill,#syncStatus,.lg-ui-control,.search,.select-filter,.top-actions .save-pill{background:#0f1621!important;color:#dce6f7!important;border-color:#243145!important;box-shadow:none}
.save-pill{background:rgba(19,80,67,.42)!important;color:#9fe9d6!important;border-color:#245147!important}
#syncStatus{background:rgba(41,47,88,.55)!important;color:#d2d6ff!important;border-color:#373f73!important}
.date-pill{color:#b5c3d8!important}
#lgGlobalSearch::placeholder{color:#70829d}

.main{padding-top:36px}
.page-heading h1,.section-title,.card-head h2,.modal-heading h2,.quick-link b,.metric-value,.data-table td strong,.detail-item strong{color:var(--ui-heading)}
.page-heading p,.card-subtitle,.tiny,.toolbar-count,.metric-note,.quick-link small,.form-help,.company-quote-meta,.data-table td,.muted,.page-heading small{color:var(--muted)}

.welcome-banner{background:
 radial-gradient(circle at 92% 8%,rgba(34,199,214,.18),transparent 22%),
 radial-gradient(circle at 16% 100%,rgba(122,107,255,.22),transparent 30%),
 linear-gradient(120deg,#0d121b 0%,#111827 50%,#102638 100%);
 border:1px solid rgba(120,136,170,.18);
 box-shadow:0 24px 64px rgba(0,0,0,.34)}
.welcome-banner h2{color:#f7fbff}
.welcome-banner p{color:#bac8da}
.welcome-banner .btn{background:#f9fbff;color:#4d43df;border-color:transparent}

.card,.metric,.quick-link,.client-row,.timeline-item,.category-card,.catalog-browser-item,.company-quote-item,.company-chosen-item,.quote-browser,.company-quote-picked,.calendar-wrap,.summary-notice,.status-well,.note-box,.alert-item{background:linear-gradient(180deg,#101722 0%,#131c29 100%);border-color:#243145;box-shadow:var(--shadow)}
.metric{border-radius:24px}.card{border-radius:24px}.quick-link{border-radius:20px}.client-row{border-radius:18px}
.metric::before{height:4px;background:linear-gradient(90deg,#7a6bff 0%,#22c7d6 100%)}
.metric-icon,.avatar,.empty-symbol{background:linear-gradient(145deg,rgba(122,107,255,.18),rgba(34,199,214,.14));color:#d8deff}
.metric:hover,.card:hover,.quick-link:hover{box-shadow:0 22px 54px rgba(0,0,0,.32);border-color:#31415b}

.btn{background:#111925;color:#e8effb;border-color:#243145;box-shadow:none}
.btn:hover{border-color:#334562;box-shadow:0 10px 24px rgba(0,0,0,.26)}
.btn-primary{background:linear-gradient(135deg,#7a6bff 0%,#605ff3 45%,#22c7d6 100%);color:#fff;border-color:transparent;box-shadow:0 14px 34px rgba(79,74,205,.28)}
.btn-primary:hover{box-shadow:0 18px 42px rgba(79,74,205,.38)}
.btn-dark{background:linear-gradient(135deg,#151d2b 0%,#1d293b 100%);border-color:#2a3648}
.btn-light{background:#171d34;color:#d8d6ff;border-color:#2d355c}
.btn-red{background:#2b1822;color:#ffc2d7;border-color:#563042}
.btn-plain{color:#9ea7ff}

.search,.select-filter,.form-field input,.form-field select,.form-field textarea,.quote-row input,.quote-row select,.quote-row textarea,.quote-browser-filters input,.quote-browser-filters select{background:#0c131d;color:#eef4ff;border-color:#243145;box-shadow:none}
.form-field label,.form-label,.quote-row label{color:#c5d1e2}
input::placeholder,textarea::placeholder{color:#6f809a}
.form-field input:focus,.form-field textarea:focus,.form-field select:focus,.quote-row input:focus,.quote-row select:focus,.quote-row textarea:focus,.search:focus,.select-filter:focus{border-color:#786aff;box-shadow:0 0 0 3px rgba(122,107,255,.18)}

.data-table,.list-card,.table-shell{background:transparent}
.data-table th,.data-table thead th{background:#101824;color:#90a2be;border-color:#243145}
.data-table td,.data-table tbody tr,.quote-row,.report-stat{border-color:#243145;color:#dbe6f7}
.data-table tbody tr:hover{background:#151f2d}
.tag,.chip.blue{background:#1f2542;color:#d8d6ff}.chip.gray{background:#1e2938;color:#d2dbe9}.chip.green{background:#133d3a;color:#96f1dd}.chip.amber{background:#433522;color:#ffdca0}.chip.red{background:#462433;color:#ffbad0}

.calendar-head{background:#131b28;color:#9dafff;border-bottom:1px solid #243145}.calendar-grid{background:#243145}.cal-day{background:#101722}.cal-day.cal-empty{background:#0d131d}.cal-number{color:#a6b8d4}.cal-event{background:#272d4f;color:#ddd8ff}.cal-event.cal-done{background:#153f38;color:#9bf0dc}

dialog{background:#0f1722;color:#eaf1ff;border-color:#243145;box-shadow:0 30px 90px rgba(0,0,0,.52)}
dialog::backdrop{background:rgba(0,0,0,.58);backdrop-filter:blur(4px)}
.xbtn{background:#182232;color:#9fb0c8}
.status-well{background:#10202a;color:#a6eadf;border-color:#224351}.summary-notice{background:linear-gradient(135deg,#151a33 0%,#132834 100%);color:#cfd8ff;border:1px solid #293356}.note-box{background:linear-gradient(135deg,#141c2f 0%,#132431 100%);color:#cdd7e8;border-color:#243145}

.toast{background:linear-gradient(135deg,#11192a 0%,#1a2442 55%,#12383d 100%);color:#f3f8ff;border:1px solid rgba(255,255,255,.06)}

.vault-screen{background:linear-gradient(145deg,#090c11 0%,#0c121a 100%)}
.vault-art{background:radial-gradient(circle at 68% 14%,rgba(113,103,249,.24),transparent 42%),radial-gradient(circle at 21% 89%,rgba(39,198,181,.16),transparent 36%),linear-gradient(142deg,#0b1019,#101827 61%,#0f2a32)}
.vault-login-card{background:#101722;border-color:#243145;color:#eaf1ff;box-shadow:0 26px 70px rgba(0,0,0,.36)}
.vault-login-card h1,.vault-login-card strong{color:#f6fbff}.vault-login-card p,.vault-security{color:#9bb0c8}.vault-login-card input{background:#0c131d;color:#f6fbff;border-color:#243145}.vault-remember,.vault-auto-opt{background:#121c2a;border-color:#243145;color:#d5dff0}.vault-submit{box-shadow:0 16px 34px rgba(81,74,208,.28)!important}

@media(max-width:850px){
  .topbar{background:rgba(10,14,21,.95)}
  .mobile-bottom{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:60;background:rgba(8,12,18,.96);backdrop-filter:blur(18px);box-shadow:0 -18px 40px rgba(0,0,0,.35);border-top:1px solid rgba(255,255,255,.06);padding:10px 8px max(10px, env(safe-area-inset-bottom));gap:2px}
  .mobile-bottom button{background:transparent;color:#8fa0bc;border-radius:15px}
  .mobile-bottom button.active{background:#171e34;color:#ddd8ff}
  .mobile-bottom button[data-action=newQuote]{background:linear-gradient(135deg,#7a6bff 0%,#22c7d6 100%);color:#fff;box-shadow:0 12px 28px rgba(73,77,205,.32)}
  .mobile-bottom button span{color:inherit}
}


/* LG Studio 5.2.2.2 — KPI icons: SVG outline set, consistent with sidebar. */
html .metric-icon,html .workspace-strip-icon,html .home-quick .quick-link>span{
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,rgba(113,101,239,.15),rgba(31,175,196,.10));
  border:1px solid rgba(131,146,212,.14);border-radius:14px;
  color:#c2c4ff;line-height:1;box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
  flex-shrink:0;
}
html .metric-icon{width:44px;height:44px;padding:0;font-size:0}
html .workspace-strip-icon{width:45px;height:45px;min-width:45px;padding:0;font-size:0}
html .home-quick .quick-link>span{width:42px;height:42px;font-size:0;margin-bottom:6px}
html .lg-kpi-svg{width:21px;height:21px;display:block;flex:none;stroke-width:1.75;overflow:visible}
html .workspace-strip-icon .lg-kpi-svg{width:22px;height:22px}
html .metric:nth-child(3n+2) .metric-icon,html .workspace-strip-item:nth-child(3n+2) .workspace-strip-icon{color:#87dce7;background:linear-gradient(145deg,rgba(27,149,179,.16),rgba(83,127,211,.10));border-color:rgba(90,185,216,.15)}
html .metric:nth-child(3n+3) .metric-icon,html .workspace-strip-item:nth-child(3n+3) .workspace-strip-icon{color:#c7b5ff;background:linear-gradient(145deg,rgba(135,93,211,.16),rgba(113,109,215,.10));border-color:rgba(170,129,221,.15)}
html .workspace-strip-item{background:linear-gradient(180deg,#101722 0%,#131c29 100%);border-color:#243145;border-radius:19px}
html .workspace-strip-item small{color:#b7c6d9;letter-spacing:.015em;font-weight:650}
html .workspace-strip-item strong{color:#f4f7ff;font-variant-numeric:tabular-nums}
html .metric-top{align-items:center}
html .metric-top>span:first-child{max-width:calc(100% - 56px)}
@media(max-width:850px){html .workspace-strip-icon{width:39px;height:39px;min-width:39px;border-radius:12px}html .metric-icon{width:39px;height:39px;border-radius:12px}html .home-quick .quick-link>span{width:39px;height:39px}html .lg-kpi-svg{width:20px;height:20px}}
@media(max-width:540px){html .workspace-strip-icon{width:36px;height:36px;min-width:36px}html .workspace-strip-icon .lg-kpi-svg{width:18px;height:18px}}
