/* World Steel Quotation & Proposal Generator - application shell & components.
   Brand colours come from Brand Settings via --ws-red / --ws-blue (set inline in the layout). */
/* Inter variable font (self-hosted, SIL OFL - see fonts/inter/LICENSE.txt) */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter/inter-vietnamese-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter/inter-vietnamese-wght-normal.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/inter/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --ws-red: #8B1E2D;
  --ws-blue: #1F4E99;
  --ws-sidebar-w: 256px;
  --ws-sidebar-cw: 68px;
  --ws-topbar-h: 58px;
  --ws-bg: #f4f6f9;
  --ws-surface: #ffffff;
  --ws-border: #e3e7ee;
  --ws-text: #1f2633;
  --ws-muted: #6b7486;
  --ws-sidebar-bg: #121a2b;
  --ws-sidebar-text: #b9c2d3;
  --ws-radius: 10px;
  --ws-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
[data-bs-theme="dark"] {
  --ws-bg: #0f1420;
  --ws-surface: #171e2d;
  --ws-border: #273146;
  --ws-text: #e3e8f2;
  --ws-muted: #93a0b8;
  --ws-sidebar-bg: #0a0f19;
}
html, body { height: 100%; }
body.ws-app { background: var(--ws-bg); color: var(--ws-text); font-size: .9rem; font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--ws-blue); }
[data-bs-theme="dark"] a { color: #7aa5f0; }

/* Sidebar */
.ws-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--ws-sidebar-w); background: var(--ws-sidebar-bg); color: var(--ws-sidebar-text); display: flex; flex-direction: column; z-index: 1030; transition: width .2s ease, transform .2s ease; }
.ws-brand { height: var(--ws-topbar-h); display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.06); background: linear-gradient(90deg, var(--ws-red), color-mix(in srgb, var(--ws-red) 70%, #000)); }
.ws-brand-link { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; overflow: hidden; white-space: nowrap; }
.ws-logo-mark { width: 36px; height: 36px; border-radius: 8px; background: #fff; color: var(--ws-red); font-weight: 800; display: grid; place-items: center; flex: 0 0 36px; box-shadow: inset 0 -4px 0 var(--ws-blue); }
.ws-logo-img { height: 34px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.ws-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.ws-brand-text small { font-size: .7rem; opacity: .8; }
.ws-nav { flex: 1; overflow-y: auto; padding: 8px 10px 20px; scrollbar-width: thin; }
.ws-nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6f7c95; margin: 16px 10px 6px; white-space: nowrap; }
.ws-nav-link { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--ws-sidebar-text) !important; text-decoration: none; font-size: .85rem; white-space: nowrap; position: relative; }
.ws-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.ws-nav-link:hover { background: rgba(255,255,255,.06); color: #fff !important; }
.ws-nav-link.active { background: rgba(255,255,255,.1); color: #fff !important; }
.ws-nav-link.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--ws-red); }
.ws-sidebar-foot { padding: 8px 16px; color: #56627a; border-top: 1px solid rgba(255,255,255,.05); }
body.sidebar-collapsed .ws-sidebar { width: var(--ws-sidebar-cw); }
body.sidebar-collapsed .ws-brand-text, body.sidebar-collapsed .ws-nav-link span, body.sidebar-collapsed .ws-nav-group, body.sidebar-collapsed .ws-sidebar-foot { display: none; }
body.sidebar-collapsed .ws-nav-link { justify-content: center; }
body.sidebar-collapsed .ws-main { margin-left: var(--ws-sidebar-cw); }

/* Main area */
.ws-main { margin-left: var(--ws-sidebar-w); min-height: 100vh; transition: margin-left .2s ease; display: flex; flex-direction: column; }
.ws-topbar { position: sticky; top: 0; z-index: 1020; height: var(--ws-topbar-h); background: var(--ws-surface); border-bottom: 1px solid var(--ws-border); display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.ws-titlebar { flex: 1; min-width: 0; }
.ws-titlebar .breadcrumb { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.ws-search { position: relative; width: 340px; }
.ws-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ws-muted); }
.ws-search input { padding-left: 32px; background: var(--ws-bg); border-color: var(--ws-border); }
.ws-top-actions { display: flex; align-items: center; gap: 6px; }
.btn-icon { border: 0; background: transparent; color: var(--ws-muted); }
.btn-icon:hover { color: var(--ws-text); background: var(--ws-bg); }
.ws-dot { position: absolute; top: 0; right: 0; background: var(--ws-red); color: #fff; font-size: .6rem; border-radius: 10px; padding: 1px 5px; }
.ws-notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }
.ws-user { display: flex; align-items: center; gap: 8px; border: 0; }
.ws-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ws-blue); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ws-content { padding: 20px 24px 40px; flex: 1; }
.ws-content-fluid { padding: 12px; }
body.ws-fullscreen .ws-sidebar, body.ws-fullscreen .ws-topbar { display: none; }
body.ws-fullscreen .ws-main { margin-left: 0; }

/* Buttons & brand */
.btn-ws-primary { background: var(--ws-red); border-color: var(--ws-red); color: #fff; }
.btn-ws-primary:hover, .btn-ws-primary:focus { background: color-mix(in srgb, var(--ws-red) 85%, #000); border-color: color-mix(in srgb, var(--ws-red) 85%, #000); color: #fff; }
.btn-ws-blue { background: var(--ws-blue); border-color: var(--ws-blue); color: #fff; }
.btn-ws-blue:hover { background: color-mix(in srgb, var(--ws-blue) 85%, #000); color: #fff; }
.btn-outline-ws { border-color: var(--ws-border); color: var(--ws-text); background: var(--ws-surface); }
.btn-outline-ws:hover { border-color: var(--ws-blue); color: var(--ws-blue); }
.text-ws-red { color: var(--ws-red) !important; }
.text-ws-blue { color: var(--ws-blue) !important; }
.bg-ws-red { background: var(--ws-red) !important; color: #fff; }
.bg-ws-blue { background: var(--ws-blue) !important; color: #fff; }

/* Page header & cards */
.ws-page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.ws-page-header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.ws-page-header .sub { color: var(--ws-muted); font-size: .85rem; }
.ws-card { background: var(--ws-surface); border: 1px solid var(--ws-border); border-radius: var(--ws-radius); box-shadow: var(--ws-shadow); }
.ws-card > .ws-card-header { padding: 12px 16px; border-bottom: 1px solid var(--ws-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-card > .ws-card-header h2, .ws-card > .ws-card-header h3 { font-size: .95rem; font-weight: 700; margin: 0; }
.ws-card > .ws-card-body { padding: 16px; }
.ws-kpi { padding: 16px; display: flex; gap: 14px; align-items: center; }
.ws-kpi .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 44px; }
.ws-kpi .icon.red { background: color-mix(in srgb, var(--ws-red) 12%, transparent); color: var(--ws-red); }
.ws-kpi .icon.blue { background: color-mix(in srgb, var(--ws-blue) 12%, transparent); color: var(--ws-blue); }
.ws-kpi .icon.green { background: rgba(25, 135, 84, .12); color: #198754; }
.ws-kpi .icon.amber { background: rgba(255, 193, 7, .18); color: #b58100; }
.ws-kpi .icon.grey { background: rgba(108, 117, 125, .14); color: #6c757d; }
.ws-kpi .val { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.ws-kpi .lbl { color: var(--ws-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

/* Tables */
.ws-table { margin: 0; }
.ws-table thead th { background: var(--ws-bg); color: var(--ws-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; border-bottom: 1px solid var(--ws-border); white-space: nowrap; }
.ws-table td { vertical-align: middle; border-color: var(--ws-border); }
.ws-table tbody tr:hover { background: color-mix(in srgb, var(--ws-blue) 4%, transparent); }
.ws-table a.sort { color: inherit; text-decoration: none; }
.ws-table a.sort .bi { font-size: .7rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-badge { font-weight: 600; letter-spacing: .02em; }
.ws-filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ws-border); }
.ws-filterbar .form-control, .ws-filterbar .form-select { width: auto; min-width: 140px; }
.ws-empty { text-align: center; padding: 48px 16px; color: var(--ws-muted); }
.ws-empty .bi { font-size: 2.4rem; opacity: .5; display: block; margin-bottom: 8px; }
.ws-skeleton { background: linear-gradient(90deg, var(--ws-border) 25%, var(--ws-bg) 37%, var(--ws-border) 63%); background-size: 400% 100%; animation: wsShimmer 1.2s ease infinite; border-radius: 6px; height: 14px; }
@keyframes wsShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.form-label { font-weight: 600; font-size: .8rem; color: var(--ws-muted); margin-bottom: .25rem; }
.form-control:focus, .form-select:focus { border-color: var(--ws-blue); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--ws-blue) 20%, transparent); }
.invalid-feedback { display: block; }
.ws-alert { box-shadow: var(--ws-shadow); }

/* Three-panel builder */
.ws-builder { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 12px; height: calc(100vh - var(--ws-topbar-h) - 24px); }
.ws-builder.right-collapsed { grid-template-columns: 240px minmax(0, 1fr) 0; }
.ws-builder.right-collapsed .ws-panel-right { display: none; }
body.ws-fullscreen .ws-builder { height: calc(100vh - 24px); }
.ws-panel { background: var(--ws-surface); border: 1px solid var(--ws-border); border-radius: var(--ws-radius); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.ws-panel-head { padding: 10px 14px; border-bottom: 1px solid var(--ws-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-panel-head h2 { font-size: .9rem; font-weight: 700; margin: 0; }
.ws-panel-body { padding: 14px; overflow: auto; flex: 1; min-height: 0; }
.ws-stepper { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.ws-stepper li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--ws-text); text-decoration: none; font-size: .84rem; }
.ws-stepper li a:hover { background: var(--ws-bg); }
.ws-stepper li a.active { background: color-mix(in srgb, var(--ws-red) 10%, transparent); color: var(--ws-red); font-weight: 600; }
.ws-stepper .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; border: 1.5px solid var(--ws-border); flex: 0 0 24px; color: var(--ws-muted); }
.ws-stepper a.done .n { background: #198754; border-color: #198754; color: #fff; }
.ws-stepper a.warn .n { border-color: #ffc107; color: #b58100; }
.ws-stepper a.active .n { border-color: var(--ws-red); background: var(--ws-red); color: #fff; }
.ws-summary dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .82rem; }
.ws-summary dt { color: var(--ws-muted); font-weight: 500; }
.ws-summary dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.ws-summary .final { border-top: 2px solid var(--ws-red); margin-top: 8px; padding-top: 8px; font-size: 1.05rem; color: var(--ws-red); }
.ws-step { display: none; }
.ws-step.active { display: block; }
.ws-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.ws-step .step-desc { color: var(--ws-muted); font-size: .84rem; margin-bottom: 14px; }
.ws-savestate { font-size: .75rem; color: var(--ws-muted); white-space: nowrap; }
.ws-savestate.saving { color: #b58100; }
.ws-savestate.saved { color: #198754; }
.ws-savestate.error { color: #dc3545; }
.ws-warn-list { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.ws-warn-list li { padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; display: flex; gap: 6px; }
.ws-warn-list li.error { background: rgba(220, 53, 69, .1); color: #b02a37; }
.ws-warn-list li.warning { background: rgba(255, 193, 7, .14); color: #8a6100; }
.ws-warn-list li.info { background: color-mix(in srgb, var(--ws-blue) 10%, transparent); color: var(--ws-blue); }
.ws-progress { height: 6px; border-radius: 3px; background: var(--ws-border); overflow: hidden; }
.ws-progress > div { height: 100%; background: linear-gradient(90deg, var(--ws-red), var(--ws-blue)); }

/* BOQ editor (Excel-like grid) */
.boq-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.boq-wrap { border: 1px solid var(--ws-border); border-radius: 8px; overflow: auto; max-height: calc(100vh - 330px); min-height: 280px; background: var(--ws-surface); }
table.boq-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .82rem; }
table.boq-grid th { position: sticky; top: 0; z-index: 3; background: var(--ws-blue); color: #fff; font-weight: 600; padding: 6px 6px; font-size: .74rem; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.15); }
table.boq-grid td { border-bottom: 1px solid var(--ws-border); border-right: 1px solid var(--ws-border); padding: 0; height: 30px; vertical-align: top; background: var(--ws-surface); }
table.boq-grid td .cell { display: block; min-height: 29px; padding: 5px 6px; outline: none; white-space: pre-wrap; word-break: break-word; }
table.boq-grid td .cell[contenteditable="true"]:focus, table.boq-grid td.sel .cell { box-shadow: inset 0 0 0 2px var(--ws-blue); background: color-mix(in srgb, var(--ws-blue) 5%, var(--ws-surface)); }
table.boq-grid td.num .cell { text-align: right; font-variant-numeric: tabular-nums; }
table.boq-grid td.ro .cell { color: var(--ws-muted); background: var(--ws-bg); }
table.boq-grid tr.grp td { background: color-mix(in srgb, var(--ws-red) 9%, var(--ws-surface)); font-weight: 700; color: var(--ws-red); }
table.boq-grid tr.grp td .cell { color: var(--ws-red); }
table.boq-grid tr.sub td { background: color-mix(in srgb, var(--ws-blue) 7%, var(--ws-surface)); font-weight: 700; }
table.boq-grid tr.excluded td .cell { color: #9aa1ad; text-decoration: line-through; }
table.boq-grid tr.optional td .cell { font-style: italic; }
table.boq-grid tr.hidden-row { display: none; }
table.boq-grid tr.drag-over td { border-top: 2px solid var(--ws-red); }
table.boq-grid td.handle { cursor: grab; text-align: center; color: var(--ws-muted); width: 26px; }
table.boq-grid td.handle .cell { padding: 5px 2px; }
table.boq-grid select.cell-select { border: 0; background: transparent; width: 100%; height: 29px; font-size: .78rem; color: inherit; padding: 0 4px; }
table.boq-grid tr.err td .cell { box-shadow: inset 0 0 0 1px #dc3545; }
.boq-totals { display: grid; grid-template-columns: 1fr 340px; gap: 12px; margin-top: 12px; }
.boq-totals table td { padding: 4px 8px; }
.boq-building-tabs .nav-link { font-size: .8rem; padding: 4px 10px; }

/* PDF viewer */
.ws-pdfviewer { display: flex; flex-direction: column; height: 100%; min-height: 70vh; background: #525659; border-radius: 8px; overflow: hidden; }
.ws-pdfviewer .bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 10px; background: #323639; color: #fff; }
.ws-pdfviewer .bar .btn { color: #fff; border-color: rgba(255,255,255,.25); }
.ws-pdfviewer .pages { flex: 1; overflow: auto; padding: 14px; text-align: center; }
.ws-pdfviewer canvas { display: block; margin: 0 auto 14px; box-shadow: 0 2px 10px rgba(0,0,0,.4); background: #fff; max-width: none; }

/* Timeline */
.ws-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.ws-timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--ws-border); }
.ws-timeline li { position: relative; padding: 0 0 14px 34px; font-size: .84rem; }
.ws-timeline li .dot { position: absolute; left: 4px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ws-surface); border: 3px solid var(--ws-blue); }
.ws-timeline li.approve .dot, .ws-timeline li.issue .dot { border-color: #198754; }
.ws-timeline li.reject .dot, .ws-timeline li.cancel .dot { border-color: #dc3545; }

/* Scope & proposal editors */
.ws-sortable-item { border: 1px solid var(--ws-border); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: var(--ws-surface); }
.ws-sortable-item .drag { cursor: grab; color: var(--ws-muted); }
.ws-sortable-item.hidden-section { opacity: .55; }
.sortable-ghost { opacity: .4; }
.ws-block { border-left: 3px solid var(--ws-blue); padding: 6px 10px; margin-bottom: 8px; background: var(--ws-bg); border-radius: 0 6px 6px 0; }
.matrix-cell { width: 70px; text-align: center; }

/* Diff */
.diff-up { color: #198754; }
.diff-down { color: #dc3545; }
.diff-add { background: rgba(25, 135, 84, .08); }
.diff-del { background: rgba(220, 53, 69, .08); text-decoration: line-through; }

/* Responsive */
@media (max-width: 1399.98px) {
  .ws-builder { grid-template-columns: 210px minmax(0, 1fr) 270px; }
}
@media (max-width: 1199.98px) {
  .ws-builder { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ws-panel-left .ws-stepper { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  .ws-panel-left .ws-stepper li a span.lbl { display: none; }
  .ws-panel-right { order: 3; }
  .boq-wrap { max-height: 70vh; }
}
@media (max-width: 991.98px) {
  .ws-sidebar { transform: translateX(-100%); width: var(--ws-sidebar-w) !important; }
  body.sidebar-open .ws-sidebar { transform: none; }
  body.sidebar-collapsed .ws-brand-text, body.sidebar-collapsed .ws-nav-link span, body.sidebar-collapsed .ws-nav-group { display: initial; }
  .ws-main, body.sidebar-collapsed .ws-main { margin-left: 0; }
  .boq-totals { grid-template-columns: 1fr; }
}
@media print {
  .ws-sidebar, .ws-topbar, .no-print { display: none !important; }
  .ws-main { margin: 0; }
}
.ws-card > .ws-card-header .btn { white-space: nowrap; }
.ws-card > .ws-card-header { flex-wrap: wrap; gap: 6px; }
.ws-panel-head h2 { min-width: 0; }
.min-w-0 { min-width: 0; }

/* =====================================================================
   Premium shell (v1.1): deep navy sidebar with burgundy accent, glass topbar,
   mega menu, hero band. Everything still driven by --ws-red / --ws-blue.
   ===================================================================== */
:root {
  --ws-navy: #0c1424;
  --ws-navy-2: #14213a;
  --ws-sidebar-bg: linear-gradient(180deg, var(--ws-navy) 0%, var(--ws-navy-2) 100%);
  --ws-sidebar-text: #aeb9cd;
  --ws-radius: 12px;
  --ws-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 8px rgba(16, 24, 40, .06);
  --ws-shadow-lg: 0 12px 32px -8px rgba(12, 20, 36, .22), 0 4px 10px -4px rgba(12, 20, 36, .12);
  --ws-accent-line: linear-gradient(90deg, var(--ws-red) 0%, color-mix(in srgb, var(--ws-red) 50%, var(--ws-blue)) 50%, var(--ws-blue) 100%);
}
[data-bs-theme="dark"] { --ws-navy: #070c16; --ws-navy-2: #0d1526; }
body.ws-app { letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }

.ws-sidebar { background: var(--ws-sidebar-bg); box-shadow: 1px 0 0 rgba(255,255,255,.04), 6px 0 24px -12px rgba(0,0,0,.45); }
.ws-sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(420px 260px at -10% 105%, color-mix(in srgb, var(--ws-red) 30%, transparent), transparent 70%), radial-gradient(360px 240px at 120% 40%, color-mix(in srgb, var(--ws-blue) 22%, transparent), transparent 70%); }
.ws-sidebar > * { position: relative; }
.ws-brand { height: calc(var(--ws-topbar-h) + 6px); background: transparent; border-bottom: 1px solid rgba(255,255,255,.07); }
.ws-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ws-accent-line); }
.ws-logo-mark { background: linear-gradient(135deg, var(--ws-red), color-mix(in srgb, var(--ws-red) 55%, #000)); color: #fff; letter-spacing: -.04em; box-shadow: inset 0 -3px 0 var(--ws-blue), 0 4px 12px -4px color-mix(in srgb, var(--ws-red) 70%, transparent); }
.ws-brand-text b { letter-spacing: .06em; font-size: .95rem; }
.ws-brand-text small { color: #8f9bb3; opacity: 1; letter-spacing: .02em; }
.ws-nav-group { color: #5f6d88; font-weight: 600; font-size: .64rem; letter-spacing: .12em; display: flex; align-items: center; gap: 8px; }
.ws-nav-group::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.06); }
.ws-nav-link { padding: 8px 10px; transition: background .15s, color .15s; margin-bottom: 1px; }
.ws-nav-link i { color: #7d8aa5; transition: color .15s; }
.ws-nav-link:hover { background: rgba(255,255,255,.05); }
.ws-nav-link:hover i { color: #fff; }
.ws-nav-link.active { background: linear-gradient(90deg, color-mix(in srgb, var(--ws-red) 85%, transparent), color-mix(in srgb, var(--ws-red) 25%, transparent)); color: #fff !important; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ws-red) 90%, transparent); font-weight: 600; }
.ws-nav-link.active i { color: #fff; }
.ws-nav-link.active::before { left: auto; right: 8px; top: 50%; bottom: auto; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); background: #fff; opacity: .85; }
.ws-nav::-webkit-scrollbar { width: 6px; } .ws-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.ws-sidebar-foot { display: flex; align-items: center; justify-content: space-between; color: #5f6d88; }
.ws-sidebar-foot .env { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 1px 8px; }

.ws-topbar { height: var(--ws-topbar-h); background: color-mix(in srgb, var(--ws-surface) 82%, transparent); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--ws-border); }
.ws-topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ws-accent-line); }
.ws-titlebar .breadcrumb-item.active { color: var(--ws-text); font-weight: 600; }
.ws-search input { border-radius: 20px; height: 34px; }
.ws-search input:focus { background: var(--ws-surface); }
.ws-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .66rem; background: var(--ws-surface); color: var(--ws-muted); border: 1px solid var(--ws-border); box-shadow: none; padding: 1px 6px; }
.btn-icon { border-radius: 8px; width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; }
.ws-avatar { background: linear-gradient(135deg, var(--ws-blue), color-mix(in srgb, var(--ws-blue) 50%, var(--ws-red))); box-shadow: 0 0 0 2px var(--ws-surface), 0 0 0 3px color-mix(in srgb, var(--ws-blue) 35%, transparent); }
.dropdown-menu { border-color: var(--ws-border); border-radius: 12px; box-shadow: var(--ws-shadow-lg); padding: 6px; }
.dropdown-item { border-radius: 8px; padding: 7px 10px; }
.dropdown-item:active { background: var(--ws-red); }

/* Mega menu */
.ws-mega-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ws-text); border: 1px solid var(--ws-border); background: var(--ws-surface); border-radius: 20px; padding: 5px 12px; }
.ws-mega-btn:hover, .ws-mega-btn.show { border-color: color-mix(in srgb, var(--ws-red) 45%, var(--ws-border)); color: var(--ws-red); }
.ws-mega { position: fixed !important; inset: calc(var(--ws-topbar-h) - 4px) 16px auto calc(var(--ws-sidebar-w) + 16px) !important; transform: none !important; width: auto; max-width: 1240px; padding: 0; overflow: hidden; border: 0; }
body.sidebar-collapsed .ws-mega { left: calc(var(--ws-sidebar-cw) + 16px) !important; }
@media (max-width: 991.98px) { .ws-mega, body.sidebar-collapsed .ws-mega { left: 12px !important; right: 12px !important; } }
.ws-mega-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; color: #fff; background: linear-gradient(110deg, var(--ws-navy) 0%, var(--ws-navy-2) 55%, color-mix(in srgb, var(--ws-red) 55%, var(--ws-navy-2)) 100%); }
.ws-mega-head b { font-size: .95rem; letter-spacing: .02em; }
.ws-mega-head small { color: #aeb9cd; }
.ws-mega-filter { position: relative; width: 260px; }
.ws-mega-filter input { border-radius: 20px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; padding-left: 30px; height: 32px; }
.ws-mega-filter input::placeholder { color: #aeb9cd; }
.ws-mega-filter i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #aeb9cd; font-size: .8rem; }
.ws-mega-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 18px; padding: 16px 18px 18px; max-height: calc(100vh - var(--ws-topbar-h) - 110px); overflow-y: auto; background: var(--ws-surface); }
.ws-mega-col h6 { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ws-red); font-weight: 700; margin: 6px 8px 6px; display: flex; align-items: center; gap: 6px; }
.ws-mega-col h6 i { font-size: .8rem; }
.ws-mega-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 10px; color: var(--ws-text) !important; text-decoration: none; transition: background .12s; }
.ws-mega-item .ic { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--ws-blue) 10%, transparent); color: var(--ws-blue); transition: all .12s; }
.ws-mega-item b { color: var(--ws-text); display: block; font-size: .82rem; font-weight: 600; line-height: 1.25; }
.ws-mega-item span { display: block; font-size: .73rem; color: var(--ws-muted); line-height: 1.3; }
.ws-mega-item:hover, .ws-mega-item:focus { background: color-mix(in srgb, var(--ws-red) 6%, var(--ws-surface)); outline: none; }
.ws-mega-item:hover .ic, .ws-mega-item:focus .ic { background: var(--ws-red); color: #fff; }
.ws-mega-item.active .ic { background: var(--ws-red); color: #fff; }
.ws-mega-empty { padding: 30px; text-align: center; color: var(--ws-muted); grid-column: 1 / -1; }
.ws-quick { width: 300px; }
.ws-quick .dropdown-item { display: flex; gap: 10px; align-items: center; }
.ws-quick .dropdown-item .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--ws-red) 10%, transparent); color: var(--ws-red); flex: 0 0 30px; }
.ws-quick .dropdown-item small { display: block; color: var(--ws-muted); font-size: .72rem; }
.ws-quick .dropdown-item:hover .ic { background: var(--ws-red); color: #fff; }

/* Page header, cards, KPIs */
.ws-page-header h1 { font-size: 1.45rem; font-weight: 750; letter-spacing: -.015em; }
.ws-card { transition: box-shadow .2s; }
.ws-card > .ws-card-header h2, .ws-card > .ws-card-header h3 { display: flex; align-items: center; gap: 8px; }
.ws-card > .ws-card-header h2::before, .ws-card > .ws-card-header h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--ws-accent-line); }
.ws-kpi { position: relative; overflow: hidden; }
a .ws-kpi:hover, .ws-kpi:hover { box-shadow: var(--ws-shadow-lg); }
.ws-kpi .icon { border-radius: 12px; }
.ws-kpi .val { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ws-table thead th { font-size: .7rem; letter-spacing: .06em; }
.ws-table tbody tr { transition: background .1s; }
.btn { border-radius: 8px; font-weight: 500; }
.btn-ws-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--ws-red) 92%, #fff), var(--ws-red)); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 12px -6px color-mix(in srgb, var(--ws-red) 90%, transparent); }
.form-control, .form-select { border-radius: 8px; }

/* Dashboard hero band */
.ws-hero { position: relative; overflow: hidden; border-radius: 16px; color: #fff; padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--ws-shadow-lg);
  background: linear-gradient(115deg, var(--ws-navy) 0%, var(--ws-navy-2) 45%, color-mix(in srgb, var(--ws-red) 70%, var(--ws-navy-2)) 100%); }
.ws-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.ws-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ws-accent-line); }
.ws-hero > * { position: relative; }
.ws-hero .hello { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #c7d0e0; }
.ws-hero h1 { font-size: 1.55rem; font-weight: 750; margin: 4px 0 4px; letter-spacing: -.02em; }
.ws-hero p { color: #c7d0e0; margin: 0; font-size: .88rem; }
.ws-hero .btn-light { color: var(--ws-red); font-weight: 600; }
.ws-hero .btn-glass { color: #fff; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
.ws-hero .btn-glass:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ===================== Sign-in page ===================== */
body.ws-auth { background: var(--ws-navy); min-height: 100vh; }
.ws-auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, 1fr); }
.ws-auth-hero { position: relative; overflow: hidden; color: #fff; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; isolation: isolate;
  background: radial-gradient(900px 600px at 0% 0%, color-mix(in srgb, var(--ws-red) 85%, transparent) 0%, transparent 60%), radial-gradient(800px 600px at 100% 100%, color-mix(in srgb, var(--ws-blue) 75%, transparent) 0%, transparent 60%), linear-gradient(135deg, #2a0d14 0%, var(--ws-navy) 50%, #0a1a3a 100%); }
.ws-auth-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse at 60% 60%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 60% 60%, #000 30%, transparent 75%); }
.ws-auth-steel { position: absolute; z-index: -1; right: -60px; bottom: -10px; width: min(860px, 92%); color: rgba(255,255,255,.17); }
.ws-auth-steel path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: wsDraw 3.2s ease forwards; }
.ws-auth-steel g:nth-child(2) path { animation-delay: .4s; } .ws-auth-steel g:nth-child(3) path { animation-delay: .8s; } .ws-auth-steel g:nth-child(5) path { animation-delay: 1.1s; }
@keyframes wsDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ws-auth-steel path { animation: none; stroke-dashoffset: 0; } .ws-auth-card { animation: none !important; } }
.ws-auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ws-auth-brand { display: flex; align-items: center; gap: 12px; }
.ws-auth-mark { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: -.04em; color: #fff; background: linear-gradient(135deg, var(--ws-red), color-mix(in srgb, var(--ws-red) 50%, #000)); box-shadow: inset 0 -4px 0 var(--ws-blue), 0 10px 24px -8px color-mix(in srgb, var(--ws-red) 80%, transparent); border: 1px solid rgba(255,255,255,.18); }
.ws-auth-logo { height: 46px; max-width: 170px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px 8px; }
.ws-auth-company { font-weight: 800; letter-spacing: .14em; font-size: 1rem; }
.ws-auth-legal { font-size: .76rem; color: #c3cbdb; }
.ws-auth-lang { display: inline-flex; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 3px; background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ws-auth-lang a { color: #d6dceb; text-decoration: none; font-size: .74rem; font-weight: 700; letter-spacing: .06em; padding: 4px 12px; border-radius: 16px; }
.ws-auth-lang a.active { background: #fff; color: var(--ws-red); }
.ws-auth-copy { max-width: 620px; }
.ws-auth-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #e9c9cf; }
.ws-auth-kicker span { width: 28px; height: 2px; background: var(--ws-accent-line); border-radius: 2px; }
.ws-auth-copy h1 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; margin: 14px 0 14px; }
.ws-auth-copy h1 span { background: linear-gradient(90deg, #fff 0%, #f3c6cd 40%, #a9c3f5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ws-auth-copy > p { color: #c9d1e1; font-size: 1rem; line-height: 1.6; max-width: 540px; margin-bottom: 26px; }
.ws-auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ws-auth-feature { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s, background .2s; }
.ws-auth-feature:hover { transform: translateY(-2px); background: rgba(255,255,255,.085); }
.ws-auth-feature i { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; background: linear-gradient(135deg, color-mix(in srgb, var(--ws-red) 90%, #fff 0%), color-mix(in srgb, var(--ws-red) 40%, var(--ws-blue))); }
.ws-auth-feature b { display: block; font-size: .86rem; margin-bottom: 2px; }
.ws-auth-feature span { display: block; font-size: .76rem; color: #b8c2d6; line-height: 1.45; }
.ws-auth-foot { display: flex; flex-direction: column; gap: 10px; }
.ws-auth-standards { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-auth-standards span { font-size: .68rem; font-weight: 600; letter-spacing: .05em; color: #d2d9e7; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 3px 10px; background: rgba(0,0,0,.15); }
.ws-auth-copyright { font-size: .74rem; color: #8f9bb3; }
.ws-auth-panel { display: grid; place-items: center; padding: 40px 32px; background: var(--ws-surface); position: relative; }
.ws-auth-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ws-red), var(--ws-blue)); }
.ws-auth-card { width: 100%; max-width: 400px; animation: wsRise .5s ease both; }
@keyframes wsRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ws-auth-card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; letter-spacing: .12em; }
.ws-auth-card-brand .ws-auth-mark { width: 40px; height: 40px; font-size: .95rem; }
.ws-auth-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ws-red); background: color-mix(in srgb, var(--ws-red) 9%, transparent); padding: 4px 10px; border-radius: 20px; }
.ws-auth-card h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin: 14px 0 6px; }
.ws-auth-sub { color: var(--ws-muted); margin-bottom: 24px; font-size: .9rem; }
.ws-auth-label { display: block; font-size: .78rem; font-weight: 600; color: var(--ws-text); margin: 0 0 6px; }
.ws-auth-input { position: relative; display: flex; align-items: center; border: 1.5px solid var(--ws-border); border-radius: 12px; background: var(--ws-bg); margin-bottom: 16px; transition: border-color .15s, box-shadow .15s, background .15s; }
.ws-auth-input > i { position: absolute; left: 14px; color: var(--ws-muted); pointer-events: none; }
.ws-auth-input input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 13px 14px 13px 42px; font-size: .95rem; color: var(--ws-text); border-radius: 12px; }
.ws-auth-input:focus-within { border-color: var(--ws-blue); background: var(--ws-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ws-blue) 14%, transparent); }
.ws-auth-input:focus-within > i { color: var(--ws-blue); }
.ws-auth-input.invalid { border-color: #dc3545; box-shadow: 0 0 0 4px rgba(220,53,69,.12); }
.ws-auth-eye { border: 0; background: transparent; color: var(--ws-muted); padding: 0 14px; align-self: stretch; display: flex; align-items: center; border-radius: 0 12px 12px 0; }
.ws-auth-eye:hover { color: var(--ws-text); }
.ws-auth-caps { margin: -8px 0 14px; font-size: .78rem; color: #b58100; }
.ws-auth-submit { width: 100%; border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: .95rem; letter-spacing: .01em; color: #fff; margin-top: 6px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, var(--ws-red) 0%, color-mix(in srgb, var(--ws-red) 70%, var(--ws-blue)) 100%); box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--ws-red) 85%, transparent); transition: transform .15s, box-shadow .15s, filter .15s; }
.ws-auth-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 16px 28px -10px color-mix(in srgb, var(--ws-red) 90%, transparent); }
.ws-auth-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--ws-blue) 50%, transparent); outline-offset: 2px; }
.ws-auth-submit:disabled { opacity: .85; transform: none; }
.ws-auth-submit .bi { transition: transform .15s; } .ws-auth-submit:hover .bi { transform: translateX(3px); }
.ws-auth-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--ws-border); font-size: .78rem; color: var(--ws-muted); }
.ws-auth-meta .ok { color: #198754; } .ws-auth-meta .warn { color: #b58100; }

@media (max-width: 1199.98px) { .ws-auth-hero { padding: 36px 40px; } .ws-auth-features { grid-template-columns: 1fr; } }
@media (max-width: 991.98px) {
  .ws-auth-shell { grid-template-columns: 1fr; }
  .ws-auth-hero { display: none; }
  .ws-auth-panel { min-height: 100vh; background: radial-gradient(600px 300px at 0% 0%, color-mix(in srgb, var(--ws-red) 10%, transparent), transparent 70%), radial-gradient(600px 300px at 100% 100%, color-mix(in srgb, var(--ws-blue) 10%, transparent), transparent 70%), var(--ws-surface); }
  .ws-auth-panel::before { width: auto; right: 0; bottom: auto; height: 4px; background: var(--ws-accent-line); }
  .ws-mega-filter { display: none; }
}
@media (max-width: 575.98px) { .ws-auth-panel { padding: 28px 18px; } .ws-hero { padding: 18px; } .ws-hero h1 { font-size: 1.25rem; } }
.ws-titlebar .breadcrumb { align-items: center; }
.ws-titlebar .breadcrumb a { text-decoration: none; color: var(--ws-muted); }
.ws-titlebar .breadcrumb a:hover { color: var(--ws-red); }
.ws-titlebar .breadcrumb-item { flex: 0 0 auto; }
.ws-titlebar .breadcrumb-item.active { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-kpi .lbl { letter-spacing: .03em; font-size: .72rem; font-weight: 600; }
@media (max-width: 767.98px) {
  .ws-titlebar .breadcrumb-item:not(.active) { display: none; }
  .ws-titlebar .breadcrumb-item.active::before { display: none; }
  .ws-topbar { gap: 6px; padding: 0 10px; }
  .ws-user.dropdown-toggle::after { display: none; }
  .ws-hero .hello { letter-spacing: .06em; font-size: .7rem; }
}

/* World Steel logo (v1.2): the logo has dark text, so on dark surfaces it sits on a white card */
.ws-brand { height: auto; min-height: calc(var(--ws-topbar-h) + 6px); padding: 14px 14px 12px; }
.ws-brand-link { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
.ws-logo-card { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 7px 10px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.55), inset 0 -2px 0 color-mix(in srgb, var(--ws-red) 70%, transparent); }
.ws-logo-img { height: 40px; width: auto; max-width: 100%; object-fit: contain; background: transparent; padding: 0; border-radius: 0; }
.ws-logo-mini { display: none; width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 9px; padding: 4px; margin: 0 auto; }
.ws-brand-caption { font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #8f9bb3; text-align: center; }
body.sidebar-collapsed .ws-logo-card, body.sidebar-collapsed .ws-brand-caption { display: none; }
body.sidebar-collapsed .ws-logo-mini { display: block; }
body.sidebar-collapsed .ws-brand { padding: 12px 8px; }
@media (max-width: 991.98px) { body.sidebar-collapsed .ws-logo-card, body.sidebar-collapsed .ws-brand-caption { display: flex; } body.sidebar-collapsed .ws-logo-mini { display: none; } }
.ws-auth-logo-card { display: inline-flex; align-items: center; background: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.6), inset 0 -3px 0 var(--ws-red); }
.ws-auth-logo { height: 48px; width: auto; max-width: 240px; object-fit: contain; background: transparent; padding: 0; border-radius: 0; }
.ws-auth-brand .ws-auth-legal { max-width: 260px; line-height: 1.35; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.ws-auth-card-brand { margin-bottom: 26px; }
.ws-auth-card-brand img { height: 52px; width: auto; max-width: 100%; }

/* Sign-in card (v1.3): elevated card on a soft branded panel */
.ws-auth-panel { background:
    radial-gradient(520px 360px at 85% 8%, color-mix(in srgb, var(--ws-blue) 13%, transparent), transparent 70%),
    radial-gradient(520px 380px at 10% 95%, color-mix(in srgb, var(--ws-red) 12%, transparent), transparent 70%),
    linear-gradient(180deg, #f6f7fb 0%, #eef1f6 100%); overflow: hidden; }
.ws-auth-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(31,78,153,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(31,78,153,.06) 1px, transparent 1px); background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 80%); mask-image: radial-gradient(ellipse at 50% 50%, transparent 35%, #000 80%); }
.ws-auth-card { position: relative; z-index: 1; max-width: 452px; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid rgba(16,24,40,.06);
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 24px 60px -18px rgba(12,20,36,.28), 0 10px 24px -12px color-mix(in srgb, var(--ws-red) 25%, transparent); }
.ws-auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--ws-accent-line); }
.ws-auth-card-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 40px 22px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ws-red) 4%, #fff), #fff); border-bottom: 1px solid #eef0f4; }
.ws-auth-card-head .ws-auth-card-brand { margin: 0; }
.ws-auth-card-head .ws-auth-card-brand img { height: 58px; }
.ws-auth-app { font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #6b7486; display: flex; align-items: center; gap: 10px; }
.ws-auth-app::before, .ws-auth-app::after { content: ""; width: 22px; height: 1px; background: #d5dae3; }
.ws-auth-card-body { padding: 26px 40px 30px; }
.ws-auth-card-body .ws-auth-eyebrow { font-size: .66rem; }
.ws-auth-card-body h2 { font-size: 1.7rem; margin: 12px 0 4px; color: #141b2b; }
.ws-auth-card-body .ws-auth-sub { margin-bottom: 22px; font-size: .88rem; }
.ws-auth-card .ws-auth-input { background: #f7f8fb; border-color: #e1e5ec; }
.ws-auth-card .ws-auth-input:hover { border-color: #cfd5df; }
.ws-auth-card .ws-auth-input:focus-within { background: #fff; }
.ws-auth-card .ws-auth-submit { padding: 14px 18px; letter-spacing: .02em; }
.ws-auth-meta { margin: 0; padding: 14px 40px 16px; border-top: 1px solid #eef0f4; background: #f8f9fc; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-size: .74rem; }
@media (max-width: 991.98px) {
  .ws-auth-panel { padding: 24px 16px; }
}
@media (max-width: 575.98px) {
  .ws-auth-card { border-radius: 18px; }
  .ws-auth-card-head { padding: 28px 22px 18px; }
  .ws-auth-card-body { padding: 22px 22px 24px; }
  .ws-auth-meta { padding: 12px 22px 14px; flex-direction: column; }
  .ws-auth-app { letter-spacing: .1em; font-size: .62rem; }
  .ws-auth-app::before, .ws-auth-app::after { display: none; }
}

/* Sales performance (v1.4) */
.ws-sales-filter .form-select, .ws-sales-filter .form-control { width: auto; min-width: 120px; background-color: rgba(255,255,255,.95); }
.ws-kpi-tall { align-items: flex-start; }
.ws-kpi-tall .lbl { margin-bottom: 2px; }
.ws-kpi-tall .val { font-size: 1.2rem; white-space: nowrap; }
.ws-kpi-tall .val .cur { font-size: .66rem; font-weight: 700; color: var(--ws-muted); letter-spacing: .04em; margin-right: 4px; vertical-align: 2px; }
.ws-kpi-tall .icon { flex-shrink: 0; }
@media (min-width: 1400px) and (max-width: 1699px) { .ws-kpi-tall { padding-left: 14px; padding-right: 12px; gap: 10px; } .ws-kpi-tall .icon { width: 36px; height: 36px; } .ws-kpi-tall .val { font-size: 1.08rem; } }
.ws-kpi-tall .sub { font-size: .72rem; color: var(--ws-muted); margin-top: 3px; line-height: 1.3; }
.ws-internal { border-style: dashed; }
.ws-funnel-row { margin-bottom: 9px; }
.ws-funnel-bar { height: 8px; border-radius: 4px; background: var(--ws-bg); overflow: hidden; margin-top: 3px; }
.ws-funnel-bar > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ws-blue), color-mix(in srgb, var(--ws-blue) 40%, var(--ws-red))); }
.ws-funnel-row:last-of-type .ws-funnel-bar > div { background: var(--ws-red); }
.ws-aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ws-aging > div { border: 1px solid var(--ws-border); border-radius: 10px; padding: 6px 8px; text-align: center; }
.ws-aging b { display: block; font-size: 1.1rem; }
.ws-aging span { font-size: .7rem; color: var(--ws-muted); }
.ws-aging .late { border-color: #f1aeb5; background: rgba(220,53,69,.06); color: #b02a37; }
.ws-mini-bar { height: 4px; background: var(--ws-bg); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.ws-mini-bar > div { height: 100%; background: var(--ws-blue); border-radius: 2px; }
.ws-price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-price-cards > div { border: 1px solid var(--ws-border); border-radius: 12px; padding: 10px; background: var(--ws-bg); }
.ws-price-cards span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ws-muted); font-weight: 600; }
.ws-price-cards b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; margin: 2px 0; }
.ws-price-cards small { color: var(--ws-muted); font-size: .7rem; }
.ws-price-cards .won { border-color: color-mix(in srgb, #198754 35%, var(--ws-border)); background: rgba(25,135,84,.06); }
.ws-price-cards .comp { border-style: dashed; }
.ws-market { border: 1px solid var(--ws-border); border-radius: 12px; padding: 10px 14px; min-width: 160px; }
.ws-market span { display: block; font-size: .74rem; color: var(--ws-muted); }
.ws-market b { display: block; font-size: 1.05rem; }
.ws-market small { color: var(--ws-muted); }
.ws-dash-tile { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; text-decoration: none; color: var(--ws-text) !important; background: var(--ws-surface); border: 1px solid var(--ws-border); box-shadow: var(--ws-shadow); transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.ws-dash-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ws-blue); }
.ws-dash-tile.exec::before { background: var(--ws-red); }
.ws-dash-tile:hover { transform: translateY(-2px); box-shadow: var(--ws-shadow-lg); }
.ws-dash-tile .ic { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--ws-blue), color-mix(in srgb, var(--ws-blue) 55%, #000)); }
.ws-dash-tile.exec .ic { background: linear-gradient(135deg, var(--ws-red), color-mix(in srgb, var(--ws-red) 55%, #000)); }
.ws-dash-tile b { display: block; font-size: 1rem; }
.ws-dash-tile small { display: block; color: var(--ws-muted); }
.ws-dash-tile .go { margin-left: auto; color: var(--ws-muted); font-size: 1.2rem; }
.ws-person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-decoration: none; color: var(--ws-text) !important; }
.ws-person:hover { background: var(--ws-bg); }
.ws-person .av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--ws-blue), color-mix(in srgb, var(--ws-blue) 50%, var(--ws-red))); }
.ws-person b { display: block; font-size: .85rem; }
.ws-person small { display: block; color: var(--ws-muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-person > .bi { margin-left: auto; color: var(--ws-muted); }
.ws-result-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .84rem; }
.ws-result-card dt { color: var(--ws-muted); font-weight: 500; }
.ws-result-card dd { margin: 0; text-align: right; font-weight: 600; }
.ws-target-grid input { min-width: 84px; }
.ws-target-company td { background: color-mix(in srgb, var(--ws-red) 6%, var(--ws-surface)); }
.ws-target-team td { background: color-mix(in srgb, var(--ws-blue) 5%, var(--ws-surface)); }
@media (max-width: 575.98px) { .ws-price-cards { grid-template-columns: 1fr; } .ws-sales-filter { width: 100%; } }
@media (max-width: 575.98px) {
  .ws-kpi-tall { flex-direction: column; gap: 6px; padding: 12px; }
  .ws-kpi-tall .icon { width: 32px; height: 32px; font-size: .95rem; }
  .ws-kpi-tall .val { font-size: 1.05rem; }
}
