@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root { --blue: #195cda; --navy: #152a4c; --muted: #65768e; --line: #e5eaf2; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--navy); background: #f5f7fb; font: 14px/1.65 Inter, system-ui, sans-serif; }
button, input, select { font: inherit; }
button { border: 1px solid transparent; border-radius: 9px; padding: 11px 18px; background: var(--blue); color: white; font-weight: 600; cursor: pointer; }
button:hover { background: #124bb8; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { color: #315078; background: white; border-color: #d9e2ef; }
button.secondary:hover { background: #f0f5fc; }
button.ghost { color: #6a7890; background: transparent; }
:focus-visible { outline: 3px solid #7caaff; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; padding: 34px 22px; display: flex; flex-direction: column; background: white; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 700; letter-spacing: -.4px; }
.brand img { width: 43px; height: 43px; object-fit: contain; border-radius: 10px; }
.brand b { color: var(--blue); }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; margin-top: 1px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 46px; }
.sidebar nav a { padding: 11px 15px; border-radius: 8px; color: #697991; font-weight: 500; }
.sidebar nav a:hover { background: #f5f7fb; }
.sidebar nav a.selected { background: #edf3ff; color: var(--blue); }
.sidebar-bottom { margin-top: auto; color: #8a95a7; font-size: 11px; padding: 16px 8px 0; display: flex; align-items: center; gap: 8px; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: #7da2e5; }
main { margin-left: 238px; padding: 36px 42px 20px; max-width: 1720px; }
h1, h2 { margin: 0; letter-spacing: -.6px; line-height: 1.4; }
h1 { font-size: 25px; }
h2 { font-size: 18px; }
p { margin: 0; }
.eyebrow { color: #8b98ad; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; margin-bottom: 5px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.actions { display: flex; gap: 8px; align-items: center; }
.login-layout { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 580px; background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 15px 55px #142c4b06; }
.login-intro { background: linear-gradient(145deg, #143575, #195cda); color: white; padding: 46px; display: flex; flex-direction: column; justify-content: space-between; }
.intro-logo { width: 68px; height: 68px; border-radius: 16px; margin-bottom: 28px; }
.login-intro h2 { font-size: 34px; line-height: 1.35; letter-spacing: -1px; margin-bottom: 20px; }
.login-intro p { color: #c6d8fa; max-width: 340px; }
.intro-features { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 50px; padding-top: 25px; border-top: 1px solid #ffffff26; }
.intro-features span { display: block; font-size: 11px; color: #b8cff8; margin-bottom: 5px; }
.intro-features strong { font-size: 12px; font-weight: 500; }
#login { display: flex; flex-direction: column; justify-content: center; gap: 21px; padding: 48px; min-width: 0; }
.form-heading { margin-bottom: 6px; }
.form-heading h2 { font-size: 23px; margin: 16px 0 8px; }
.form-heading p { color: var(--muted); font-size: 12px; }
.login-symbol { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 11px; background: #edf3ff; color: var(--blue); font-size: 12px; font-weight: 700; }
label { display: grid; gap: 7px; font-size: 12px; color: #52647e; font-weight: 500; min-width: 0; }
input, select { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #dfe5ee; border-radius: 8px; color: var(--navy); background: white; }
input::placeholder { color: #a5afbf; font-weight: 400; }
input:hover, select:hover { border-color: #b8c9e0; }
.first-time { display: grid; gap: 11px; text-align: center; padding-top: 5px; }
.password-field { position: relative; margin-top: -14px; }
.password-field input { padding-right: 70px; }
.password-toggle { position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 12px; background: transparent; color: var(--blue); font-size: 12px; }
.password-toggle:hover { background: #edf3ff; }
.first-time span { color: var(--muted); font-size: 12px; }
.admin-only { display: none !important; }
body.is-authenticated .admin-only { display: flex !important; }
body.is-authenticated .sidebar nav { display: grid !important; }
body.is-authenticated .login-layout { display: none; }
.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 23px; display: flex; flex-direction: column; }
.stat p { color: #7b889b; font-size: 12px; }
.stat strong { display: block; margin: 9px 0 8px; font-size: 31px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat small { font-size: 11px; color: #6e7e94; }
.revenue-stat { background: var(--navy); border-color: var(--navy); color: white; }
.revenue-stat p { color: #becbe0; }
.revenue-stat small { color: #96aac8; }
.panel, .price-panel { background: white; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; overflow: hidden; }
.price-panel { padding: 25px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.price-panel h2 { font-size: 21px; }
.muted { color: var(--muted); font-size: 12px; margin-top: 7px; }
#settings { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
#settings input { font-size: 17px; font-weight: 600; max-width: 215px; }
.panel-heading { padding: 23px 28px; border-bottom: 1px solid var(--line); }
.panel-heading p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: #8591a3; font-size: 10px; font-weight: 600; letter-spacing: .4px; background: #fafbfd; white-space: nowrap; }
td, th { padding: 15px 24px; border-bottom: 1px solid #edf0f5; }
td { max-width: 280px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafcff; }
.empty { padding: 40px 24px; text-align: center; color: #6e7e94; font-size: 12px; }
.license { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.license:last-child { border: 0; }
.license strong { display: block; font-size: 13px; overflow-wrap: anywhere; font-family: monospace; color: #27579d; margin-bottom: 6px; }
.license p { color: var(--muted); font-size: 12px; margin-bottom: 15px; }
.license button { padding: 8px 12px; font-size: 11px; margin: 4px; }
.license input { max-width: 85px; }
.license select { width: auto; }
.coupon-form { padding: 25px 28px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; border-bottom: 1px solid var(--line); }
.checkbox { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 45px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--blue); }
.coupon-footer { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; }
.coupon-footer p { color: #8a97aa; font-size: 11px; }
.page-footer { color: #98a4b5; font-size: 11px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 0; }
#message { padding: 13px 17px; border: 1px solid #c8dafa; background: #edf4ff; color: #2454a0; border-radius: 9px; margin-bottom: 20px; white-space: pre-wrap; }
[hidden] { display: none !important; }
@media (min-width:1550px) { .login-layout { max-width: 1080px; } }
@media (max-width:1150px) {
  .sidebar { width: 205px; padding: 28px 16px; }
  main { margin-left: 205px; padding: 28px; }
  .login-intro, #login { padding: 32px; }
  .login-intro h2 { font-size: 28px; }
  .coupon-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:850px) {
  .sidebar { position: static; width: auto; padding: 18px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-bottom { display: none; }
  .sidebar nav { margin-top: 16px; grid-template-columns: repeat(3,1fr); }
  main { margin: 0; padding: 25px 20px; }
  .login-layout { min-height: 0; }
  .login-intro { padding: 32px 24px; }
  .intro-features { flex-direction: column; gap: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .revenue-stat { grid-column: 1/-1; }
  .page-header { flex-wrap: wrap; }
}
@media (max-width:560px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro, #login { padding: 28px; }
  .login-intro h2 { font-size: 26px; }
  .intro-logo { width: 48px; height: 48px; margin-bottom: 16px; }
  .intro-features { display: none; }
  .coupon-form { grid-template-columns: 1fr; padding: 20px; }
  .panel-heading { padding: 20px; }
  .stat { padding: 18px; }
  .stat strong { font-size: 26px; }
  .price-panel { padding: 22px; }
  h1 { font-size: 22px; }
  td, th { padding: 12px 16px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }
