:root {
  --ink: #183556;
  --muted: #71849d;
  --line: #dce7f4;
  --paper: #f7faff;
  --white: #ffffff;
  --blue: #327ee8;
  --blue-dark: #2164c4;
  --blue-soft: #eaf3ff;
  --accent: #ffb454;
  --accent-dark: #c97918;
  --coral: #f28c72;
  --shadow: 0 20px 60px rgba(52, 95, 145, .12);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mobile-only { display: none; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .92fr) 1.08fr; background: linear-gradient(135deg, #dcecff, #6aaaf2); }
.login-panel { padding: clamp(32px, 7vw, 110px); align-self: center; background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: grid; justify-items: start; gap: 10px; margin-bottom: 38px; color: var(--ink); font: 700 14px 'Space Grotesk', sans-serif; letter-spacing: .12em; }
.login-brand img { width: 46px; height: 49px; object-fit: contain; }
.eyebrow, .nav-label { color: var(--muted); font: 700 11px 'Space Grotesk', sans-serif; letter-spacing: .13em; }
.login-panel h1 { max-width: 560px; margin: 14px 0 20px; font: 600 clamp(2.5rem, 5vw, 5rem)/.98 'Space Grotesk', sans-serif; letter-spacing: -.045em; }
.login-intro { color: var(--muted); font-size: 16px; max-width: 420px; line-height: 1.6; margin: 0 0 38px; }
.login-form { display: grid; max-width: 420px; gap: 9px; }
.login-form label { font-size: 12px; font-weight: 700; margin-top: 10px; }
.login-form input { height: 50px; border: 1px solid var(--line); background: var(--white); padding: 0 15px; outline: none; color: var(--ink); }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 99, 212, .18); }
.primary-button { border: 0; background: var(--blue); color: var(--white); height: 52px; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-weight: 700; }
.primary-button:hover { background: var(--blue-dark); }
.form-error { min-height: 20px; color: #b8452c; font-size: 13px; margin: 8px 0 0; }
.otp-stage { max-width: 420px; }.otp-stage h2 { margin: 14px 0 10px; font: 600 28px/1.05 'Space Grotesk', sans-serif; }.otp-stage .login-intro { margin-bottom: 20px; }.otp-setup { display: grid; justify-items: start; gap: 8px; margin: 18px 0 20px; }.otp-setup p { color: var(--muted); font-size: 13px; margin: 0; }.otp-qr { width: 190px; height: 190px; padding: 10px; background: #fff; border: 1px solid var(--line); }.otp-manual code { color: var(--ink); font-size: 11px; overflow-wrap: anywhere; }
.login-art { position: relative; overflow: hidden; background: linear-gradient(145deg, #3e8ce9, #94cafc); }
.login-art::after { content: ''; position: absolute; inset: 12% 9% 12% 9%; border: 1px solid rgba(255, 255, 255, .45); transform: rotate(6deg); }
.art-note { position: absolute; z-index: 1; top: 20%; left: 17%; font: 600 clamp(2.4rem, 5vw, 5rem)/.9 'Space Grotesk', sans-serif; letter-spacing: -.06em; transform: rotate(-8deg); }
.art-note strong { color: var(--coral); }
.art-orbit { position: absolute; border: 2px solid var(--ink); border-radius: 50%; left: 32%; top: 28%; width: 48%; aspect-ratio: 1; }
.orbit-two { left: 19%; top: 42%; width: 75%; border-width: 1px; transform: rotate(-25deg) scaleY(.42); }
.art-label { position: absolute; right: 10%; bottom: 12%; font: 700 12px/1.35 'Space Grotesk', sans-serif; letter-spacing: .14em; }

.app-view { display: flex; min-height: 100vh; }
.sidebar { width: 270px; background: linear-gradient(180deg, #327ee8 0%, #2868c4 100%); color: var(--white); padding: 28px 18px 20px; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-top, .brand-lockup, .topbar, .topbar-actions, .profile-button, .workspace-switcher { display: flex; align-items: center; }
.sidebar-top { justify-content: space-between; padding: 0 10px 35px; }
.brand-lockup { flex-direction: column; align-items: flex-start; gap: 9px; padding-left: 10px; font: 700 14px 'Space Grotesk', sans-serif; letter-spacing: .12em; }
.brand-lockup img { width: 38px; height: 40px; object-fit: contain; filter: invert(1); }
.workspace-switcher { gap: 9px; background: rgba(255,255,255,.08); padding: 12px; font-size: 12px; margin-bottom: 32px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }.chevron { margin-left: auto; color: #c5ddfb; }
.nav-label { margin: 0 12px 11px; color: #78877d; }
.main-nav { display: grid; gap: 3px; }
.nav-item { border: 0; color: #b5c0b9; background: transparent; text-align: left; padding: 13px 12px; display: flex; align-items: center; gap: 12px; font-size: 14px; width: 100%; }
.nav-item:hover, .nav-item.active { color: var(--ink); background: var(--accent); }.nav-item.future { color: #c5ddfb; }.nav-item.future:hover { color: #ffffff; background: transparent; }
.nav-icon { width: 18px; font-size: 19px; text-align: center; }.nav-count, .soon { margin-left: auto; font-size: 11px; color: #839087; }.soon { font-weight: 700; letter-spacing: .06em; }
.sidebar-bottom { margin-top: auto; }.help-card { display: flex; gap: 10px; border-top: 1px solid rgba(255,255,255,.2); padding: 20px 8px; }.help-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #b9d7fb; border-radius: 50%; color: var(--accent); }.help-card strong, .help-card small { display: block; }.help-card strong { font-size: 12px; }.help-card small { color: #d4e6fb; font-size: 11px; margin-top: 4px; }.logout-button { width: 100%; padding: 12px 8px; border: 0; color: #d4e6fb; background: transparent; text-align: left; font-size: 13px; }.logout-button span { margin-right: 10px; }
.main-content { flex: 1; min-width: 0; }.topbar { height: 76px; padding: 0 clamp(20px, 4vw, 58px); border-bottom: 1px solid var(--line); justify-content: space-between; background: rgba(255,255,255,.72); }.breadcrumb { display: flex; gap: 11px; color: var(--muted); font-size: 12px; }.breadcrumb b { font-weight: 400; color: #a9b9cb; }.breadcrumb strong { color: var(--ink); }.topbar-actions { gap: 22px; }.notification-button, .icon-button { border: 0; background: transparent; color: var(--ink); font-size: 20px; position: relative; }.notification-dot { width: 6px; height: 6px; background: var(--coral); border-radius: 50%; position: absolute; top: 1px; right: -2px; border: 1px solid var(--paper); }.profile-button { gap: 9px; border: 0; background: transparent; color: var(--ink); font-size: 12px; }.profile-button > span:first-child { background: var(--blue-soft); display: grid; place-items: center; width: 31px; height: 31px; font-weight: 700; }.profile-button > span:last-child { color: var(--muted); }
.content { padding: clamp(25px, 4vw, 58px); max-width: 1500px; }.content-header { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 38px; }.content-header h2 { font: 600 clamp(2rem, 4vw, 3.5rem)/1 'Space Grotesk', sans-serif; letter-spacing: -.05em; margin: 9px 0 0; }.content-header p { color: var(--muted); margin: 13px 0 0; }.date-chip { padding: 10px 13px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 28px; }.metric-card { background: var(--white); padding: 22px; min-height: 142px; border: 1px solid var(--line); }.metric-card.accent { background: var(--accent); border-color: var(--accent); }.metric-label { font-size: 12px; color: var(--muted); }.metric-value { display: block; margin-top: 24px; font: 600 36px 'Space Grotesk', sans-serif; }.metric-card.accent .metric-label { color: #70440e; }.metric-card.accent .metric-value { color: var(--ink); }
.work-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }.panel { background: var(--white); border: 1px solid var(--line); padding: 24px; }.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 21px; }.panel-heading h3 { margin: 0; font: 600 18px 'Space Grotesk', sans-serif; }.panel-heading a { color: var(--muted); font-size: 12px; text-decoration: none; }.empty-panel { min-height: 190px; display: grid; place-items: center; text-align: center; color: var(--muted); }.empty-icon { width: 47px; height: 47px; display: grid; place-items: center; border: 1px dashed #aab8ad; margin: 0 auto 13px; color: var(--accent-dark); font-size: 21px; }.empty-panel p { margin: 0; font-size: 13px; line-height: 1.5; }.empty-panel strong { display: block; color: var(--ink); margin-bottom: 5px; }
.search-row { display: flex; gap: 12px; margin-bottom: 18px; }.search-input { flex: 1; height: 43px; border: 1px solid var(--line); padding: 0 14px 0 38px; background: var(--white); background-image: radial-gradient(circle, var(--muted) 1px, transparent 1.5px); background-size: 14px 14px; background-position: 14px 14px; background-repeat: no-repeat; }.filter-button { border: 1px solid var(--line); background: var(--white); padding: 0 16px; color: var(--muted); }.section-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 18px; }.section-tabs button { border: 0; background: transparent; padding: 10px 15px 12px; color: var(--muted); font-size: 13px; }.section-tabs button.active { color: var(--ink); border-bottom: 2px solid var(--accent-dark); font-weight: 700; }
.profile-menu { position: absolute; top: 60px; right: 0; min-width: 160px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px; z-index: 5; }.profile-wrap { position: relative; }.profile-menu button { border: 0; background: transparent; width: 100%; text-align: left; padding: 10px; font-size: 12px; }.profile-menu button:hover { background: var(--blue-soft); }
@media (max-width: 900px) { .login-view { grid-template-columns: 1fr; }.login-panel { min-height: auto; padding: 45px 8vw 55px; }.login-art { min-height: 260px; }.art-note { top: 24%; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.work-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .mobile-only { display: block; }.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; }.sidebar.open { transform: translateX(0); }.sidebar-scrim { display: none; position: fixed; z-index: 9; inset: 0; background: rgba(20,37,61,.45); }.sidebar-scrim.open { display: block; }.topbar { height: 65px; padding: 0 18px; gap: 13px; }.breadcrumb span, .breadcrumb b { display: none; }.topbar-actions { gap: 10px; }.profile-button > span:nth-child(2) { display: none; }.content { padding: 29px 18px; }.content-header { display: block; margin-bottom: 27px; }.date-chip { display: inline-block; margin-top: 20px; }.metric-card { padding: 17px; min-height: 120px; }.metric-value { margin-top: 16px; font-size: 29px; }.panel { padding: 18px; }.search-row { flex-wrap: wrap; }.search-input { min-width: 100%; }.filter-button { height: 40px; }.login-panel h1 { font-size: 2.6rem; } }

.customer-results { min-height: 220px; }
.loading-state { min-height: 220px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.customer-list, .contact-list { display: grid; gap: 7px; }
.customer-row { width: 100%; border: 1px solid var(--line); background: var(--white); color: var(--ink); display: flex; align-items: center; gap: 13px; text-align: left; padding: 13px; }
.customer-row:hover { border-color: var(--blue); background: var(--blue-soft); }
.customer-avatar, .contact-avatar { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.customer-avatar.large { width: 56px; height: 56px; font-size: 21px; }
.customer-main { display: grid; gap: 4px; min-width: 0; }.customer-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.customer-main small, .contact-card small { color: var(--muted); font-size: 12px; }.customer-contacts { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }.customer-contacts b { color: var(--blue); font-size: 17px; margin-left: 8px; }
.customer-detail { padding: 4px; }.back-link { border: 0; background: transparent; color: var(--blue); padding: 0; font-size: 12px; }.detail-heading { display: flex; gap: 16px; align-items: center; margin: 28px 0; }.detail-heading h3 { font: 600 25px 'Space Grotesk', sans-serif; margin: 5px 0; }.detail-heading p:not(.eyebrow) { color: var(--muted); margin: 0; font-size: 13px; }.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }.detail-grid > div { display: grid; gap: 5px; padding: 14px; background: var(--paper); }.detail-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }.detail-grid strong { font-size: 13px; overflow-wrap: anywhere; }.contact-heading { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }.contact-heading h3 { font: 600 17px 'Space Grotesk', sans-serif; margin: 0; }.contact-heading > span { background: var(--blue-soft); color: var(--blue); font-size: 11px; padding: 3px 7px; }.contact-card { display: flex; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); }.contact-card > div { display: grid; gap: 4px; min-width: 0; }.active-pill { margin-left: auto; color: #61830d; background: #edf7d2; font-size: 10px; padding: 4px 7px; }.active-pill.inactive { color: var(--muted); background: var(--paper); }
.contact-link { display: grid; gap: 3px; color: var(--blue); text-decoration: none; }.contact-link:hover strong { text-decoration: underline; }.contact-link span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }.contact-link strong { font-size: 13px; overflow-wrap: anywhere; }.contact-link.unavailable strong { color: var(--muted); font-weight: 500; }.quick-links { display: flex; flex-wrap: wrap; gap: 9px; margin: -14px 0 28px; }.quick-link { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); color: var(--blue); background: var(--white); padding: 10px 12px; font-size: 12px; text-decoration: none; }.quick-link:hover { background: var(--blue-soft); border-color: var(--blue); }.contact-info { flex: 1; }.contact-links { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 7px; }.contact-links .contact-link { display: inline-flex; gap: 4px; }.contact-links .contact-link span { text-transform: none; letter-spacing: 0; }.contact-links .contact-link strong { font-size: 12px; }

body.dark { --ink: #e8f0fb; --muted: #9aacc2; --line: #2a405c; --paper: #0d1a2b; --white: #13263e; --blue-soft: #1e3c63; --shadow: 0 18px 50px rgba(0, 0, 0, .22); }
body.dark .login-panel, body.dark .topbar { background: var(--paper); }
body.dark .login-brand img { filter: invert(1); }
body.dark .login-form input, body.dark .panel, body.dark .metric-card, body.dark .filter-button, body.dark .profile-menu { background: var(--white); color: var(--ink); }
body.dark .login-form input::placeholder, body.dark .search-input::placeholder { color: #8ca0b8; }
body.dark .login-art { background: linear-gradient(145deg, #24589e, #347acb); }
body.dark .sidebar { background: linear-gradient(180deg, #245fae 0%, #174781 100%); }
body.dark .empty-icon { border-color: #527092; }
body.dark .customer-row:hover { background: #1e3c63; }
body.dark .metric-card.accent { color: #183556; }
body.dark .metric-card.accent .metric-label { color: #70440e; }