:root {
    /* Brand Color Palette */
    --primary: #172660;
    --primary-light: #d0e6fd;
    --secondary: #475569;
    --accent: #2ecc71;
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: rgba(0, 0, 0, 0.08);

    /* Variables */
    --sidebar-width: 280px;
    --header-height: 80px;
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Glassmorphism - Branded */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 10px 40px 0 rgba(23, 38, 96, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    /* Default lighter weight */
    line-height: 1.6;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--dark);
    min-height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.03);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.logo i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 24px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 2px;
    padding: 0 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: var(--transition);
}

.sidebar-nav a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav a:hover {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar-nav li.active a {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.15);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-title h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    color: var(--gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
}

.content-wrapper {
    padding: 32px;
    flex: 1;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    margin-bottom: 32px;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    color: var(--primary);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background: #fff;
}

.calculated-field {
    background: rgba(0, 0, 0, 0.05);
    color: var(--secondary);
    font-weight: 600;
    cursor: not-allowed;
    border-style: dashed;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.btn i {
    font-size: 0.85rem;
    color: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f2994a, #f2c94c);
    color: white;
    box-shadow: 0 4px 15px rgba(242, 153, 74, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 153, 74, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #cb2d3e, #ef473a);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 71, 58, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 71, 58, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
}

.table th {
    text-align: left;
    padding: 20px;
    color: var(--gray);
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.table td {
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    vertical-align: middle;
    font-size: 0.95rem;
}

.table tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.table tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.table tbody tr {
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.002);
}

/* Badges / Status */
.badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.badge-paid {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border: 1px solid rgba(67, 97, 238, 0.2);
}

.badge-collected {
    background: rgba(247, 37, 133, 0.1);
    color: var(--warning);
    border: 1px solid rgba(247, 37, 133, 0.2);
}

.badge-results {
    background: rgba(56, 239, 125, 0.1);
    color: #11998e;
    border: 1px solid rgba(56, 239, 125, 0.2);
}

.badge-verified {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s ease;
}

.alert-success {
    background: rgba(56, 239, 125, 0.1);
    border-left: 4px solid #38ef7d;
    color: #11998e;
}

.alert-error {
    background: rgba(239, 71, 58, 0.1);
    border-left: 4px solid #ef473a;
    color: #cb2d3e;
}

/* Bill display container */
.bill-display {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px dashed #ccc;
    font-family: monospace;
    max-width: 400px;
    margin: 20px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.bill-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.bill-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #333;
    font-weight: bold;
    font-size: 16px;
}

/* Mobile Offcanvas Styles */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    margin-right: 15px;
}

.offcanvas-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 95;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s;
}

.offcanvas-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.offcanvas-active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .glass-card {
        padding: 20px 15px;
    }
    
    .top-header {
        padding: 0 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table th, .table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .table {
        min-width: 650px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 0;
        margin-bottom: 15px;
        display: block;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}