:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #06101d;
  --panel: rgba(12, 26, 44, 0.84);
  --panel-strong: #0d1c30;
  --line: rgba(156, 188, 224, 0.16);
  --muted: #91a4bd;
  --text: #f5f8fc;
  --blue: #409cff;
  --blue-deep: #4c5dff;
  --green: #5de3af;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--text); background: radial-gradient(circle at 50% -10%, #122b4a 0, var(--bg) 45%); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ambient { position: fixed; width: 32rem; height: 32rem; border-radius: 50%; filter: blur(110px); opacity: .13; pointer-events: none; }
.ambient-one { top: 15%; left: -20rem; background: #1478ff; }
.ambient-two { right: -20rem; bottom: -10rem; background: #5155ff; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; position: relative; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(5, 14, 25, .76); backdrop-filter: blur(18px); }
.header-inner, main, footer { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; position: relative; border: 1px solid rgba(76, 153, 255, .45); background: linear-gradient(145deg, rgba(54, 150, 255, .2), rgba(70, 81, 255, .1)); clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); }
.brand-mark span { font-size: 24px; font-weight: 900; transform: translateX(-3px); }
.brand-mark i { position: absolute; right: 6px; bottom: 5px; color: var(--blue); font-size: 14px; font-style: normal; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .04em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; margin-top: 2px; }
main { display: grid; align-items: center; padding: 72px 0; }
footer { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.login-layout { display: grid; grid-template-columns: 1.18fr .82fr; align-items: center; gap: clamp(48px, 8vw, 112px); }
.eyebrow { color: #75b8ff; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.login-copy h1 { margin: 20px 0 26px; max-width: 750px; font-size: clamp(46px, 6.2vw, 86px); line-height: .98; letter-spacing: -.055em; }
.login-copy h1 em { color: transparent; font-style: normal; background: linear-gradient(90deg, #58afff, #6e7bff); background-clip: text; }
.login-copy > p { max-width: 640px; color: #a9b8cb; font-size: 18px; line-height: 1.72; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 38px; color: #c5d1e0; font-size: 13px; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row svg { color: var(--green); }
.login-card { border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 4vw, 44px); background: linear-gradient(155deg, rgba(18, 38, 64, .94), rgba(8, 21, 37, .94)); box-shadow: 0 34px 90px rgba(0, 0, 0, .3); }
.card-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 28px; color: #77baff; border: 1px solid rgba(79, 157, 255, .32); border-radius: 15px; background: rgba(47, 124, 219, .12); }
.card-icon svg { width: 25px; height: 25px; }
.login-card h2 { margin: 12px 0; font-size: 28px; }
.login-card > p { color: var(--muted); line-height: 1.6; }
.primary-button { width: 100%; min-height: 54px; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 11px; background: linear-gradient(105deg, #238cee, #4b5fff); box-shadow: 0 14px 34px rgba(40, 106, 255, .25); cursor: pointer; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(40, 106, 255, .34); }
.privacy-note { display: block; margin-top: 18px; color: #788ca6; font-size: 11px; line-height: 1.5; text-align: center; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.notice-error { color: #ffbdc5; border: 1px solid rgba(255, 102, 123, .25); background: rgba(154, 35, 52, .15); }

.status-view { min-height: 50vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.status-view h1 { margin: 22px 0 8px; font-size: 28px; }
.status-view p { color: var(--muted); }
.loader { width: 44px; height: 44px; border: 3px solid rgba(84, 163, 255, .18); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { align-self: start; width: 100%; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.dashboard-heading h1 { margin: 12px 0 10px; font-size: clamp(36px, 5vw, 58px); letter-spacing: -.045em; }
.dashboard-heading p { margin: 0; color: var(--muted); }
.security-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; color: #9af1d0; font-size: 12px; border: 1px solid rgba(93, 227, 175, .22); border-radius: 999px; background: rgba(50, 165, 123, .09); white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(12, 27, 46, .72); }
.metric span, .metric small { color: var(--muted); font-size: 12px; }
.metric strong { margin: 8px 0 5px; font-size: 25px; }
.metric strong.online { color: var(--green); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 56px 0 20px; }
.section-heading h2 { margin: 9px 0 0; font-size: 28px; }
.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.customer-card { width: 100%; position: relative; overflow: hidden; padding: 26px; color: inherit; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(15, 34, 56, .9), rgba(8, 21, 37, .9)); cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.customer-card:hover { transform: translateY(-3px); border-color: rgba(80, 158, 255, .34); box-shadow: 0 20px 44px rgba(0, 0, 0, .2); }
.customer-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(var(--blue), var(--blue-deep)); }
.customer-number { color: #6e9dce; font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
.customer-main { display: flex; align-items: center; gap: 15px; margin: 22px 0 26px; }
.customer-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: #77baff; border-radius: 12px; background: rgba(62, 141, 238, .12); }
.customer-main h3 { margin: 0 0 4px; font-size: 20px; }
.customer-main p { margin: 0; color: var(--muted); font-size: 13px; }
.customer-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.customer-card dl div { min-width: 0; }
.customer-card dt { margin-bottom: 5px; color: #71869f; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.customer-card dd { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.card-link { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 22px; color: #75b8ff; font-size: 12px; font-weight: 750; }
.card-link svg { width: 16px; height: 16px; }
.status-dot { width: 6px; height: 6px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(93, 227, 175, .7); }
.empty-state { min-height: 260px; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; border: 1px dashed rgba(140, 176, 216, .24); border-radius: 16px; background: rgba(10, 24, 41, .44); }
.empty-state > svg { width: 38px; height: 38px; color: #6384a8; }
.empty-state h3 { margin: 20px 0 8px; }
.empty-state p { max-width: 460px; margin: 0; color: var(--muted); line-height: 1.6; }
.user-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip i { width: 34px; height: 34px; display: grid; place-items: center; color: #dcecff; font-size: 12px; font-style: normal; font-weight: 800; border: 1px solid rgba(86, 158, 255, .28); border-radius: 10px; background: rgba(47, 126, 226, .13); }
.user-chip span, .user-chip small { display: block; }
.user-chip span { font-size: 12px; font-weight: 700; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: #a9bad0; border: 1px solid var(--line); border-radius: 10px; background: rgba(11, 25, 43, .7); cursor: pointer; }
.icon-button:hover { color: white; border-color: rgba(96, 165, 255, .35); }
.back-button { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; padding: 0; color: var(--muted); border: 0; background: none; cursor: pointer; font-weight: 650; }
.back-button:hover { color: var(--text); }
.detail-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.detail-hero h1 { margin: 12px 0 10px; font-size: clamp(38px, 5vw, 60px); letter-spacing: -.045em; }
.detail-hero p { margin: 0; color: var(--muted); }
.detail-status { display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 27, 46, .72); white-space: nowrap; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-panel { min-height: 250px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: rgba(12, 27, 46, .72); }
.detail-panel h2 { margin: 10px 0 24px; font-size: 23px; }
.contact-list { display: grid; gap: 10px; }
.contact-link { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 10px; background: rgba(42, 106, 180, .09); transition: background .2s ease; }
.contact-link:hover { background: rgba(52, 126, 213, .16); }
.contact-link svg { color: #65adf8; }
.contact-link span, .contact-link small { display: block; min-width: 0; }
.contact-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.contact-link small { margin-bottom: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.muted-copy { color: var(--muted); line-height: 1.6; }
.fact-list { display: grid; gap: 16px; margin: 0; }
.fact-list div { display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.fact-list dt { color: var(--muted); font-size: 12px; }
.fact-list dd { margin: 0; text-align: right; font-size: 13px; }
.count-badge { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #8cc5ff; background: rgba(40, 112, 197, .1); font-weight: 750; }
.project-grid { display: grid; gap: 14px; }
.project-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: rgba(12, 27, 46, .72); }
.project-icon { width: 46px; height: 46px; display: grid; place-items: center; color: #75b8ff; border-radius: 12px; background: rgba(47, 126, 226, .13); }
.project-content h3 { margin: 7px 0 6px; font-size: 19px; }
.project-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.project-card dl { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 22px; margin: 0; }
.project-card dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.project-card dd { margin: 0; font-size: 13px; white-space: nowrap; }
.empty-state.compact { min-height: 220px; }

@media (max-width: 820px) {
  .login-layout { grid-template-columns: 1fr; gap: 48px; }
  .login-copy h1 { font-size: clamp(42px, 12vw, 68px); }
  .metric-grid { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: 1fr; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: auto minmax(0, 1fr); }
  .project-card dl { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .header-inner, main, footer { width: min(100% - 28px, 1160px); }
  .header-inner { min-height: 72px; }
  main { padding: 48px 0; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
  .brand small { display: none; }
  .login-copy > p { font-size: 16px; }
  .trust-row { align-items: flex-start; flex-direction: column; margin-top: 28px; }
  .login-card { padding: 25px 20px; border-radius: 16px; }
  .security-badge { white-space: normal; }
  .user-chip > span { display: none; }
  .customer-card dl { grid-template-columns: 1fr; }
  .detail-hero { align-items: flex-start; flex-direction: column; }
  .detail-panel { padding: 22px 18px; }
  .project-card { grid-template-columns: 1fr; padding: 20px; }
  .project-card dl { grid-column: auto; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
