:root {
    --bg: #07111f;
    --panel: rgba(10, 20, 36, 0.84);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f6fbff;
    --muted: #94a9c6;
    --accent: #5eead4;
    --accent-strong: #10b981;
    --accent-warm: #f59e0b;
    --shadow: 0 24px 80px rgba(1, 10, 25, 0.46);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 24%),
        linear-gradient(180deg, #08111e 0%, #0b1727 42%, #09121e 100%);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.shell {
    max-width: 1480px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    align-items: center;
}

.auth-grid, .content-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.hero-card, .panel-card, .sheet, .login-card, .stats-card, .customer-card, .toolbar, .staff-card {
    background: var(--panel);
    backdrop-filter: blur(26px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-card {
    border-radius: 40px;
    padding: 38px;
    min-height: 540px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.35), rgba(16, 185, 129, 0));
    top: -80px;
    right: -80px;
}

.eyebrow, .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }

.hero-card h1, .brand-text h1, .login-card h2, .sheet-header h3, .section-title h2, .stats-value {
    font-family: "Plus Jakarta Sans", sans-serif;
}

.hero-card h1 {
    margin: 18px 0 12px;
    max-width: 560px;
    font-size: clamp(36px, 4vw, 60px);
    line-height: 1.02;
}

.hero-card p, .brand-text p, .mini-note, .muted, .section-title p {
    color: var(--muted);
}

.hero-card p, .mini-note { line-height: 1.7; }
.mini-note { font-size: 13px; }

.feature-grid, .stats-grid, .customer-grid, .staff-grid, .distribution-list, .recent-list, .step-content {
    display: grid;
    gap: 14px;
}

.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }

.feature-item {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-item strong { display: block; margin-bottom: 6px; }

.login-card, .panel-card, .stats-card, .customer-card, .staff-card { border-radius: 30px; padding: 22px; }
.toolbar { border-radius: 26px; padding: 16px; }
.login-card { padding: 28px; }

.field { display: grid; gap: 10px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }

.input, .textarea, .select {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 15px 16px;
}

.textarea { min-height: 108px; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    font-weight: 800;
}

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #032019; }
.btn-secondary { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--line); }
.btn-warm { background: linear-gradient(135deg, #fbbf24, #fb923c); color: #2c1302; }

.app-grid { display: grid; gap: 24px; padding-bottom: 108px; }
.topbar, .toolbar, .section-title, .customer-header, .staff-meta, .sheet-header, .distribution-item, .recent-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.26), rgba(16, 185, 129, 0.12));
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--accent);
}

.brand-text h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); }
.brand-text p { margin: 6px 0 0; }

.toolbar-actions, .segmented, .chip-row, .action-row, .thumb-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.segment, .nav-btn {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}

.segment.active, .nav-btn.active { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-label { color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.stats-value { font-size: clamp(30px, 4vw, 42px); font-weight: 900; }

.customer-name, .staff-name { font-size: 20px; font-weight: 800; }
.customer-body { display: grid; gap: 14px; margin-top: 14px; }
.info-row { color: var(--muted); line-height: 1.6; }

.thumb-strip { overflow-x: auto; padding-bottom: 4px; }
.thumb {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.thumb img, .preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.distribution-item, .recent-item, .empty-state {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.distribution-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 10px;
}

.distribution-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 16, 0.68);
    backdrop-filter: blur(10px);
    display: none;
    align-items: end;
    justify-content: center;
    z-index: 40;
    padding: 14px;
}

.sheet-backdrop.open { display: flex; }
.sheet {
    width: min(100%, 760px);
    max-height: calc(100vh - 20px);
    overflow: auto;
    border-radius: 34px 34px 18px 18px;
    padding: 22px;
}

.steps, .grid-2, .preview-grid {
    display: grid;
    gap: 12px;
}

.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step-pill, .upload-zone {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.step-pill.active, .upload-zone {
    border-color: rgba(94, 234, 212, 0.28);
    background: rgba(94, 234, 212, 0.08);
}

.upload-zone { text-align: center; }
.preview-card { border-radius: 18px; overflow: hidden; min-height: 110px; background: rgba(255, 255, 255, 0.05); }

.bottom-nav, .toast {
    position: fixed;
    background: rgba(8, 18, 32, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 50;
}

.bottom-nav {
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: none;
    gap: 10px;
    width: min(calc(100% - 24px), 680px);
    padding: 10px;
    border-radius: 24px;
}

.fab {
    position: fixed;
    right: 22px;
    bottom: 96px;
    width: 66px;
    height: 66px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #032019;
    font-size: 30px;
    font-weight: 700;
    box-shadow: 0 20px 38px rgba(16, 185, 129, 0.26);
    z-index: 52;
}

.toast {
    top: 18px;
    right: 18px;
    max-width: min(92vw, 360px);
    padding: 14px 16px;
    border-radius: 18px;
}

@media (max-width: 1080px) {
    .auth-grid, .content-grid { grid-template-columns: 1fr; }
    .hero-card { min-height: auto; }
}

@media (max-width: 820px) {
    .shell { padding: 16px; }
    .stats-grid, .grid-2, .preview-grid { grid-template-columns: 1fr; }
    .toolbar .segmented { display: none; }
    .bottom-nav { display: flex; }
}

@media (max-width: 640px) {
    .hero-card, .login-card, .panel-card, .customer-card, .staff-card, .sheet { border-radius: 26px; }
    .feature-grid, .steps { grid-template-columns: 1fr; }
    .action-row .btn, .toolbar-actions .btn { width: 100%; }
}
