:root {
  color-scheme: light;
  --navy: #071634;
  --blue: #1656d9;
  --blue-soft: #edf4ff;
  --ink: #13203a;
  --muted: #62708b;
  --line: #e1e7f0;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --green: #078a62;
  --orange: #de702e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.error-text { color: #b42318 !important; }
.eyebrow { display: block; color: #2e65d2; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }

.login-view { min-height: 100svh; height: 100svh; overflow: auto; display: grid; grid-template-columns: minmax(420px, 0.9fr) 1.1fr; background: var(--surface); }
.login-panel { display: flex; flex-direction: column; justify-content: center; max-width: 620px; width: 100%; padding: clamp(32px, 6vh, 70px) clamp(28px, 6vw, 96px); }
.brand-lockup, .sidebar-brand, .user-chip { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--navy); color: white; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; }
.brand-lockup strong, .sidebar-brand strong { display: block; margin-top: 3px; font-size: 1rem; }
.login-copy { margin: clamp(36px, 7vh, 76px) 0 28px; }
.login-copy h1 { max-width: 500px; margin: 12px 0 14px; font-size: clamp(2.25rem, 4.5vw, 4.3rem); line-height: 0.98; letter-spacing: -0.04em; }
.login-copy p, .login-stage p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.login-form { display: grid; gap: 10px; max-width: 440px; }
.login-form label { margin-top: 12px; color: var(--ink); font-weight: 700; }
.login-form input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; outline: none; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #dce8ff; }
.primary-button { border: 0; border-radius: 11px; padding: 14px 18px; background: var(--blue); color: white; font-weight: 800; transition: transform .15s ease, background .15s ease; }
.primary-button:hover { background: #0d46bc; transform: translateY(-1px); }
.form-hint { margin: 8px 0 0; color: var(--muted); font-size: 0.82rem; }
.login-stage { display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(32px, 8vw, 140px); background: radial-gradient(circle at 80% 30%, #1746a5 0, #0d2e72 42%, var(--navy) 100%); color: white; }
.cq-login-panel { min-width: 0; }
.login-panel-inner { width: min(100%, 440px); }
.cq-login-logo { display: block; width: min(100%, 380px); height: auto; max-height: 106px; object-fit: contain; object-position: left center; }
.cq-login-page .login-copy { margin: 40px 0 32px; }
.cq-login-page .login-copy h1 { max-width: 500px; margin: 12px 0 14px; font-size: clamp(2rem, 2.4vw, 2.75rem); line-height: 1.08; font-weight: 900; letter-spacing: -0.035em; }
.cq-login-page .login-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > span { position: absolute; left: 16px; z-index: 1; color: var(--blue); }
.input-with-icon input { padding-left: 48px; padding-right: 48px; }
.input-with-icon button { position: absolute; right: 14px; border: 0; background: transparent; color: #94a3b8; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; color: #526078; font-size: .86rem; }
.login-options label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.login-options button { border: 0; padding: 0; background: transparent; color: var(--blue); font-weight: 700; }
.login-options input { accent-color: var(--blue); }
.secondary-button { border: 1px solid #c9dcff; border-radius: 11px; padding: 13px 18px; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.login-footer { margin: 36px 0 0; color: #94a3b8; font-size: .75rem; }
.login-footer span { color: var(--blue); }
.cq-login-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #06132f 0%, #0b2459 56%, #123f9f 100%); }
.cq-login-glow { position: absolute; border-radius: 999px; filter: blur(60px); opacity: .32; }
.cq-login-glow-a { width: 20rem; height: 20rem; top: 8%; right: 8%; background: rgba(96,165,250,.8); }
.cq-login-glow-b { width: 24rem; height: 24rem; left: -6rem; bottom: -6rem; background: rgba(29,78,216,.8); }
.cq-login-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px); background-size: 48px 48px; }
.cq-login-hero-content { position: relative; z-index: 1; width: min(100%, 620px); }
.cq-login-hero .stage-badge { display: inline-flex; align-items: center; gap: 12px; width: fit-content; padding: 8px 14px; border: 1px solid #ffffff26; border-radius: 999px; background: #ffffff12; }
.cq-login-hero .stage-badge img { width: 28px; height: 28px; border-radius: 8px; }
.cq-login-hero h2 { max-width: 590px; margin: 32px 0 16px; font-size: clamp(2.65rem, 3.7vw, 4.3rem); line-height: 1.02; font-weight: 900; letter-spacing: -0.045em; color: white; }
.cq-login-hero > .login-stage p, .cq-login-hero-content > p { max-width: 540px; color: #dbeafe; font-size: 1.15rem; line-height: 1.55; }
.cq-login-preview-shell { margin-top: 36px; padding: 12px; border: 1px solid #ffffff29; border-radius: 22px; background: #ffffff17; box-shadow: 0 24px 65px #0206174d; }
.cq-login-preview-image { display: block; width: 100%; max-height: 315px; object-fit: cover; object-position: top center; border: 1px solid #ffffff1f; border-radius: 15px; }
.cq-login-hero .stage-steps { position: relative; z-index: 1; margin-top: 20px; }
.cq-login-hero .stage-steps span { flex: 1; min-height: 48px; display: grid; place-items: center; padding: 10px 14px; border-radius: 15px; border: 1px solid #ffffff21; background: #ffffff14; color: #eff6ff; font-size: .82rem; font-weight: 800; }
.password-change-view { min-height: 100svh; display: grid; place-items: center; padding: 32px; background: var(--canvas); }
.password-change-card { width: min(100%, 560px); padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 50px #13203a12; }
.login-stage .stage-badge { width: fit-content; padding: 8px 14px; border: 1px solid #ffffff36; border-radius: 999px; background: #ffffff12; font-size: .85rem; }
.login-stage h2 { max-width: 620px; margin: 28px 0 16px; font-size: clamp(2.3rem, 4.6vw, 4.7rem); line-height: 1.02; letter-spacing: -0.04em; }
.login-stage p { max-width: 500px; color: #d6e2ff; }
.stage-steps { display: flex; gap: 10px; margin-top: 42px; }
.stage-steps span { padding: 12px 18px; border: 1px solid #ffffff2e; border-radius: 12px; background: #ffffff0f; font-weight: 800; }

.dashboard-view { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 28px 18px; background: var(--navy); color: white; }
.sidebar-brand { padding: 0 10px 28px; border-bottom: 1px solid #ffffff1f; }
.sidebar-brand .eyebrow { color: #9cbaff; }
.main-nav { display: grid; gap: 8px; margin-top: 28px; }
.nav-item { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; padding: 13px 14px; background: transparent; color: #c9d7f5; text-align: left; font-weight: 700; }
.nav-item:hover, .nav-item.active { background: #ffffff16; color: white; }
.sidebar-note { margin-top: auto; padding: 18px; border: 1px solid #ffffff1f; border-radius: 16px; background: #ffffff0d; }
.sidebar-note .eyebrow { color: #9cbaff; }
.sidebar-note p { margin: 8px 0 0; color: #b8c8e8; font-size: .8rem; line-height: 1.5; }
.main-content { min-width: 0; padding: 28px clamp(20px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 6px 0 0; font-size: 2rem; letter-spacing: -0.03em; }
.user-chip { padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #dce8ff; color: #1748b5; font-size: .78rem; font-weight: 900; }
.user-chip strong, .user-chip span { display: block; }
.user-chip strong { font-size: .85rem; }
.user-chip span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; }
.poc-banner { margin: 28px 0 18px; border: 1px solid #bbd2ff; border-radius: 10px; padding: 11px 14px; background: var(--blue-soft); color: #1748b5; font-size: .85rem; font-weight: 800; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .surface-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 30px #13203a09; }
.metric-card { min-height: 132px; padding: 20px; }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card strong { display: block; margin: 14px 0 3px; font-size: 1.9rem; }
.metric-card small { font-size: .78rem; }
.metric-card.accent-blue { border-color: #bcd2ff; background: var(--blue-soft); }
.metric-card.accent-blue span, .metric-card.accent-blue small { color: #2861c9; }
.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 16px; }
.surface-card { padding: 26px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 7px 0 0; font-size: 1.25rem; }
.muted { color: var(--muted); font-size: .9rem; }
.status-dot { color: var(--green); font-size: .8rem; font-weight: 800; }
.period-box { margin: 22px 0; padding: 18px; border: 1px solid #c9dcff; border-radius: 14px; background: var(--blue-soft); }
.period-box span, .period-box small { display: block; color: #2861c9; }
.period-box strong { display: block; margin: 5px 0; font-size: 1.7rem; }
.period-box small { font-size: .78rem; }
.profile-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 26px 0 0; }
.profile-list dt { color: var(--muted); font-size: .78rem; }
.profile-list dd { margin: 5px 0 0; font-weight: 800; }
.request-form { display: grid; gap: 10px; margin-top: 24px; }
.request-form label { margin-top: 8px; color: var(--ink); font-size: .86rem; font-weight: 800; }
.request-form input, .request-form select, .request-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; background: white; color: var(--ink); }
.request-form textarea { resize: vertical; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.date-grid > div { display: grid; gap: 8px; }
.rule-list { display: grid; gap: 16px; margin: 26px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.55; }
.history-card { margin-top: 16px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: .85rem; font-weight: 800; }
.table-wrap { overflow-x: auto; margin-top: 24px; }
table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: .86rem; }
th { color: var(--muted); font-size: .76rem; text-align: left; }
th, td { padding: 15px 12px; border-bottom: 1px solid var(--line); }
td { color: #4d5b73; }
td strong { color: var(--ink); }
.status-pill { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: .74rem; font-weight: 800; }
.status-pill.pending { background: #fff4d8; color: #9c6800; }

@media (max-width: 940px) {
  .login-view { grid-template-columns: 1fr; }
  .login-stage { display: none; }
  .login-panel { max-width: none; }
  .dashboard-view { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .sidebar-note { display: none; }
  .main-nav { grid-template-columns: repeat(4, 1fr); }
  .nav-item { justify-content: center; }
  .nav-item span { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-height: 760px) and (min-width: 941px) {
  .login-panel, .login-stage { padding-top: 28px; padding-bottom: 28px; }
  .login-copy { margin-top: 32px; margin-bottom: 20px; }
  .login-copy h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
  .login-stage h2 { margin-top: 18px; font-size: clamp(2rem, 4vw, 3.8rem); }
  .stage-steps { margin-top: 26px; }
}

@media (max-width: 560px) {
  .login-panel, .main-content { padding: 24px 16px 40px; }
  .login-copy { margin-top: 68px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .user-chip { width: 100%; }
  .metrics-grid { grid-template-columns: 1fr; }
  .surface-card { padding: 20px; }
  .profile-list { grid-template-columns: 1fr 1fr; gap: 16px; }
  .date-grid { grid-template-columns: 1fr; }
}
