:root {
  --navy: #102b49;
  --navy-2: #173b61;
  --blue: #2466da;
  --blue-dark: #174daa;
  --mint: #92e7cb;
  --mint-soft: #e6f8f2;
  --sky: #eaf2ff;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --text: #172d45;
  --muted: #68798b;
  --line: #dfe7ef;
  --green: #167454;
  --green-bg: #e7f6ef;
  --amber: #8b6114;
  --amber-bg: #fff3d8;
  --red: #ad3f41;
  --red-bg: #ffebeb;
  --shadow: 0 18px 50px rgba(16, 43, 73, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4, .brand, .metric-value, .price {
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.2;
}

h1 { margin: 5px 0 9px; font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.045em; }
h2 { margin: 0 0 15px; font-size: 1.35rem; letter-spacing: -.025em; }
h3 { margin: 0 0 5px; font-size: 1rem; }
h4 { margin: 0 0 4px; }
p { margin: 6px 0 15px; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #5b9df5;
  outline-offset: 3px;
}
svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.eyebrow { color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section { margin-top: 24px; }
.stack { display: grid; gap: 14px; }
.inline { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.center { text-align: center; }
.hide { display: none !important; }

.layout { min-height: 100dvh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 258px;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.17rem; font-weight: 800; letter-spacing: -.035em; }
.brand-mark {
  position: relative;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: var(--mint);
  font-size: 1.08rem;
  letter-spacing: 0;
  box-shadow: 0 7px 18px rgba(16, 43, 73, .18);
}
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 5px; margin-top: 27px; overflow-y: auto; }
.navbtn {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  color: #53677a;
  font-weight: 650;
  text-align: left;
}
.navbtn:hover { background: #f4f7fb; color: var(--text); }
.navbtn.active { background: var(--sky); color: var(--blue-dark); }
.sidebar-bottom { margin-top: auto; }
.service-mini { margin: 12px 3px 16px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.service-mini a { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--navy); font-weight: 800; text-decoration: none; }

.shell { min-width: 0; grid-column: 2; }
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 42px;
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(223, 231, 239, .9);
  backdrop-filter: blur(14px);
}
.top-actions { display: flex; align-items: center; gap: 11px; }
.iconbtn, .avatar {
  position: relative;
  width: 43px;
  height: 43px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}
.avatar { background: var(--sky); color: var(--blue-dark); font-size: .82rem; font-weight: 800; }
.notification-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: .65rem;
  font-weight: 800;
}
.mobile-brand, .mobile-nav { display: none; }
.content { width: 100%; max-width: 1160px; margin: 0 auto; padding: 34px 42px 58px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading p { max-width: 660px; margin-bottom: 0; }

.card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(16, 43, 73, .015);
}
.card.soft { background: #f8fbff; }
.card.mint-card { background: var(--mint-soft); border-color: #ccefe4; }
.card.alert-card { background: var(--red-bg); border-color: #f5cccc; }
.grid { display: grid; grid-template-columns: 1.16fr .84fr; gap: 19px; }
.grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 5px 11px; border-radius: 999px; background: #edf2f7; color: #506276; font-size: .79rem; font-weight: 750; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--sky); color: var(--blue-dark); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--blue-dark); }
.btn.secondary { background: #eaf1f9; color: var(--navy); }
.btn.secondary:hover { background: #dfe9f5; }
.btn.mint { background: var(--mint); color: var(--navy); }
.btn.mint:hover { background: #7cdaba; }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.compact { min-height: 40px; padding: 9px 13px; font-size: .86rem; }
.btn.full { width: 100%; }
.textlink { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; color: var(--blue-dark); font-size: .87rem; font-weight: 750; text-decoration: none; }

.welcome-card {
  position: relative;
  min-height: 285px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  background: linear-gradient(137deg, var(--navy), #174772);
  color: white;
  box-shadow: 0 20px 48px rgba(16, 43, 73, .16);
}
.welcome-card::after {
  content: "";
  position: absolute;
  right: -83px;
  bottom: -115px;
  width: 270px;
  height: 270px;
  border: 46px solid rgba(146, 231, 203, .13);
  border-radius: 50%;
}
.welcome-card .eyebrow { color: #b8cce0; }
.welcome-card h2 { max-width: 500px; margin: 14px 0 8px; font-size: clamp(1.8rem, 4vw, 2.45rem); letter-spacing: -.045em; }
.welcome-card p { max-width: 510px; color: #c4d3e2; }
.welcome-card .btn { position: relative; z-index: 1; align-self: flex-start; margin-top: auto; }
.service-orbit { position: absolute; top: 25px; right: 25px; width: 65px; height: 65px; display: grid; place-items: center; border: 1px solid rgba(146, 231, 203, .35); border-radius: 50%; color: var(--mint); }
.service-orbit::before { content: ""; position: absolute; inset: 7px; border: 1px dashed rgba(146, 231, 203, .42); border-radius: 50%; }
.service-orbit svg { width: 27px; height: 27px; }

.next-card { min-height: 285px; display: flex; flex-direction: column; }
.metric-value { margin: 12px 0 2px; font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.metric-note { color: var(--muted); font-size: .88rem; }
.next-card .btn { margin-top: auto; }
.action-banner { display: flex; align-items: center; gap: 15px; margin-top: 19px; padding: 15px; border-radius: 15px; background: #f6f9fd; }
.action-banner .action-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--sky); color: var(--blue-dark); }
.action-banner p { margin: 2px 0 0; font-size: .84rem; }

.quickgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 28px; }
.quick {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--navy);
  font-weight: 700;
  text-align: left;
}
.quick:hover { border-color: #b8cbe1; box-shadow: 0 10px 25px rgba(16, 43, 73, .06); }
.quick svg { color: var(--blue); }

.contact-bar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 17px 19px; border-radius: 17px; background: var(--navy); color: white; }
.contact-bar p { margin: 3px 0 0; color: #bfcfe0; font-size: .85rem; }
.contact-bar .btn { min-height: 43px; }

.device-mini-list { display: grid; gap: 11px; }
.device-mini { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.device-mini:last-child { border-bottom: 0; padding-bottom: 0; }
.product-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: var(--navy); color: var(--mint); font-size: .77rem; font-weight: 850; }
.device-mini .textlink { margin-left: auto; }

.rows { display: grid; gap: 19px; }
.part-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.part-head span { font-size: .88rem; }
.percent { font-weight: 800; }
progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 8px; overflow: hidden; background: #e8eef4; }
progress::-webkit-progress-bar { background: #e8eef4; }
progress::-webkit-progress-value { background: #31836f; border-radius: 8px; }
progress::-moz-progress-bar { background: #31836f; }
.low progress::-webkit-progress-value { background: #d29a3e; }
.low progress::-moz-progress-bar { background: #d29a3e; }
.critical progress::-webkit-progress-value { background: #c85353; }
.critical progress::-moz-progress-bar { background: #c85353; }
.part-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: .77rem; }

.device-tabs { display: flex; gap: 9px; margin-bottom: 17px; overflow-x: auto; scrollbar-width: none; }
.device-tabs::-webkit-scrollbar { display: none; }
.device-tab { min-width: max-content; display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 13px; background: white; font-weight: 700; }
.device-tab.active { border-color: var(--navy); background: var(--navy); color: white; }
.device-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 26px; border: 0; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: white; }
.device-hero .product-mark { width: 78px; height: 78px; background: rgba(255, 255, 255, .1); font-size: .95rem; }
.device-hero h2 { margin-bottom: 5px; font-size: 1.7rem; }
.device-hero p { margin: 0; color: #c4d4e3; }
.device-status { text-align: right; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.detail { padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail dt { margin-bottom: 4px; color: var(--muted); font-size: .82rem; }
.detail dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.passport-stamp { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid #b9cfdf; border-radius: 50%; color: var(--green); }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 24px 27px; border-left: 1px solid var(--line); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: #3f8e7b; }
.timeline time { color: var(--muted); font-size: .78rem; }
.timeline h3 { margin: 5px 0; }
.timeline p { margin: 4px 0; font-size: .87rem; }

.appointment-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; }
.date-tile { width: 55px; overflow: hidden; border-radius: 12px; background: var(--sky); color: var(--blue-dark); text-align: center; }
.date-tile span { display: block; padding: 3px 5px; background: var(--blue); color: white; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.date-tile strong { display: block; padding: 6px; font-size: 1.28rem; }
.visit-list { display: grid; gap: 13px; }
.visit-item { display: flex; align-items: flex-start; gap: 11px; }
.visit-item svg { color: var(--green); }

.support-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.support-action { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 17px; border-radius: 16px; background: var(--navy); color: white; text-decoration: none; font-weight: 750; }
.support-action:nth-child(2) { background: #12745b; }
.support-action:nth-child(3) { background: var(--blue); }
.support-action small { color: rgba(255, 255, 255, .72); font-weight: 500; }
.problems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.problem { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; font-weight: 650; text-align: left; }
.problem:hover { border-color: #b5c9df; }
.problem svg { color: var(--blue); }
.problem .chevron { margin-left: auto; width: 17px; }
.diagnostic-steps { display: grid; gap: 13px; padding: 0; counter-reset: step; list-style: none; }
.diagnostic-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.diagnostic-steps li::before { counter-increment: step; content: counter(step); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--sky); color: var(--blue-dark); font-size: .8rem; font-weight: 800; }
.ticket-list { display: grid; gap: 11px; }
.ticket-card { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; text-align: left; }
.ticket-card:hover { border-color: #b8cbe1; }
.ticket-card p { margin: 5px 0 0; color: var(--muted); font-size: .83rem; }
.ticket-card .chevron { align-self: center; color: var(--muted); }
.message-thread { display: grid; gap: 11px; margin: 18px 0; }
.message { max-width: 86%; padding: 12px 14px; border-radius: 15px 15px 15px 4px; background: #edf2f7; }
.message.client { justify-self: end; border-radius: 15px 15px 4px 15px; background: var(--sky); }
.message p { margin: 0; }
.message small { display: block; margin-top: 4px; color: var(--muted); }

.price { margin: 8px 0 16px; font-size: 2.7rem; font-weight: 850; letter-spacing: -.055em; }
.price small { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.benefits { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.benefits li { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.benefits svg { width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
.gift-banner { display: flex; align-items: center; gap: 15px; padding: 17px; border: 1px solid #c9eee2; border-radius: 15px; background: var(--mint-soft); }
.gift-banner .action-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: white; color: var(--green); }

.flash-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 94% 5%, rgba(146, 231, 203, .25), transparent 31%),
    linear-gradient(135deg, #102b49, #174a6c);
  color: white;
  box-shadow: 0 20px 48px rgba(16, 43, 73, .16);
}
.flash-card::after { content: ""; position: absolute; right: -70px; bottom: -100px; width: 230px; height: 230px; border: 38px solid rgba(255, 211, 110, .1); border-radius: 50%; pointer-events: none; }
.flash-card > * { position: relative; z-index: 1; }
.flash-card.grand-prize { box-shadow: inset 0 0 0 1px rgba(255, 211, 110, .35), 0 20px 48px rgba(16, 43, 73, .18); }
.flash-top, .flash-alert-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.flash-label { display: inline-flex; align-items: center; gap: 8px; color: #c8f6e8; font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.flash-label svg { width: 18px; height: 18px; }
.flash-stock { padding: 6px 11px; border-radius: 999px; background: #ffd36e; color: var(--navy); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.flash-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(245px, .75fr); gap: 24px; align-items: end; margin-top: 21px; }
.flash-layout.with-media { grid-template-columns: minmax(190px, .58fr) minmax(280px, 1.22fr) minmax(220px, .7fr); align-items: stretch; gap: 20px; }
.draw-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); gap: 22px; align-items: end; margin-top: 22px; }
.draw-formula { max-width: 710px; display: grid; gap: 3px; margin: 18px 0; padding: 13px 15px; border-left: 3px solid #ffd36e; border-radius: 0 12px 12px 0; background: rgba(255, 255, 255, .08); }
.draw-formula strong { color: #fff2c7; font-size: .93rem; }
.draw-formula span { color: #c3d5e3; font-size: .79rem; }
.draw-prizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 24px; }
.draw-prize { min-width: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .17); border-radius: 17px; background: rgba(255, 255, 255, .09); }
.prize-media { position: relative; height: 210px; margin: 0; overflow: hidden; background: #eaf0f5; }
.prize-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.prize-media.prize-gallery img:last-of-type { inset: auto 9px 9px auto; width: 44%; height: 48%; border: 3px solid rgba(255, 255, 255, .95); border-radius: 11px; box-shadow: 0 8px 22px rgba(3, 17, 30, .28); }
.prize-rank { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 6px 10px; border-radius: 999px; background: #ffd36e; color: var(--navy); font-size: .71rem; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.prize-copy { padding: 14px 15px 16px; }
.prize-copy strong { display: block; color: white; font-size: .98rem; }
.prize-copy p { margin: 5px 0 0; color: #c8d8e5; font-size: .79rem; line-height: 1.5; }
.gift-media {
  position: relative;
  min-height: 315px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: #eef3f8;
  box-shadow: 0 14px 30px rgba(3, 17, 30, .22);
}
.gift-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.gift-photo-badge { position: absolute; top: 11px; left: 11px; z-index: 3; padding: 5px 9px; border-radius: 999px; background: rgba(16, 43, 73, .88); color: white; font-size: .68rem; font-weight: 800; letter-spacing: .04em; }
.gift-media.gift-gallery img:last-of-type { inset: auto 11px 11px auto; width: 47%; height: 49%; border: 3px solid rgba(255, 255, 255, .92); border-radius: 13px; box-shadow: 0 10px 25px rgba(3, 17, 30, .28); }
.flash-copy .eyebrow { color: #abc7da; }
.flash-copy h2 { max-width: 650px; margin: 9px 0 8px; color: white; font-size: clamp(1.8rem, 3.4vw, 2.45rem); }
.flash-layout.with-media .flash-copy h2 { font-size: clamp(1.7rem, 2.45vw, 2.15rem); }
.gift-pitch { max-width: 680px; margin: 0 0 15px; color: white; font-size: .98rem; font-weight: 620; line-height: 1.55; }
.gift-condition { max-width: 680px; margin-bottom: 19px; padding: 11px 13px; border-left: 3px solid #ffd36e; border-radius: 0 11px 11px 0; background: rgba(255, 255, 255, .08); }
.gift-condition > span { display: block; color: #ffd36e; font-size: .69rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.gift-condition p { margin: 3px 0 0; color: #d4e1ec; font-size: .88rem; line-height: 1.5; }
.flash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.flash-primary { background: var(--mint); color: var(--navy); }
.btn.flash-primary:hover { background: #7cdaba; }
.btn.flash-secondary { border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: white; }
.btn.flash-secondary:hover { background: rgba(255, 255, 255, .18); }
.flash-progress { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; padding: 17px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 17px; background: rgba(7, 25, 42, .3); }
.progress-gift { width: 43px; height: 43px; display: grid; place-items: center; grid-row: span 2; border-radius: 13px; background: rgba(146, 231, 203, .15); color: var(--mint); }
.flash-progress span, .flash-progress strong { display: block; }
.flash-progress .tiny { color: #acc4d6; }
.flash-progress progress { grid-column: 1 / -1; height: 8px; background: rgba(255, 255, 255, .14); }
.flash-progress progress::-webkit-progress-bar { background: rgba(255, 255, 255, .14); }
.flash-progress progress::-webkit-progress-value { background: #ffd36e; }
.flash-progress progress::-moz-progress-bar { background: #ffd36e; }
.flash-progress small { grid-column: 1 / -1; color: #bfd0de; font-size: .72rem; line-height: 1.45; }
.flash-alert-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .13); color: #d8e5ee; font-size: .83rem; }
.flash-alert-row > span { display: flex; align-items: center; gap: 8px; }
.flash-alert-row svg { width: 18px; height: 18px; color: var(--mint); }
.flash-foot { margin-top: 15px; color: #9fb9cc; font-size: .7rem; }
.alert-optin, .preference-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid #cbdced; border-radius: 16px; background: #f8fbff; }
.alert-optin p, .preference-card p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.preference-card { margin-top: 17px; }
.campaign-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.campaign-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; }
.campaign-steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-soft); color: var(--green); font-weight: 850; }
.campaign-steps p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.challenge-history { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, .42fr); gap: 25px; align-items: center; overflow: hidden; padding: 25px; border: 1px solid #d9d0f3; border-radius: 20px; background: linear-gradient(135deg, #f8f5ff, #f2f9ff); }
.challenge-history::after { content: ""; position: absolute; right: -80px; bottom: -105px; width: 220px; height: 220px; border: 34px solid rgba(93, 72, 161, .07); border-radius: 50%; }
.challenge-history > * { position: relative; z-index: 1; }
.challenge-status { display: inline-flex; margin-bottom: 11px; padding: 5px 10px; border-radius: 999px; background: #e8e0fa; color: #5d48a1; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.challenge-copy h2 { margin: 7px 0 8px; font-size: 1.55rem; }
.challenge-copy > p { max-width: 680px; color: var(--muted); }
.challenge-rule { display: flex; gap: 9px 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.challenge-rule strong { padding: 6px 10px; border-radius: 9px; background: #5d48a1; color: white; font-size: .79rem; }
.challenge-rule span { color: #3d315f; font-weight: 800; }
.challenge-winner { padding: 19px; border: 1px solid rgba(93, 72, 161, .14); border-radius: 17px; background: rgba(255, 255, 255, .78); text-align: center; }
.winner-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 15px; background: #e8e0fa; color: #5d48a1; }
.challenge-winner .tiny { color: var(--muted); }
.challenge-winner strong { display: block; margin-top: 3px; font-size: 1.1rem; }
.challenge-winner p { margin: 3px 0 7px; color: #5d48a1; font-weight: 800; }
.challenge-winner small { color: var(--muted); font-size: .68rem; }
.empty-gift { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 18px; background: var(--mint-soft); color: var(--green); }
.app-launch, .offer-reminder { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 15px; border-radius: 15px; background: #f6f9fd; }
.app-launch h3, .app-launch p, .offer-reminder p { margin: 2px 0 0; }
.offer-reminder .action-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--mint-soft); color: var(--green); }
.appstore-link { width: 100%; justify-content: center; margin-top: 9px; }
.billing-table { width: 100%; border-collapse: collapse; }
.billing-table th, .billing-table td { padding: 12px 5px; border-bottom: 1px solid var(--line); text-align: left; font-size: .86rem; }
.billing-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.billing-table tr:last-child td { border-bottom: 0; }

.document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.document-card { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: white; text-align: left; }
.document-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; background: var(--sky); color: var(--blue-dark); }
.document-card p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.document-card .chevron { color: var(--muted); }
.document-preview { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.document-preview-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 2px solid var(--navy); }
.document-preview dl { margin: 0; }
.document-preview .detail-grid { margin: 15px 0; }

.referral-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.reward { padding: 13px 0; border-bottom: 1px solid var(--line); }
.reward:last-child { border-bottom: 0; }
.reward p { margin: 3px 0 0; }
.tutorials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tutorial { display: flex; flex-direction: column; min-height: 215px; }
.tutorial-symbol { width: 47px; height: 47px; display: grid; place-items: center; margin-bottom: 25px; border-radius: 14px; background: var(--sky); color: var(--blue-dark); }
.tutorial p { color: var(--muted); font-size: .85rem; }
.tutorial .textlink { margin-top: auto; }

.notification { display: flex; align-items: flex-start; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.notification:last-child { border-bottom: 0; }
.notification.read { opacity: .58; }
.notification-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--sky); color: var(--blue-dark); }
.notification p { margin: 4px 0 0; font-size: .86rem; }

.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.more-item { min-height: 105px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: white; font-weight: 700; text-align: left; }
.more-item svg { color: var(--blue); }
.more-item small { color: var(--muted); font-weight: 500; }
.more-item.featured { border-color: #9adbc5; background: var(--mint-soft); color: var(--navy); }
.more-item.featured svg { color: var(--green); }

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 102, 218, .13), transparent 32%),
    radial-gradient(circle at 87% 92%, rgba(146, 231, 203, .2), transparent 35%),
    var(--bg);
}
.login-wrap { width: 100%; max-width: 940px; }
.login-brand { justify-content: center; margin-bottom: 27px; }
.login-grid { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.login-intro { position: relative; padding: 42px; overflow: hidden; background: var(--navy); color: white; }
.login-intro::after { content: ""; position: absolute; right: -90px; bottom: -100px; width: 260px; height: 260px; border: 45px solid rgba(146, 231, 203, .12); border-radius: 50%; }
.login-intro .eyebrow { color: #a9c3da; }
.login-intro h1 { margin: 15px 0 12px; font-size: 2.35rem; }
.login-intro p { color: #c7d5e3; }
.login-points { position: relative; z-index: 1; display: grid; gap: 14px; margin-top: 31px; }
.login-point { display: flex; align-items: center; gap: 11px; color: #edf5fb; font-size: .9rem; }
.login-point svg { color: var(--mint); }
.login-panel { padding: 40px; }
.login-panel h2 { font-size: 1.6rem; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.demo-box { margin-top: 22px; padding-top: 21px; border-top: 1px solid var(--line); }
.demo-profile-list { display: grid; gap: 8px; margin-top: 12px; }
.demo-profile { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; text-align: left; }
.demo-profile:hover { background: #f7f9fc; }
.demo-profile .avatar { width: 35px; height: 35px; }
.demo-profile small { display: block; color: var(--muted); }
.login-error { min-height: 22px; margin: 5px 0 0; color: var(--red); font-size: .84rem; }

label { display: grid; gap: 7px; margin-bottom: 16px; font-size: .88rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 47px;
  padding: 11px 12px;
  border: 1px solid #c8d5e1;
  border-radius: 10px;
  background: white;
  color: var(--text);
}
textarea { min-height: 98px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; accent-color: var(--blue); }
.checklabel { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; font-weight: 500; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
.field-note { margin: -9px 0 15px; color: var(--muted); font-size: .77rem; }
.notice { margin: 17px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.empty { padding: 27px; color: var(--muted); text-align: center; }

dialog {
  width: calc(100% - 28px);
  max-width: 560px;
  max-height: 90dvh;
  overflow: auto;
  padding: 27px;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  box-shadow: 0 35px 100px rgba(9, 30, 52, .28);
}
dialog.wide { max-width: 760px; }
dialog::backdrop { background: rgba(10, 31, 53, .58); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.modal-head h2 { margin: 0; }
.close { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #edf2f7; font-size: 1.45rem; line-height: 1; }
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 100;
  display: none;
  max-width: min(90%, 620px);
  padding: 13px 19px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: var(--navy);
  color: white;
  box-shadow: 0 10px 35px rgba(16, 43, 73, .24);
  text-align: center;
}
.demo-footer { margin-top: 26px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; text-align: center; }

@media (max-width: 1160px) {
  .flash-layout.with-media { grid-template-columns: minmax(190px, .62fr) minmax(0, 1.38fr); align-items: stretch; }
  .flash-layout.with-media .flash-progress { grid-column: 1 / -1; }
}

@media (max-width: 1020px) {
  .layout { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { width: 215px; padding-inline: 14px; }
  .content, .topbar { padding-inline: 26px; }
  .grid, .grid.equal { grid-template-columns: 1fr; }
  .draw-hero { grid-template-columns: 1fr; align-items: stretch; }
  .draw-hero .flash-progress { max-width: none; }
  .tutorials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-card, .next-card { min-height: auto; }
  .welcome-card .btn, .next-card .btn { margin-top: 25px; }
}

@media (max-width: 720px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .shell { min-height: 100dvh; }
  .topbar { min-height: 72px; padding: 0 18px; border-bottom: 0; background: var(--bg); }
  .topbar > .eyebrow { display: none; }
  .mobile-brand { display: flex; font-size: 1.02rem; }
  .mobile-brand .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
  .top-actions { gap: 8px; }
  .top-actions .avatar { display: none; }
  .content { padding: 8px 17px calc(95px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 19px; }
  .page-heading > .badge { display: none; }
  .card { padding: 19px; border-radius: 17px; }
  .grid, .grid.equal, .grid.three { gap: 13px; }
  .welcome-card { min-height: 290px; padding: 22px; }
  .welcome-card h2 { max-width: 80%; }
  .service-orbit { top: 20px; right: 18px; width: 58px; height: 58px; }
  .flash-card { padding: 21px; border-radius: 18px; }
  .flash-top { align-items: flex-start; }
  .flash-label { max-width: 58%; line-height: 1.35; }
  .flash-layout { grid-template-columns: 1fr; gap: 17px; margin-top: 17px; }
  .flash-layout.with-media { grid-template-columns: 1fr; }
  .flash-layout.with-media .flash-progress { grid-column: auto; }
  .draw-hero { gap: 17px; margin-top: 17px; }
  .draw-prizes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(245px, 82vw); gap: 11px; margin-right: -21px; padding-right: 21px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; }
  .draw-prize { scroll-snap-align: start; }
  .prize-media { height: 205px; }
  .challenge-history { grid-template-columns: 1fr; gap: 18px; padding: 21px; }
  .gift-media { min-height: 285px; max-height: 360px; }
  .flash-copy h2 { font-size: 1.8rem; }
  .flash-alert-row { align-items: flex-start; flex-direction: column; }
  .flash-alert-row .btn { width: 100%; }
  .quickgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 15px 0 22px; }
  .quick { min-height: 91px; align-items: center; padding: 13px 5px; text-align: center; font-size: .72rem; }
  .quick svg { width: 20px; height: 20px; }
  .contact-bar { grid-template-columns: 1fr 1fr; }
  .contact-bar > div:first-child { grid-column: 1 / -1; }
  .contact-bar .btn { width: 100%; padding-inline: 8px; font-size: .82rem; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    padding: 8px 5px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
  }
  .mobile-nav button { min-width: 57px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px; color: var(--muted); font-size: .66rem; }
  .mobile-nav button svg { width: 20px; height: 20px; }
  .mobile-nav button.active { color: var(--blue-dark); font-weight: 800; }
  .device-hero { grid-template-columns: auto 1fr; padding: 20px; }
  .device-hero .product-mark { width: 61px; height: 61px; }
  .device-status { grid-column: 1 / -1; text-align: left; }
  .detail-grid { grid-template-columns: 1fr; }
  .support-actions { grid-template-columns: repeat(2, 1fr); }
  .support-action:last-child { grid-column: 1 / -1; min-height: 86px; }
  .problems { grid-template-columns: 1fr; }
  .appointment-card { grid-template-columns: auto 1fr; }
  .appointment-card > .inline { grid-column: 1 / -1; }
  .tutorials, .document-grid { grid-template-columns: 1fr; }
  .formgrid { grid-template-columns: 1fr; }
  .referral-card { align-items: flex-start; flex-direction: column; }
  .alert-optin, .preference-card { grid-template-columns: auto 1fr; }
  .alert-optin .btn, .preference-card .btn { grid-column: 1 / -1; width: 100%; }
  .login { padding: 17px; }
  .login-brand { margin-bottom: 18px; }
  .login-grid { display: block; border-radius: 21px; }
  .login-intro { padding: 27px 23px; }
  .login-intro h1 { max-width: 300px; margin: 10px 0 7px; font-size: 1.75rem; }
  .login-intro p { margin-bottom: 0; font-size: .88rem; }
  .login-points { display: none; }
  .login-panel { padding: 24px 21px; }
  .login-panel h2 { font-size: 1.4rem; }
  dialog { padding: 22px 19px; }
  #toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 410px) {
  .quickgrid { grid-template-columns: repeat(2, 1fr); }
  .quick { min-height: 82px; }
  .support-actions { grid-template-columns: 1fr; }
  .support-action:last-child { grid-column: auto; }
  .contact-bar { grid-template-columns: 1fr; }
  .contact-bar > div:first-child { grid-column: auto; }
  .more-grid { grid-template-columns: 1fr; }
  .flash-top { display: grid; }
  .flash-label { max-width: none; }
  .flash-stock { justify-self: start; }
  .flash-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
  button:active, .btn:active { transform: scale(.98); }
  .content { animation: appear .2s ease; }
  @keyframes appear { from { opacity: .72; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}

@media print {
  body.printing #app, body.printing #toast, body.printing dialog .modal-head, body.printing dialog .print-actions { display: none !important; }
  body.printing dialog { position: static; display: block; width: 100%; max-width: none; max-height: none; padding: 0; box-shadow: none; }
  body.printing dialog::backdrop { display: none; }
  body.printing .document-preview { border: 0; }
}
