/* Shared Standard Styles for all pages */

:root {
    --primary-dark: #333333;
    --primary-bg: #3d3d3d;
    --secondary-bg: #f9f9f9;
    --border-color: #f0f0f0;
    --text-primary: #333;
    --text-light: #ebebeb;
    --accent-color: #5778e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--primary-bg);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

/* Navbar */
.nav-top {
    background: var(--primary-dark) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    color: var(--text-light) !important;
}

.navbar-toggler {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.navbar-toggler:focus {
    outline: none !important;
    box-shadow: none !important;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: var(--primary-dark);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
}

.sidebar.open {
    right: 0;
}

.sidebar a {
    display: block;
    padding: 16px 20px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.sidebar a:hover {
    background-color: #444;
}

.sidebar .close-btn {
    font-size: 36px;
    text-align: right;
    padding: 10px 20px;
    border-bottom: 1px solid #444;
}

.sidebar .close-btn:hover {
    background-color: #444;
}

/* Container */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    background-color: #fff;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card p {
    color: var(--text-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.page-head, .page-subhead {
    color: white !important
}

/* Allow color inheritance for headings in styled containers */
.month-header h3,
.month-header h4,
.month-header h5,
.month-header h6 {
    color: inherit;
}

.display-2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.lead {
    color: var(--text-primary);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(87, 120, 230, 0.25);
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4a68d4;
    border-color: #4a68d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(87, 120, 230, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    background-color: #fff;
    border-radius: 0.375rem 0.375rem 0 0;
}

.nav-tabs .nav-link {
    color: var(--text-primary);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.nav-tabs .nav-link.active {
    color: var(--accent-color);
    background-color: transparent;
    border-bottom-color: var(--accent-color);
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

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

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        right: -250px;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    h1.display-2 {
        font-size: 1.75rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }

    h1.display-2 {
        font-size: 1.5rem;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .row {
        margin-bottom: 1rem;
    }

    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}
