/* Saku Grocery Management System Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    
    --font-family-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.5;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--gray-800);
    background-color: var(--gray-100);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Layout */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    padding-right: 15px;
    padding-left: 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
    border-radius: calc(var(--border-radius) - 1px) calc(var(--border-radius) - 1px) 0 0;
    font-weight: 600;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-300);
    border-radius: 0 0 calc(var(--border-radius) - 1px) calc(var(--border-radius) - 1px);
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-700);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--gray-700);
    background-color: var(--white);
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-700);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: var(--white);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--gray-400);
    border-radius: 0.25em;
    float: left;
    margin-left: -1.5em;
}

.form-check-label {
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: var(--white);
    background-color: #1e2a36;
    border-color: #1a252f;
}

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    color: var(--white);
    background-color: #2980b9;
    border-color: #2471a3;
}

.btn-success {
    color: var(--white);
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    color: var(--white);
    background-color: #219a52;
    border-color: #1e8449;
}

.btn-danger {
    color: var(--white);
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    color: var(--white);
    background-color: #c0392b;
    border-color: #a93226;
}

.btn-warning {
    color: var(--gray-800);
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    color: var(--gray-800);
    background-color: #e67e22;
    border-color: #d68910;
}

.btn-info {
    color: var(--white);
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.btn-info:hover {
    color: var(--white);
    background-color: #138496;
    border-color: #117a8b;
}

.btn-light {
    color: var(--gray-800);
    background-color: var(--light-color);
    border-color: var(--light-color);
}

.btn-light:hover {
    color: var(--gray-800);
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.btn-dark {
    color: var(--white);
    background-color: var(--dark-color);
    border-color: var(--dark-color);
}

.btn-dark:hover {
    color: var(--white);
    background-color: #23272b;
    border-color: #1d2124;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-dismissible {
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.alert-primary {
    color: #1b1e21;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-secondary {
    color: #1b1e21;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1.25rem 1rem;
    color: inherit;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--gray-800);
    vertical-align: top;
    border-color: var(--gray-300);
}

.table th,
.table td {
    padding: 0.5rem;
    border-top: 1px solid var(--gray-300);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--gray-300);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-light { color: var(--light-color); }
.text-dark { color: var(--dark-color); }
.text-muted { color: var(--gray-600); }

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.bg-primary { background-color: var(--primary-color); color: white; }
.bg-secondary { background-color: var(--secondary-color); color: white; }
.bg-success { background-color: var(--success-color); color: white; }
.bg-danger { background-color: var(--danger-color); color: white; }
.bg-warning { background-color: var(--warning-color); color: black; }
.bg-info { background-color: var(--info-color); color: white; }
.bg-light { background-color: var(--light-color); color: black; }
.bg-dark { background-color: var(--dark-color); color: white; }
.bg-white { background-color: var(--white); color: black; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Navigation */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--white);
}

.navbar-brand {
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
    color: var(--white);
    font-weight: 600;
}

.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--white);
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.nav-link:hover {
    color: var(--gray-300);
}

/* Login/Auth specific styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Dashboard specific styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--gray-100);
}

/* Settings Page Styles */
.settings-nav-card {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.settings-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.settings-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s ease;
    background: var(--white);
}

.settings-nav .nav-item:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.settings-nav .nav-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.settings-nav .nav-item i {
    font-size: 1.1rem;
}

.settings-form-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.settings-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-header h5 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h5 i {
    color: var(--secondary-color);
}

.section-description {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.9rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--secondary-color);
    width: 16px;
    text-align: center;
}

.form-control, .form-select {
    border: 2px solid var(--gray-300);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

/* Maintenance Page Styles */
.maintenance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.maintenance-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.maintenance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.maintenance-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1.25rem;
    border-bottom: none;
}

.maintenance-card .card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.maintenance-card .card-body {
    padding: 1.5rem;
}

.card-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.backup-actions, .cache-actions, .log-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.backup-info, .update-status, .security-status {
    margin-top: 1rem;
}

.backup-info small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--gray-800);
    font-weight: 500;
}

.status-good {
    color: var(--success-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-warning {
    color: var(--warning-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.current-version {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.update-check {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-nav {
        flex-direction: column;
    }
    
    .settings-nav .nav-item {
        justify-content: center;
        text-align: center;
    }
    
    .settings-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .maintenance-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .backup-actions, .cache-actions, .log-actions {
        gap: 0.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .settings-form {
        padding: 1rem;
    }
    
    .section-header h5 {
        font-size: 1.1rem;
    }
    
    .maintenance-card .card-body {
        padding: 1rem;
    }
    
    .maintenance-card .card-header {
        padding: 1rem;
    }
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover::before {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover::before {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-secondary:hover::before {
    background: rgba(108, 117, 125, 0.1);
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Form Enhancement */
.form-control:invalid {
    border-color: var(--danger-color);
}

.form-control:valid {
    border-color: var(--success-color);
}

/* Sidebar Enhancement for Settings */
.sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding-left: calc(1rem - 4px);
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.sidebar {
    background-color: var(--primary-color);
    color: var(--white);
    min-height: 100vh;
    width: 250px;
    flex-shrink: 0;
    padding: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-header small {
    opacity: 0.8;
    font-size: 0.875rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu a {
    display: block;
    color: var(--white);
    padding: 0.875rem 1rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
    text-decoration: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    background-color: var(--white);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-300);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-bar h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-800);
}

.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: var(--gray-100);
    max-height: calc(100vh - 80px); /* Prevent content from stretching beyond viewport */
    box-sizing: border-box;
}

/* Chart container styles */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    overflow: hidden;
}

.chart-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: 300px !important;
}

.content-wrapper {
    padding: 1rem;
}

/* Stats cards */
.stats-card {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: var(--white);
    border: none;
}

.stats-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.stats-icon {
    font-size: 3rem;
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    
    /* Dashboard responsive */
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .sidebar-menu li {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .top-bar {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-nav {
        flex-direction: column;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }
}