@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --background-gradient: linear-gradient(180deg, #f4f7fa 0%, #e4e9f1 100%);
    --surface-color: #ffffff;
    --surface-alt: #f1f4fb;
    --surface-muted: rgba(33, 48, 84, 0.06);
    --border-color: rgba(33, 48, 84, 0.15);
    --text-primary: #0f172a;
    --text-muted: rgba(15, 23, 42, 0.65);
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --card-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    letter-spacing: .2px;
}

a {
    color: var(--accent);
}

a:hover,
a:focus {
    color: #9df3ff;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app-sidebar .brand {
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text-primary);
}

.app-sidebar .brand span {
    font-size: .85rem;
    color: var(--text-muted);
}

.nav-pills .nav-link {
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 500;
    transition: background .2s ease, color .2s ease;
}

.nav-pills .nav-link i {
    font-size: 1.05rem;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    color: var(--text-primary);
    background: var(--surface-alt);
}

.user-pill {
    padding: .85rem 1rem;
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: .9rem;
    color: var(--text-muted);
}

.app-main {
    flex: 1;
    padding: 2.5rem 3rem;
}

.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading h1 {
    font-size: 2rem;
    font-weight: 600;
}

.section-heading small {
    color: var(--text-muted);
}

.card-panel {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 600;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: .9rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(93, 224, 230, 0.15);
    display: grid;
    place-items: center;
    color: var(--accent);
    margin-bottom: 1rem;
}

.btn-gradient {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .85rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 15px 30px rgba(4, 18, 59, 0.35);
    transition: transform .15s ease, box-shadow .2s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 20px 40px rgba(4, 18, 59, 0.4);
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

.table-modern thead {
    background: rgba(255, 255, 255, 0.02);
}

.product-grid-wrapper {
    position: relative;
    border-radius: var(--radius-md);
}

.product-grid-wrapper .grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 24, 0.86);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.product-grid-wrapper.disabled-grid .grid-overlay {
    opacity: 1;
}

.pos-instructions {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.pos-instructions h6 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.pos-instructions small {
    color: var(--text-muted);
}
.table-modern th,
.table-modern td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-modern tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge-soft {
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .8rem;
}

.badge-soft.success { background: rgba(76, 217, 100, 0.2); color: #97ffb4; }
.badge-soft.warning { background: rgba(255, 209, 102, 0.2); color: #ffe4a5; }
.badge-soft.info { background: rgba(93, 224, 230, 0.2); color: #a8f3f6; }
.badge-soft.danger { background: rgba(255, 107, 107, 0.2); color: #ffc3c3; }

.form-control,
.form-select,
textarea {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(4, 10, 24, 0.8);
    color: var(--text-primary);
    padding: .8rem 1rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(93, 224, 230, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(93, 224, 230, 0.15);
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(4, 10, 24, 0.85);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
}

.login-card .brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(93, 224, 230, 0.15);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}

.product-card:hover,
.product-card.selected {
    transform: translateY(-4px);
    border-color: rgba(93, 224, 230, 0.6);
}

.cart-item {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
}

.receipt-wrapper {
    max-width: 480px;
    margin: 2rem auto;
    background: rgba(4, 10, 24, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        height: auto;
        flex-direction: column;
        position: relative;
    }
    .app-main {
        padding: 1.5rem;
    }
}
