:root {
    --bg: #f3efe6;
    --bg-accent: #ebe2d2;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #1b1b1b;
    --muted: #5f5a52;
    --line: rgba(27, 27, 27, 0.08);
    --brand: #d35d47;
    --brand-dark: #9f3f2d;
    --brand-soft: #f4c7bc;
    --shadow: 0 24px 70px rgba(54, 36, 20, 0.16);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(211, 93, 71, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(80, 118, 92, 0.18), transparent 28%),
        linear-gradient(135deg, var(--bg), var(--bg-accent));
}

.screen {
    display: none !important;
}

.screen.active-screen {
    display: block !important;
}

#login-screen.active-screen {
    display: flex !important;
}

.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(211, 93, 71, 0.12);
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card {
    position: relative;
    width: min(100%, 460px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.login-card__accent {
    height: 14px;
    background: linear-gradient(90deg, #d35d47, #f0aa4f, #50765c);
}

.login-card h1,
.topbar h2,
.module-panel h3 {
    font-weight: 700;
}

.form-control,
.form-select {
    border: 1px solid rgba(27, 27, 27, 0.12);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(211, 93, 71, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(211, 93, 71, 0.15);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.demo-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar,
.module-panel,
.report-card {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.topbar {
    padding: 1.4rem 1.6rem;
}

.dashboard-tile {
    width: 100%;
    min-height: 210px;
    padding: 1.6rem;
    border: 0;
    border-radius: 26px;
    color: var(--text);
    text-align: left;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.dashboard-tile:hover,
.dashboard-tile:focus {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(54, 36, 20, 0.2);
}

.dashboard-tile strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.45rem;
}

.dashboard-tile span:last-child {
    color: var(--muted);
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 1.35rem;
    border-radius: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.58);
}

.tile-customers { background: linear-gradient(145deg, #fff8ef, #f6d8c7); }
.tile-orders { background: linear-gradient(145deg, #fdf0e7, #f1c28b); }
.tile-inventory { background: linear-gradient(145deg, #f1f7eb, #bfd7b8); }
.tile-reports { background: linear-gradient(145deg, #f2f2ec, #d9d7c8); }
.tile-users { background: linear-gradient(145deg, #edf4f7, #bbd1dc); }
.tile-products { background: linear-gradient(145deg, #fbf0f5, #e9bfd0); }

.module-panel {
    padding: 1.5rem;
}

.module-panel .table {
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.table > :not(caption) > * > * {
    padding: 1rem;
    vertical-align: middle;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
}

.report-card {
    padding: 1.4rem;
    min-height: 160px;
}

.report-card h4 {
    font-size: 2.4rem;
    font-weight: 700;
}

.modal-content {
    border-radius: 24px;
    background: var(--surface-strong);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

@media (max-width: 767px) {
    .login-card {
        margin: 1rem;
    }

    .dashboard-tile {
        min-height: 180px;
    }

    .topbar,
    .module-panel,
    .report-card {
        border-radius: 20px;
    }
}