:root {
    --brand: #0d6efd;
    --brand-dark: #0a58ca;
    --surface: #f4f7fb;
    --card-radius: 0.75rem;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    background: var(--surface);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body:has(.login-page) {
    background:
        radial-gradient(circle at top left, #cfe2ff 0%, transparent 45%),
        radial-gradient(circle at bottom right, #e7f1ff 0%, transparent 40%),
        linear-gradient(160deg, #eef3f9, #f8fafc);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 12px 40px rgba(13, 110, 253, 0.12);
}

.login-card .card-body {
    padding: 2rem 1.5rem;
}

@media (min-width: 576px) {
    .login-card .card-body {
        padding: 2.25rem;
    }
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 0;
}

.stat-card {
    border: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.table-card {
    border: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.table th {
    white-space: nowrap;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
}

.table td {
    vertical-align: middle;
}

.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: #e9ecef;
}

.form-card {
    border: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    max-width: 640px;
}

.action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.navbar .nav-link.active {
    font-weight: 600;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.sort-link:hover,
.sort-link.active {
    color: var(--brand);
}

@media (max-width: 575.98px) {
    .table td, .table th {
        font-size: 0.875rem;
    }

    .action-btns .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .hide-mobile {
        display: none !important;
    }
}
