:root {
  color-scheme: light;
  --navy: #071a3b;
  --blue: #0868e8;
  --cyan: #18b9df;
  --green: #12a57f;
  --violet: #6553e8;
  --gold: #e59a26;
  --ink: #14233e;
  --muted: #63718a;
  --line: #dfe7f3;
  --surface: #ffffff;
  --wash: #f3f7fd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f9fd; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 85% 0, #e8f3ff 0, transparent 30rem), linear-gradient(180deg, #fbfcff, #f4f8fd); }
a { color: inherit; }
button, input, select { font: inherit; }
.topbar { height: 76px; padding: 0 max(28px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(209,222,240,.9); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 4; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 22px; letter-spacing: .13em; }
.brand small { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; margin-left: 5px; padding-left: 15px; border-left: 1px solid var(--line); }
.brand-q { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: linear-gradient(145deg, #0b45b7, #079bea); border-radius: 50% 50% 50% 12%; font-size: 22px; letter-spacing: 0; box-shadow: 0 8px 24px rgba(8,104,232,.22); }
.topbar nav { display: flex; align-items: center; gap: 14px; }
.topbar nav > a, .logout button { color: var(--muted); background: transparent; border: 0; text-decoration: none; cursor: pointer; padding: 9px 12px; border-radius: 10px; }
.topbar nav > a:hover, .logout button:hover { color: var(--blue); background: #edf5ff; }
.logout { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.user-chip i { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-style: normal; }
main { width: min(1440px, calc(100% - 56px)); margin: 0 auto; padding: 44px 0 64px; }
.eyebrow { display: block; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .19em; margin-bottom: 9px; }
h1, h2, p { margin-top: 0; }
h1 { color: var(--navy); font-size: clamp(34px, 4vw, 58px); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 18px; }
h2 { color: var(--navy); font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.65; }
.hero { min-height: 340px; padding: 62px 70px; display: flex; align-items: center; justify-content: space-between; gap: 50px; background: rgba(255,255,255,.84); border: 1px solid #e4ebf6; border-radius: 34px; box-shadow: 0 26px 70px rgba(22,49,90,.09); overflow: hidden; position: relative; }
.hero:after { content: ""; position: absolute; inset: auto -12% -65% 20%; height: 270px; border-radius: 50%; background: linear-gradient(90deg, #e7f1ff, #f2f1ff); transform: rotate(-5deg); }
.hero > div { position: relative; z-index: 1; }
.hero p { max-width: 690px; font-size: 18px; }
.hero-mark { flex: 0 0 210px; height: 210px; display: grid; place-items: center; border-radius: 50% 50% 50% 18%; color: white; background: linear-gradient(145deg, #083aa7, #0fb5e8); box-shadow: 0 30px 70px rgba(5,102,222,.28); transform: rotate(-6deg); }
.hero-mark span { font-size: 120px; font-weight: 800; transform: rotate(6deg); }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.portal-card { padding: 34px; min-height: 260px; display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 25px; box-shadow: 0 14px 38px rgba(34,60,100,.07); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(34,60,100,.13); border-color: #b7d4fb; }
.portal-card p { flex: 1; }
.portal-card strong { color: var(--blue); }
.card-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 25px; font-size: 20px; font-weight: 800; color: white; background: var(--blue); }
.portal-card.partner .card-icon { background: var(--green); }
.portal-card.operator .card-icon { background: var(--violet); }
.login-shell { min-height: calc(100vh - 230px); display: grid; grid-template-columns: 1.15fr .85fr; background: white; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(22,49,90,.1); }
.login-intro { padding: clamp(45px, 6vw, 90px); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, #f5f9ff, #e5f2ff); position: relative; overflow: hidden; }
.login-intro:after { content: "Q"; position: absolute; right: -35px; bottom: -100px; font-size: 380px; line-height: 1; font-weight: 900; color: rgba(8,104,232,.07); transform: rotate(-8deg); }
.login-intro.partner { background: linear-gradient(145deg, #f3fbf8, #e0f7f1); }
.login-intro.operator { background: linear-gradient(145deg, #f7f5ff, #ece9ff); }
.login-intro h1 { max-width: 620px; }
.login-intro p { max-width: 590px; font-size: 17px; }
.trust-note { display: flex; align-items: center; gap: 13px; margin-top: 40px; padding: 15px 18px; max-width: 470px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.72); border-radius: 15px; box-shadow: 0 10px 30px rgba(29,72,120,.07); position: relative; z-index: 1; }
.trust-note > span { display: grid; place-items: center; flex: 0 0 33px; height: 33px; border-radius: 50%; color: white; background: var(--green); }
.trust-note small { color: var(--muted); }
.login-card { width: min(440px, 80%); margin: auto; padding: 55px 0; }
.login-card > .brand { margin-bottom: 50px; }
.login-card h2 { font-size: 30px; margin-bottom: 5px; }
.muted { color: var(--muted); }
.login-card form { display: grid; gap: 8px; margin-top: 28px; }
.login-card label { margin-top: 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; padding: 14px 15px; color: var(--ink); background: #f8fafd; border: 1px solid #ccd8e9; border-radius: 12px; outline: none; }
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(8,104,232,.1); background: white; }
.login-card button { margin-top: 18px; padding: 14px 18px; color: white; background: linear-gradient(90deg, #075ad4, #087ee9); border: 0; border-radius: 12px; font-weight: 750; cursor: pointer; box-shadow: 0 12px 28px rgba(8,104,232,.22); }
.back-link { display: inline-block; margin-top: 28px; color: var(--muted); font-size: 13px; text-decoration: none; }
.notice { padding: 12px 14px; margin: 18px 0 4px; border-radius: 10px; font-size: 13px; }
.notice.error { color: #9e2c38; background: #fff0f1; border: 1px solid #facdd1; }
.notice.success { color: #126b53; background: #e9f9f3; border: 1px solid #c8eee1; }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 16px 4px 35px; }
.dashboard-head h1 { font-size: clamp(34px, 4vw, 52px); margin-bottom: 12px; }
.dashboard-head p { max-width: 790px; margin-bottom: 0; }
.welcome { padding: 14px 20px; min-width: 210px; display: flex; flex-direction: column; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 15px; }
.welcome span { color: var(--muted); font-size: 12px; }
.welcome strong { color: var(--navy); margin-top: 3px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat { min-height: 157px; padding: 25px 27px; display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 10px 28px rgba(28,60,105,.055); position: relative; overflow: hidden; }
.stat:before { content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: var(--blue); }
.stat.green:before { background: var(--green); }.stat.violet:before { background: var(--violet); }.stat.gold:before { background: var(--gold); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat strong { color: var(--navy); font-size: 38px; letter-spacing: -.03em; margin: 11px 0 4px; }
.stat small { color: var(--muted); }
.panel { margin-bottom: 24px; padding: 27px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 28px rgba(28,60,105,.055); overflow: hidden; }
.panel-heading { min-height: 48px; margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0; }
.privacy-chip, .health-chip { padding: 7px 10px; color: #395b84; background: #edf5ff; border: 1px solid #d7e8fc; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.health-chip { color: #18785e; background: #eaf9f4; border-color: #cceee3; }
.health-chip i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: var(--green); border-radius: 50%; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 13px; text-align: left; color: #78859a; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 15px 13px; color: #44536b; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--navy); }
.subline { display: block; color: var(--muted); margin-top: 4px; }
.status, .role { display: inline-block; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; color: #235da4; background: #eaf3ff; }
.status.resolved { color: #167a5e; background: #e7f8f2; }.status.failed { color: #a33742; background: #ffedef; }.status.escalated { color: #8057a9; background: #f4ecff; }.status.waiting { color: #936415; background: #fff5df; }
.role.customer { color: #235da4; background: #eaf3ff; }.role.partner { color: #167a5e; background: #e7f8f2; }.role.operator { color: #6041a9; background: #f0ebff; }
.empty { min-height: 130px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; color: var(--muted); background: #f8fafd; border: 1px dashed #cfdbea; border-radius: 14px; }
.empty strong { color: var(--navy); }
.two-column { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; }
.responsibility { display: flex; align-items: flex-start; gap: 18px; margin-top: 24px; padding: 26px 30px; background: linear-gradient(90deg, #eaf3ff, #f2f6ff); border: 1px solid #d6e6fb; border-radius: 20px; }
.responsibility .shield { display: grid; place-items: center; flex: 0 0 43px; height: 43px; color: white; background: var(--blue); border-radius: 50% 50% 50% 14px; font-size: 20px; font-weight: 800; }
.responsibility h2 { margin: 0 0 5px; }.responsibility p { margin: 0; }
.action, .panel button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 11px 17px; color: white; background: linear-gradient(90deg, #075ad4, #087ee9); border: 0; border-radius: 11px; font-weight: 730; text-decoration: none; cursor: pointer; box-shadow: 0 10px 22px rgba(8,104,232,.16); }
.action.secondary, .panel button.secondary { color: #235da4; background: #edf5ff; box-shadow: none; }
.panel button:disabled { color: #8995a8; background: #e9edf3; box-shadow: none; cursor: not-allowed; }
.billing-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; background: linear-gradient(100deg, #fff, #edf5ff); }
.billing-cta p { margin-bottom: 0; }
.billing-summary { background: linear-gradient(145deg, #fff, #f5f9ff); }
.billing-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.billing-facts > div { display: flex; flex-direction: column; min-height: 105px; padding: 18px; background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 14px; }
.billing-facts span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.billing-facts strong { color: var(--navy); font-size: 20px; margin: 8px 0 4px; }.billing-facts small { color: var(--muted); }
.billing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }.billing-actions form { margin: 0; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.offer-card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: #fbfcff; }
.offer-card.recommended { border-color: #8ebdf7; box-shadow: 0 12px 30px rgba(8,104,232,.10); }
.recommend { position: absolute; top: -10px; right: 16px; padding: 5px 9px; color: white; background: var(--blue); border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.offer-card h3 { color: var(--navy); font-size: 21px; margin: 0 0 8px; }.offer-card p { min-height: 48px; }
.offer-price { display: block; color: var(--navy); font-size: 30px; margin: 16px 0; }.offer-price small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.offer-card ul { min-height: 88px; padding-left: 19px; color: var(--muted); line-height: 1.65; font-size: 13px; }.offer-card form, .offer-card button { width: 100%; }
.compact-offers .offer-card p { min-height: auto; }.compact-offers .offer-card { display: flex; flex-direction: column; }.compact-offers .offer-card form { margin-top: auto; }
.auto-topup { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 15px; }
.auto-topup label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }.auto-topup .check-row { grid-column: 1 / -1; display: flex; align-items: center; }
.auto-topup select { width: 100%; padding: 11px 12px; color: var(--ink); background: #f8fafd; border: 1px solid #ccd8e9; border-radius: 10px; }
.auto-topup button { grid-column: 1 / -1; justify-self: start; }
.legal-note { margin: 17px 0 0; color: #718099; font-size: 12px; }
footer { min-height: 90px; padding: 25px max(28px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; gap: 28px; color: #718099; background: white; border-top: 1px solid var(--line); font-size: 12px; }
footer strong { color: var(--navy); font-size: 16px; letter-spacing: .12em; } footer span:last-child { margin-left: auto; }

@media (max-width: 1050px) {
  .portal-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .login-shell { grid-template-columns: 1fr; }.login-intro { min-height: 360px; }.login-card { width: min(520px, 82%); }
  .two-column { grid-template-columns: 1fr; }
  .offer-grid, .billing-facts { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .topbar { height: auto; min-height: 70px; padding: 12px 18px; }.brand small, .user-chip { display: none; }
  main { width: min(100% - 28px, 1440px); padding-top: 22px; }
  .hero { padding: 40px 28px; min-height: 420px; }.hero-mark { display: none; }
  .portal-grid, .stat-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 220px; }.login-intro { padding: 42px 28px; }.login-card { width: 84%; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }.welcome { width: 100%; }
  .panel { padding: 20px 15px; }.panel-heading { align-items: flex-start; flex-direction: column; }
  .responsibility { padding: 23px 20px; }
  .billing-cta { align-items: flex-start; flex-direction: column; }.auto-topup { grid-template-columns: 1fr; }.auto-topup .check-row, .auto-topup button { grid-column: auto; }
  footer { align-items: flex-start; flex-direction: column; gap: 7px; } footer span:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; } }
