:root {
    --ink: #18242b;
    --muted: #6c7b82;
    --line: #dbe5e7;
    --bg: #f4f8f8;
    --card: #ffffff;
    --teal: #087f83;
    --teal-dark: #075e68;
    --mint: #d8f1ed;
    --orange: #f0a447;
    --danger: #b74949;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: var(--teal-dark); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 236px; background: #102d35; color: #eaf7f5; padding: 28px 18px 18px; display: flex; flex-direction: column; }
.brand-mark { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, #2db8ad, #087f83); color: #fff; font-weight: 800; letter-spacing: .08em; box-shadow: 0 8px 20px #061b2080; }
.brand-mark.large { margin: 0 auto 12px; width: 60px; height: 60px; font-size: 19px; }
.brand-name { margin-top: 12px; font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.brand-name.dark { color: var(--ink); text-align: center; }
.brand-subtitle { color: #98c9c7; font-size: 12px; text-transform: uppercase; letter-spacing: .15em; margin-top: 3px; }
.sidebar nav { margin-top: 42px; display: grid; gap: 6px; }
.sidebar nav a { color: #bdd6d6; padding: 11px 12px; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: #1a4e57; }
.soon { font-size: 10px; color: #85a7a9; align-self: center; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #2d555a; padding: 16px 12px 0; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sidebar-footer small { color: #b9d0d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 135px; }
.sidebar-footer a { color: #ffcb91; font-size: 13px; }
.main-content { flex: 1; padding: 34px 5vw 60px; max-width: 1500px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 5px 0 0; font-size: 30px; letter-spacing: -.04em; }
h2, h3, h4 { margin-top: 0; }
h2 { margin-bottom: 9px; font-size: 28px; letter-spacing: -.04em; }
h3 { margin-bottom: 0; font-size: 18px; }
h4 { margin: 26px 0 12px; color: var(--teal-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.user-chip { display: flex; align-items: center; gap: 9px; background: #fff; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 999px; color: #3a4a50; font-size: 13px; }
.avatar { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--teal-dark); font-weight: 800; }
.hero-panel { background: linear-gradient(125deg, var(--teal-dark), #129790); color: #fff; padding: 32px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; box-shadow: 0 14px 35px #087f8324; }
.hero-panel p { max-width: 650px; margin: 0; color: #d8f4f1; line-height: 1.6; }
.pill { display: inline-block; margin-bottom: 15px; border: 1px solid #9de2dc66; color: #d4f8f3; border-radius: 999px; padding: 5px 10px; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 11px 17px; cursor: pointer; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px #0c4d541f; }
.button.primary { background: var(--teal); color: #fff; }
.button.secondary { background: #edf4f4; color: var(--teal-dark); border: 1px solid var(--line); }
.button.light { background: #fff; color: var(--teal-dark); }
.button.full { width: 100%; margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 22px 0; }
.stat-card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 25px #18404d08; }
.stat-card { padding: 20px; display: grid; gap: 8px; }
.stat-card span, .stat-card small, .muted { color: var(--muted); }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; }
.stat-card small { font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); gap: 18px; margin: 18px 0; }
.content-grid.two-one { grid-template-columns: minmax(0, 1fr); }
.panel { padding: 23px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading a { font-size: 13px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
th, td { padding: 13px 10px; border-bottom: 1px solid #edf2f2; white-space: nowrap; }
td small.block { display: block; margin-top: 3px; }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 700; background: #e9f0f0; color: #4f666b; }
.status.active, .status.success { background: #dff5e8; color: #257147; }
.status.suspended, .status.expired, .status.inactive { background: #fbe4e2; color: #a33e3e; }
.check { border-top: 1px solid #edf2f2; padding: 14px 0; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check span { width: 25px; height: 25px; border-radius: 8px; background: #edf3f3; display: grid; place-items: center; color: var(--teal); font-size: 12px; font-weight: 800; }
.check.done span { background: var(--mint); }
.empty { padding: 28px 10px; color: var(--muted); text-align: center; }
.alert, .notice, .license-reveal { border-radius: 12px; padding: 13px 15px; margin-bottom: 18px; font-size: 14px; }
.alert.error { background: #fff0ee; border: 1px solid #f2cbc8; color: #923a36; }
.alert.success { background: #e8f8ee; border: 1px solid #bee7ca; color: #277044; }
.notice { background: #e9f6f6; border: 1px solid #b9e1df; color: #2d6163; }
.license-reveal { background: #fff5d6; border: 1px solid #e7c874; display: grid; gap: 7px; color: #654a18; }
.license-reveal code { width: fit-content; background: #fff; border: 1px dashed #c6a34b; border-radius: 8px; padding: 10px 12px; font-size: 17px; letter-spacing: .08em; color: #503907; }
.license-reveal small { color: #856c38; }
form { margin: 0; }
label { display: grid; gap: 6px; color: #45575d; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #cfdcde; border-radius: 9px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px #087f8317; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 15px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 15px; }
.form-help { font-size: 12px; margin: 7px 0 15px; }
.search-form { display: flex; gap: 10px; margin-bottom: 18px; }
.search-form input { flex: 1; }
.search-form .button { flex: 0 0 auto; }
.mini-input { width: 62px; padding: 4px 5px; font-size: 12px; }
.action-row { display: inline-flex; align-items: center; gap: 5px; }
.inline { display: inline; }
.link-button { background: none; border: 0; color: var(--teal-dark); padding: 0; cursor: pointer; font-weight: 700; font-size: 12px; }
.danger-text { color: var(--danger); }
.status.pending_cash { background: #fff2d3; color: #8a6415; }
.status.paid { background: #dff5e8; color: #257147; }
.status.cancelled { background: #fbe4e2; color: #a33e3e; }
.low-stock { color: var(--danger); font-weight: 800; }
.sale-items { display: grid; gap: 8px; margin-bottom: 16px; }
.sale-item-head, .sale-item-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, .6fr); gap: 10px; align-items: center; }
.sale-item-head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.finalize-form { display: inline-flex; align-items: center; gap: 7px; }
.finalize-form select { width: 145px; padding: 6px 7px; font-size: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #d8f1ed, transparent 35%), var(--bg); }
.auth-card, .install-card { width: min(100%, 470px); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 34px; box-shadow: 0 18px 50px #16465316; }
.install-card { width: min(100%, 850px); }
.auth-card h1, .install-card h1 { margin-top: 30px; font-size: 26px; }
.auth-card form { display: grid; gap: 16px; }
.auth-foot { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.install-card h2 { margin: 27px 0 12px; font-size: 15px; color: var(--teal-dark); }
.install-card .button { margin-top: 12px; }
@media (max-width: 900px) { .sidebar { width: 190px; } .main-content { padding: 25px 22px 45px; } .stat-grid { grid-template-columns: repeat(2, 1fr); } .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .app-shell { display: block; } .sidebar { width: 100%; padding: 15px 18px; display: block; } .brand-mark { display: inline-grid; vertical-align: middle; width: 34px; height: 34px; border-radius: 10px; } .brand-name, .brand-subtitle { display: inline-block; margin: 0 0 0 7px; vertical-align: middle; } .brand-subtitle { display: none; } .sidebar nav { margin-top: 14px; display: flex; overflow-x: auto; } .sidebar nav a { white-space: nowrap; } .sidebar-footer { margin-top: 15px; } .topbar { align-items: flex-start; } .user-chip { display: none; } .hero-panel { display: block; padding: 24px; } .hero-panel .button { margin-top: 20px; } .content-grid { grid-template-columns: 1fr; } .stat-grid { gap: 10px; } .stat-card { padding: 14px; } .stat-card strong { font-size: 22px; } .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } .form-actions, .search-form { align-items: stretch; flex-direction: column; } .sale-item-head, .sale-item-row { grid-template-columns: minmax(0, 1fr) 110px; } .finalize-form { display: flex; flex-direction: column; align-items: stretch; } .finalize-form select { width: 100%; } }
