:root {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-color: #ef4444;
    --primary-hover: #dc2626;
    --secondary-color: #3b82f6;
    --accent-color: #eab308;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(at 0% 0%, rgba(239, 68, 68, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    background: rgba(100, 116, 139, 0.6);
    /* Slate Gray */
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Glass Cards */
.glass-card,
.card,
.modal-content {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--card-shadow);
    border-radius: 16px !important;
    overflow: hidden;
}

.card-header,
.card-header-custom {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Removed orphaned properties here */

.form-label,
.form-label-custom {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px !important;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.btn-primary,
.btn-custom-primary {
    background-color: var(--primary-color) !important;
    border: none !important;
    color: white !important;
}

.btn-primary:hover,
.btn-custom-primary:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary,
.btn-custom {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-color) !important;
}

.btn-secondary:hover,
.btn-custom:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.btn-danger {
    background-color: rgba(220, 38, 38, 0.2) !important;
    border: 1px solid rgba(220, 38, 38, 0.5) !important;
    color: #fca5a5 !important;
}

.btn-danger:hover {
    background-color: rgba(220, 38, 38, 0.3) !important;
}

/* Calendar Grid System */
.calendar-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 600px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(auto-fill, minmax(1fr, auto));
    gap: 10px;
    flex-grow: 1;
}

.calendar-day {
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 100px;
    height: 100%;
    overflow: hidden;
}

.calendar-day:hover {
    background-color: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    pointer-events: none;
}

.calendar-day.today {
    border: 1px solid var(--accent-color);
    background: rgba(234, 179, 8, 0.05);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.1);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: right;
    color: var(--text-muted);
}

.calendar-day.today .day-number {
    color: var(--accent-color);
}

.event-badge {
    display: block;
    padding: 4px 8px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.event-badge:hover {
    transform: scale(1.02);
    opacity: 1;
    color: white;
    z-index: 5;
}

.more-events {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
}

/* Login Page Specifics */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.brand-title {
    font-size: 3rem;
    background: linear-gradient(to right, var(--primary-color), #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-align: center;
}

.brand-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.custom-alert {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-color);
    --bs-table-border-color: var(--glass-border);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

.table-hover>tbody>tr:hover>* {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
}

/* Weekend Styling */
.calendar-day.weekend {
    background-color: rgba(71, 85, 105, 0.6);
    /* Lighter/distinct slate */
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.calendar-day.weekend .day-number {
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 800;
}

/* Form Controls High Contrast */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.form-control:hover,
.form-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    /* Force pure white on hover */
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(239, 68, 68, 0.25);
}

/* Fix for file input */
.form-control::file-selector-button {
    background-color: var(--glass-bg);
    color: var(--text-color);
}