/* ==========================================================================
   Shared material — macOS and Windows use the same glass, shadow, motion, and type.
   The LNE mark animation is not restyled here.
   ========================================================================== */

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-400-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-500-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-600-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-400.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-500.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-600.woff2") format("woff2");
}

:root { color-scheme: light; }

html[data-os="win"] body,
html[data-os="mac"] body,
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[data-os="win"] h1,
html[data-os="mac"] h1,
h1 {
  letter-spacing: -0.02em;
  line-height: 1.28;
}
html[data-os="win"] .login-brand h1,
.login-brand h1 {
  letter-spacing: -0.02em;
  line-height: 1.28;
}
h2, .detail-title h2, .modal-head h2 { letter-spacing: -0.012em; }
h3, .hint, label, button, .button, .topbar-title, .task-main strong,
.notification strong, .page-heading p {
  letter-spacing: 0;
}
.login-form h2 { letter-spacing: -0.02em; }
.number, .stat strong, .deal .amount, td.number, .item-total {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button,
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button:hover,
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button.active,
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button:active {
  font-family: var(--font-ui);
  font-weight: 500;
  -webkit-text-stroke: 0;
  letter-spacing: 0.02em;
}
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button.active,
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button.active:hover {
  font-weight: 600;
}

body {
  background: #e6e8f0;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(920px 560px at 0% -6%, rgba(0, 113, 227, 0.34), transparent 62%),
    radial-gradient(840px 520px at 100% -4%, rgba(94, 92, 230, 0.26), transparent 58%),
    radial-gradient(760px 520px at 82% 108%, rgba(255, 149, 0, 0.18), transparent 56%),
    radial-gradient(640px 420px at 12% 108%, rgba(48, 176, 199, 0.14), transparent 54%);
  animation: lne-ambient 22s ease-in-out infinite alternate;
}

.app-shell,
.login-shell {
  position: relative;
  z-index: 1;
  background: transparent;
}

@keyframes lne-ambient {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2.5%, 1.6%, 0) scale(1.07); }
}

@keyframes lne-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Shell glass — identical fill and blur on both operating systems
   -------------------------------------------------------------------------- */
.sidebar,
html[data-os="win"] .sidebar,
html[data-os="mac"] .sidebar {
  background: rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: saturate(190%) blur(34px);
  backdrop-filter: saturate(190%) blur(34px);
  border-right: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.45),
    16px 0 48px rgba(15, 23, 42, 0.08);
}

.topbar,
html[data-os="win"] .topbar,
html[data-os="mac"] .topbar {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: saturate(190%) blur(34px);
  backdrop-filter: saturate(190%) blur(34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1000px) {
  .sidebar,
  html[data-os="win"] .sidebar {
    border-right: 0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  }
}

button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button:hover,
html[data-os="win"] button.nav-button:hover {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button.active,
button:not(.primary):not(.ghost):not(.close):not(.lne-motion).nav-button.active:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 10px 24px rgba(0, 113, 227, 0.16),
    inset 0 0 0 1px rgba(0, 113, 227, 0.22);
}

.topbar-title > .badge.teal {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.45;
  -webkit-text-stroke: 0;
}

.avatar {
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.18);
}

/* --------------------------------------------------------------------------
   Surfaces used by every page: panels, stats, cards, lists, notices
   -------------------------------------------------------------------------- */
.panel,
.stat,
.document-card,
.suggestion,
.kanban-column,
.inline-record,
.notice,
.pricing-calculator,
.pdf-toolbar,
.pdf-canvas-wrap,
.ai-proposal-details,
.deal {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    var(--sh-1);
}

.panel-head,
.modal-head {
  background: rgba(255, 255, 255, 0.28);
  border-bottom-color: rgba(255, 255, 255, 0.42);
}

.modal-footer,
.pdf-toolbar {
  background: rgba(255, 255, 255, 0.34);
}

.panel,
.stat,
.document-card,
.deal,
.suggestion,
.kanban-column {
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background-color 0.35s var(--ease);
}

.stat:hover,
.document-card:hover,
.deal:hover,
.suggestion:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--sh-2);
}

.panel:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--sh-2);
}

th {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

tbody tr { transition: background-color 0.2s var(--ease), transform 0.2s var(--ease); }
tr[data-action]:hover td { background: rgba(255, 255, 255, 0.72); }

.task-row:hover,
.notification:hover {
  background: rgba(255, 255, 255, 0.46);
}

main > .toolbar,
main > form.toolbar {
  padding: 10px;
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-1);
}

/* --------------------------------------------------------------------------
   Buttons — colored lift, not a second animation system
   -------------------------------------------------------------------------- */
button.primary:not(.lne-motion),
.button.primary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(0, 113, 227, 0.34);
}
button.primary:not(.lne-motion):hover,
.button.primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 16px 32px rgba(0, 113, 227, 0.42);
  transform: translateY(-1px);
}
button.primary:not(.lne-motion):active,
.button.primary:active,
html[data-os="win"] button.primary:active,
html[data-os="win"] .button.primary:active {
  transform: translateY(0) scale(0.97);
}

/* --------------------------------------------------------------------------
   Page arrival — every screen is rebuilt into #main, so this covers all of them
   -------------------------------------------------------------------------- */
#main > .page-heading,
#main > .notice,
#main > .error,
#main > .toolbar,
#main > form.toolbar,
#main > .tabs,
#main .stats > .stat,
#main .panel,
#main .document-card,
#main .kanban {
  animation: lne-rise 0.7s var(--ease-out) both;
}
#main .stats > .stat:nth-child(1) { animation-delay: 0.05s; }
#main .stats > .stat:nth-child(2) { animation-delay: 0.1s; }
#main .stats > .stat:nth-child(3) { animation-delay: 0.15s; }
#main .stats > .stat:nth-child(4) { animation-delay: 0.2s; }
#main .panel { animation-delay: 0.16s; }
#main .grid-2 > :first-child .panel,
#main .split > :first-child .panel { animation-delay: 0.18s; }
#main .grid-2 > :last-child .panel,
#main .split > :last-child .panel { animation-delay: 0.26s; }
#main .document-card:nth-child(3n + 1) { animation-delay: 0.12s; }
#main .document-card:nth-child(3n + 2) { animation-delay: 0.18s; }
#main .document-card:nth-child(3n) { animation-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Dialogs, toasts, login
   -------------------------------------------------------------------------- */
dialog {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--sh-pop);
}
dialog::backdrop {
  background: rgba(12, 16, 28, 0.42);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.toast {
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  box-shadow: var(--sh-3);
}

.login-main {
  background:
    radial-gradient(620px 420px at 80% 10%, rgba(0, 113, 227, 0.16), transparent 70%),
    radial-gradient(520px 380px at 10% 90%, rgba(94, 92, 230, 0.12), transparent 70%),
    transparent;
}
.login-form {
  padding: 36px 34px 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--sh-3);
  animation: lne-rise 0.8s var(--ease-out) both;
}
.login-brand::before {
  background:
    radial-gradient(52% 46% at 28% 26%, rgba(10, 132, 255, 0.9) 0%, rgba(10, 132, 255, 0) 68%),
    radial-gradient(48% 44% at 80% 78%, rgba(94, 92, 230, 0.75) 0%, rgba(94, 92, 230, 0) 70%),
    radial-gradient(38% 34% at 62% 14%, rgba(255, 159, 10, 0.38) 0%, rgba(255, 159, 10, 0) 72%);
}

input:not([type="checkbox"]),
select,
textarea {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2), 0 8px 20px rgba(0, 113, 227, 0.12);
}

/* Scrollbars use one geometry on both systems. */
html[data-os="win"] ::-webkit-scrollbar,
::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-os="win"] ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border: 2px solid transparent;
  background-clip: content-box;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar,
  html[data-os="win"] .sidebar,
  .topbar,
  html[data-os="win"] .topbar,
  .panel,
  .stat,
  .document-card,
  .deal,
  .suggestion,
  .kanban-column,
  .login-form,
  dialog {
    background: rgba(255, 255, 255, 0.94);
  }
}

@media (pointer: coarse) {
  .stat:hover,
  .document-card:hover,
  .deal:hover,
  .suggestion:hover,
  button.primary:hover,
  .button.primary:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  body::before { display: none; }
  .sidebar,
  .topbar,
  .login-brand,
  .toast,
  dialog,
  dialog::backdrop,
  .panel,
  .stat,
  .document-card,
  .deal,
  .suggestion,
  .kanban-column,
  .login-form,
  .notice,
  button,
  .button {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    border: 1px solid CanvasText;
  }
  button.primary,
  .button.primary,
  .nav-button.active {
    background: Highlight;
    color: HighlightText;
  }
}

@media print {
  body::before { display: none; }
  .panel, .stat, .document-card, dialog {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fff;
    box-shadow: none;
  }
}
