.login-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;

    form {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        width: 100%;
        max-width: 500px;
        label {
            display: inline-block;
            min-width: 100px;
        }

        input {
            margin-bottom: 1rem;
        }
    }
}

.info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
}

/* Global styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Modern Access Modal Styling */
#accessModal .modern-modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    overflow: hidden;
}
#accessModal .modal-header {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #fff;
    border-bottom: 0;
    padding: 1rem 1.25rem;
}
#accessModal .modal-title {
    font-weight: 700;
}
#accessModal .modal-body {
    background: #f9fafb;
}
#accessModal .modal-footer {
    background: #f9fafb;
    border-top: 0;
}
#accessModal .form-label {
    font-weight: 600;
    color: #334155;
}
#accessModal .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
#accessModal .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 .2rem rgba(79,70,229,.15);
}
#accessModal hr {
    border-top: 1px dashed #e5e7eb;
}
#accessModal h6 {
    font-weight: 700;
    color: #0f172a;
}
#accessModal #slugPreview {
    display: inline-block;
    padding: .35rem .5rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}
#accessModal #slugPreview .text-success { color: #16a34a !important; }
#accessModal #slugPreview .text-danger  { color: #ef4444 !important; }
#accessModal .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border: none;
    box-shadow: 0 6px 16px rgba(59,130,246,.25);
}
#accessModal .btn-primary:hover {
    filter: brightness(0.98);
}
#accessModal .btn-secondary {
    background-color: #e2e8f0;
    border: none;
    color: #0f172a;
}

/* Navbar styling */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    transition: all var(--transition-speed);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: color var(--transition-speed);
}

.navbar-brand:hover {
    color: var(--dark-color);
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.dropdown-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

/* Button styling */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all var(--transition-speed);
}

.btn-primary:hover:not(:disabled) {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transition: all var(--transition-speed);
}

.btn-danger:hover:not(:disabled) {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transition: all var(--transition-speed);
}

.btn-success:hover {
    background-color: #27ae60;
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--light-color);
    border-color: var(--light-color);
    color: var(--dark-color);
    transition: all var(--transition-speed);
}

.btn-secondary:hover {
    background-color: #bdc3c7;
    border-color: #bdc3c7;
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Alert styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.alert-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 200px); /* Adjust based on header and footer height */
}

/* Footer styling */
footer {
    background-color: white;
    color: var(--dark-color);
    padding: 1.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    margin-top: auto;
    width: 100%;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

footer a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* Card styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /*transition: all var(--transition-speed);*/
    overflow: hidden;
}

/*.card:hover {*/
/*    transform: translateY(-5px);*/
/*    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);*/
/*}*/

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form styling */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all var(--transition-speed);
}

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

/* History list styling */
.history-list {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all var(--transition-speed);
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.history-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.history-status-container {
    display: flex;
    gap: 0.5rem;
}

.history-status, .registration-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.history-status.completed {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.history-status.upcoming {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.registration-status.active {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.registration-status.canceled {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Calendar container */
.calendar-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
    overflow-x: auto;
}

/* Animation for calendar */
.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calendar-container {
        padding: 1rem;
        margin: 0 -1rem;
        border-radius: 0;
    }

    .card-body {
        padding: 1rem;
    }

    .history-item {
        padding: 0.75rem;
    }

    /* Calendar mobile adjustments (Day View) */
    .rbc-calendar {
        min-width: 100%;
    }

    .rbc-time-view {
        min-width: 300px; /* Still useful for horizontal scroll if needed */
    }

    .rbc-time-header-content {
        min-width: 300px;
    }

    .rbc-time-content {
        min-width: 300px;
    }

    /* Styles for Day view event readability */
    .rbc-event {
        padding: 0.3rem 0.5rem !important; /* Restore reasonable padding */
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        position: relative;
        z-index: 1;
        border: none !important;
        box-sizing: border-box !important;
    }

    .rbc-event-content {
        font-size: 0.85rem !important; /* Restore reasonable font size */
        line-height: 1.3 !important; /* Restore reasonable line height */
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important;
    }

    /* Remove max-height and scrolling from history list */
    .history-list {
        max-height: none;
        overflow-y: visible;
    }

    /* Improve form layout on mobile */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        width: 100%;
    }

    /* Adjust button sizes for better touch targets */
    .btn {
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
    }

    /* Improve dialog layout on mobile */
    .dialog-content {
        width: 95%;
        margin: 1rem;
        padding: 1rem;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label, .detail-value {
        width: 100%;
    }

    .detail-label {
        margin-bottom: 0.25rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .history-status-container {
        flex-direction: column;
        gap: 0.25rem;
    }
}

.login-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;

    form {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        width: 100%;
        max-width: 500px;
        label {
            display: inline-block;
            min-width: 100px;
        }

        input {
            margin-bottom: 1rem;
        }
    }
}

.info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
}

/* Global styles */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #22c55e;
    --accent-color: #ef4444;
    --dark-color: #0f172a;
    --muted-color: #64748b;
    --light-color: #f8fafc;
    --card-bg: #ffffff;
    --transition-speed: 0.25s;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Modern Access Modal Styling */
#accessModal .modern-modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    overflow: hidden;
}
#accessModal .modal-header {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #fff;
    border-bottom: 0;
    padding: 1rem 1.25rem;
}
#accessModal .modal-title {
    font-weight: 700;
}
#accessModal .modal-body {
    background: #f9fafb;
}
#accessModal .modal-footer {
    background: #f9fafb;
    border-top: 0;
}
#accessModal .form-label {
    font-weight: 600;
    color: #334155;
}
#accessModal .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
#accessModal .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 .2rem rgba(79,70,229,.15);
}
#accessModal hr {
    border-top: 1px dashed #e5e7eb;
}
#accessModal h6 {
    font-weight: 700;
    color: #0f172a;
}
#accessModal #slugPreview {
    display: inline-block;
    padding: .35rem .5rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}
#accessModal #slugPreview .text-success { color: #16a34a !important; }
#accessModal #slugPreview .text-danger  { color: #ef4444 !important; }
#accessModal .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border: none;
    box-shadow: 0 6px 16px rgba(59,130,246,.25);
}
#accessModal .btn-primary:hover {
    filter: brightness(0.98);
}
#accessModal .btn-secondary {
    background-color: #e2e8f0;
    border: none;
    color: #0f172a;
}

/* Navbar styling */
.navbar {
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    backdrop-filter: saturate(140%) blur(8px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 0.8rem 1rem;
    transition: all var(--transition-speed);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(2, 6, 23, 0.04);
}

.navbar .navbar-brand {
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.2px;
}

.navbar .nav-link {
    position: relative;
    color: #0f172a;
    padding: 0.5rem 0.9rem;
    transition: color var(--transition-speed), opacity var(--transition-speed);
}
.navbar .nav-link:hover {
    color: var(--primary-color);
}
.navbar .nav-link:not(.dropdown-toggle):not(.no-underline)::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 4px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #06b6d4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed) ease;
    border-radius: 2px;
}
.navbar .nav-link:not(.dropdown-toggle):not(.no-underline):hover::after,
.navbar .nav-link:not(.dropdown-toggle):not(.no-underline):focus::after {
    transform: scaleX(1);
}

.navbar .dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.12);
    padding: 0.5rem;
}
.navbar .dropdown-item {
    border-radius: 8px;
}
.navbar .dropdown-item:hover {
    background: #eef2ff;
}

.navbar .badge.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
}

.navbar .navbar-toggler {
    border: 1px solid rgba(2,6,23,0.15);
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
}

/* Welcome/login page hero styling */
.login-hero-container {
    position: relative;
}
.login-hero-container::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(600px 200px at 0% 0%, rgba(79,70,229,0.18), transparent 60%),
                radial-gradient(600px 200px at 30% 10%, rgba(34,197,94,0.18), transparent 60%);
    filter: blur(12px);
    z-index: -1;
}

/* Left info card */
.login-hero-container .card:first-child {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
}
.login-hero-container .card:first-child .card-body {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem 1.75rem;
}
.login-hero-container h2.card-title {
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #0f172a, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-hero-container .list-unstyled .fas.fa-check-circle {
    color: #22c55e !important;
}
.login-hero-container .list-unstyled strong {
    color: #0f172a;
}
.login-hero-container .list-unstyled p {
    color: #334155;
}

/* Right login card */
.login-hero-container .card .card-header.bg-primary {
    background: linear-gradient(135deg, #4f46e5, #3b82f6) !important;
}
.login-hero-container .card .card-header h3 {
    font-weight: 700;
}
.login-hero-container .card .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.login-hero-container .card .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 .2rem rgba(99,102,241,.15);
}
.login-hero-container .card .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border: none;
    box-shadow: 0 10px 20px rgba(79,70,229,0.25);
}
.login-hero-container .card .btn-primary:hover {
    filter: brightness(0.98);
}

/* Footer links */
.footer-links a {
    color: #64748b;
    text-decoration: none;
    margin-left: 1rem;
}
.footer-links a:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* Initial page modern styling */
.initial-page {
    padding-top: 1rem;
}
.initial-page .modern-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
    overflow: hidden;
    background: var(--card-bg, #fff);
}
.initial-page .gradient-header {
    background: linear-gradient(135deg, var(--primary-color, #4f46e5), #3b82f6);
    border-bottom: 0;
}
.initial-page .calendar-shell {
    min-height: 520px; /* space for calendar mount */
}

/* History list styling */
.initial-page .modern-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.initial-page .modern-history .history-item {
    padding: 0.6rem 0.2rem;
    border-bottom: 1px dashed rgba(2, 6, 23, 0.08);
}
.initial-page .modern-history .history-item:last-child {
    border-bottom: 0;
}
.initial-page .modern-history .history-title {
    font-weight: 600;
    color: #0f172a;
}
.initial-page .modern-history .history-icon .icon-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    margin-top: 7px;
}
.initial-page .modern-history .state-badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
}
.initial-page .modern-history .state-badge.completed {
    background: #ecfdf5;
    color: #059669;
}
.initial-page .modern-history .state-badge.upcoming {
    background: #eff6ff;
    color: #2563eb;
}
.initial-page .modern-history .status-badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}
.initial-page .modern-history .status-badge.active {
    background: #eef2ff;
    color: #4f46e5;
}
.initial-page .modern-history .status-badge.canceled {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 991.98px) {
    .initial-page .calendar-shell { min-height: 420px; }
}


/* Global helpers for modern cards and headers */
.modern-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
    overflow: hidden;
    background: var(--card-bg, #fff);
}
.gradient-header {
    background: linear-gradient(135deg, var(--primary-color, #4f46e5), #3b82f6) !important;
    color: #fff !important;
    border-bottom: 0 !important;
}

/* Modern modal header helper */
.modal-header.gradient-header .modal-title { font-weight: 700; }

/* Modern form improvements */
.modern-form .form-label { font-weight: 600; color: #334155; }
.modern-form .form-control,
.modern-form .form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.modern-form .form-control:focus,
.modern-form .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 .2rem rgba(79,70,229,.15);
}
.modern-form .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border: none;
    box-shadow: 0 6px 16px rgba(59,130,246,.25);
}
.modern-form .btn-primary:hover { filter: brightness(0.98); }
