:root {
  --primary: #5d56c8;
  --primary-glow: rgba(93, 86, 200, 0.42);
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f8f7ff;
  --border: #dbe4f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --green: #067647;
  --green-bg: #ecfdf3;
  --amber: #b54708;
  --amber-bg: #fffaeb;
  --red: #b42318;
  --red-bg: #fef3f2;
  --shadow: 0 20px 46px rgba(15, 23, 42, 0.12), 0 16px 38px rgba(93, 86, 200, 0.08);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --headline: Inter, "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text-dark); line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4, .company-name { font-family: var(--headline); font-weight: 600; letter-spacing: -0.02em; }
a { color: inherit; }
.hidden { display: none !important; }
.container { width: 100%; max-width: 88rem; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-dark); }
.brand-icon { width: 44px; height: 44px; border-radius: 1rem; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; box-shadow: 0 0 18px var(--primary-glow); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.company-name { font-size: 1.65rem; color: var(--text-dark); }
.company-tag { margin-top: 0.2rem; color: var(--text-muted); font-size: 0.72rem; font-family: var(--mono); }
.nav-links { display: flex; align-items: center; gap: 0.75rem; }
.nav-links a, .nav-links button { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 0.5rem; border: 0; background: transparent; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.nav-links a:hover, .nav-links button:hover { background-color: rgba(93, 86, 200, 0.15); color: var(--text-dark); box-shadow: 0 0 18px var(--primary-glow); }
.btn-nav { background-color: var(--primary) !important; color: #fff !important; }

.login-wrap { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 3rem 0; }
.login-panel { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 0.9fr; gap: 1.25rem; align-items: stretch; }
.login-copy, .login-card { border: 1px solid var(--border); border-radius: 2rem; background: var(--surface); box-shadow: var(--shadow); padding: 2rem; }
.login-copy { background: linear-gradient(140deg, #ffffff 0%, #f8f7ff 70%, #eef3ff 100%); position: relative; overflow: hidden; }
.login-copy::after, .hero-panel::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px); background-size: 56px 56px; pointer-events: none; }
.login-copy > * { position: relative; z-index: 1; }
.login-copy h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; margin: 1rem 0; }
.login-card { display: grid; align-content: center; gap: 1rem; }

.badge { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 500; padding: 0.4rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; background-color: rgba(93, 86, 200, 0.08); color: #5d56c8; width: fit-content; }
.badge .dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; background-color: #a78bfa; }
.lead { font-size: 1.05rem; color: var(--text-muted); max-width: 42rem; margin: 0; }
.small-title { font-family: var(--mono); color: var(--primary); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }

.btn-primary, .btn-secondary, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.82rem 1.15rem; font-size: 0.875rem; font-weight: 600; text-decoration: none; border-radius: 0.75rem; transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background-color: var(--primary); color: #fff; }
.btn-secondary { border-color: var(--border); background-color: #fff; color: var(--text-muted); }
.btn-danger { border-color: #fecaca; background-color: #fff; color: var(--red); }
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover { box-shadow: 0 0 18px var(--primary-glow); }
.btn-secondary:hover { color: var(--text-dark); border-color: #3b4860; }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; padding: 1.25rem 0 4rem; }
.sidebar { position: sticky; top: 6rem; height: calc(100vh - 7rem); border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); padding: 1rem; box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08); display: flex; flex-direction: column; gap: 1rem; }
.sidebar-title { padding: 0.75rem; border-radius: 1rem; background: var(--surface-soft); border: 1px solid var(--border); }
.sidebar-title strong { display: block; }
.sidebar-title span { color: var(--text-muted); font-size: 0.82rem; }
.side-nav { display: grid; gap: 0.35rem; }
.side-nav button { width: 100%; border: 0; background: transparent; color: var(--text-muted); border-radius: 0.75rem; padding: 0.72rem 0.75rem; text-align: left; cursor: pointer; font-weight: 600; display: flex; gap: 0.6rem; align-items: center; }
.side-nav button.active { background: rgba(93, 86, 200, 0.12); color: var(--primary); }
.side-nav button:hover { background: rgba(93, 86, 200, 0.08); color: var(--text-dark); }
.profile { margin-top: auto; border: 1px solid var(--border); border-radius: 1rem; padding: 0.75rem; display: flex; gap: 0.75rem; align-items: center; background: #ffffff; }
.avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; color: white; background: var(--primary); font-weight: 700; }
.profile strong, .profile span { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile span { color: var(--text-muted); font-size: 0.78rem; }
.main { min-width: 0; }
.hero-panel { border: 1px solid var(--border); border-radius: 2rem; background: linear-gradient(140deg, #ffffff 0%, #f8f7ff 65%, #eef3ff 100%); box-shadow: var(--shadow); overflow: hidden; position: relative; padding: 2rem; margin-bottom: 1.25rem; }
.hero-content { position: relative; z-index: 1; max-width: 56rem; }
.hero-panel h1 { margin: 1rem 0 0.75rem; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.02; letter-spacing: -0.04em; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 1rem; margin-bottom: 1.25rem; align-items: start; }
.card { border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06); overflow: hidden; }
.card-head { padding: 1.2rem 1.2rem 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-head h2 { margin: 0; font-size: 1.2rem; }
.card-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.9rem; }
.card-body { padding: 1.2rem; }
.stat { padding: 1.35rem; display: flex; gap: 1rem; align-items: center; }
.stat-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 1rem; color: var(--primary); background: rgba(93, 86, 200, 0.12); font-size: 1.35rem; flex: none; }
.stat h3 { margin: 0; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.stat strong { display: block; margin-top: 0.2rem; font-size: 1.8rem; letter-spacing: -0.04em; line-height: 1; }
.install-list { display: grid; gap: 0.75rem; }
.install-card { display: grid; grid-template-columns: 3rem 1fr auto; gap: 0.75rem; align-items: center; border: 1px solid var(--border); border-radius: 1.1rem; padding: 0.85rem; cursor: pointer; background: #fff; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.install-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1); }
.install-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 86, 200, 0.13); background: #fbfaff; }
.install-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; background: var(--surface-soft); color: var(--primary); }
.install-card strong { display: block; line-height: 1.1; }
.install-card span { color: var(--text-muted); display: block; font-size: 0.82rem; margin-top: 0.15rem; }
.tag { display: inline-flex; border-radius: 999px; padding: 0.28rem 0.6rem; font-size: 0.75rem; font-weight: 700; background: rgba(93, 86, 200, 0.12); color: var(--primary); width: fit-content; }
.tag.green { color: var(--green); background: var(--green-bg); }
.tag.amber { color: var(--amber); background: var(--amber-bg); }
.tag.red { color: var(--red); background: var(--red-bg); }
.tag.gray { color: #475569; background: #f1f5f9; }
.details-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 1rem; }
.info-box { border: 1px solid var(--border); border-radius: 1.15rem; background: #fff; padding: 1rem; }
.row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.row:last-child { border-bottom: 0; }
.row span { color: var(--text-muted); }
.row strong { text-align: right; }
.usage { display: grid; gap: 1rem; }
.usage-row { display: grid; gap: 0.5rem; }
.usage-top { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; font-weight: 600; }
.bar { height: 0.65rem; background: #eef2f7; overflow: hidden; border-radius: 999px; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.notice { margin-top: 1rem; border: 1px solid #d8d5ff; border-radius: 1rem; padding: 0.8rem 0.95rem; color: #4338ca; background: #f8f7ff; font-size: 0.88rem; }
.actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 1rem; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.plan-card { padding: 1.25rem; position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12); }
.plan-card.recommended { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 86, 200, 0.12), 0 16px 30px rgba(15, 23, 42, 0.08); }
.status-pill { display: inline-flex; margin-bottom: 0.65rem; padding: 0.3rem 0.55rem; border-radius: 0.5rem; font-size: 0.74rem; color: #5d56c8; background: rgba(93, 86, 200, 0.14); }
.plan-card h3 { margin: 0; font-size: 1.2rem; }
.price { font-size: 2rem; font-weight: 700; letter-spacing: -0.05em; margin: 0.5rem 0 0; }
.price small { font-size: 0.86rem; color: var(--text-muted); font-weight: 500; }
.plan-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.plan-card ul { display: grid; gap: 0.45rem; list-style: none; padding: 0; margin: 1rem 0; color: var(--text-muted); font-size: 0.88rem; }
.plan-card li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 0.45rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; font-size: 0.9rem; }
th, td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--mono); background: #fbfcff; }
td .muted { color: var(--text-muted); font-size: 0.82rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: #334155; }
.field input, .field select, .field textarea { border: 1px solid var(--border); border-radius: 0.85rem; padding: 0.78rem 0.9rem; background: #fff; outline: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(93, 86, 200, 0.12); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.44); z-index: 300; display: grid; place-items: center; padding: 1rem; }
.modal { width: min(760px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 1.5rem; box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.9rem; }
.modal-body { padding: 1.25rem; }
.modal-actions { padding: 0 1.25rem 1.25rem; display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.empty-state { padding: 2rem; text-align: center; border: 1px dashed var(--border); border-radius: 1.25rem; background: #fff; }
.empty-state h2 { margin: 0 0 .45rem; }
.empty-state p { color: var(--text-muted); margin: 0; }
.error { border-color: #fecaca; color: var(--red); background: var(--red-bg); }

@media (max-width: 1100px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .side-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } .profile { display: none; } .grid-3, .grid-2, .details-grid, .plans, .login-panel { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .container { padding-left: 1rem; padding-right: 1rem; } .nav-links { display: none; } .hero-panel, .login-copy, .login-card { padding: 1.3rem; border-radius: 1.5rem; } .side-nav { grid-template-columns: 1fr 1fr; } .form-grid { grid-template-columns: 1fr; } .install-card { grid-template-columns: 3rem 1fr; } .install-card .tag { grid-column: 2; } }
