/* Secure Billing System Styles */

:root {
    --sidebar-width: 250px;
    --primary: #0d6efd;
    --dark: #212529;
}

body {
    overflow-x: hidden;
    background: #f4f6f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#wrapper {
    min-height: 100vh;
}

#sidebar-wrapper {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    transition: margin 0.25s ease-out;
    min-height: 100vh;
}

#sidebar-wrapper .list-group-item {
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item.active {
    background-color: #0d6efd !important;
    color: #fff !important;
}

#sidebar-wrapper.toggled {
    margin-left: calc(-1 * var(--sidebar-width));
}

#page-content-wrapper {
    min-width: 0;
    width: 100%;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

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

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

/* Tables */
.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .card-header {
    background: transparent;
    border: none;
    padding-top: 2rem;
}

/* Invoice / Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    .invoice-print, .invoice-print * {
        visibility: visible;
    }
    .invoice-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
    #sidebar-wrapper, .navbar {
        display: none !important;
    }
}

.invoice-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.invoice-box table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-box table th,
.invoice-box table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

/* Badge helpers */
.badge-stock-ok { background: #198754; }
.badge-stock-low { background: #ffc107; color: #000; }
.badge-stock-out { background: #dc3545; }

/* Form */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar-wrapper.toggled {
        margin-left: 0;
    }
}
