* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f5f7fb;
    --sidebar: #eef4ff;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

@keyframes page-enter {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    animation: page-enter 260ms ease both;
}

.sidebar {
    width: 240px;
    background: var(--sidebar);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    z-index: 10;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 28px;
    min-height: 112px;
}

.logo-mark {
    width: 100px;
    height: 100px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #eaf2ff);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
    overflow: hidden;
}

.logo-image {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    flex: 1;
    width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    min-height: 48px;
    width: 100%;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: #ffffff;
    color: #2563eb;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.nav-item .icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background-color: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.user-info p {
    font-size: 12px;
    color: #666;
}

.arrow {
    color: #999;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ========== HEADER ========== */
.header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.notification-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #2563eb;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-header p {
    font-size: 12px;
    color: #666;
}

.dropdown {
    color: #999;
    font-size: 12px;
}

.login-btn {
    padding: 10px 16px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.login-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.login-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}

.login-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border-left: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: -18px 0 48px rgba(15, 23, 42, 0.14);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.login-overlay.active .login-panel {
    transform: translateX(0);
}

.login-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: none;
    background: #ffffff;
    color: #475569;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-mark {
    margin-bottom: 16px;
}

.login-brand h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #0f172a;
}

.login-brand p,
.login-footer p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    line-height: 1;
    cursor: pointer;
}

.login-submit {
    width: 100%;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    background: #2563eb;
        color: #ffffff;
        transition: transform 0.2s ease, background 0.2s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    background: #1d4ed8;
}

.login-message {
    padding: 10px 12px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.4;
}

.forgot-password {
    background: transparent;
    color: #2563eb;
    font-size: 13px;
        border: 0;
    cursor: pointer;
}

.forgot-password:hover {
    text-decoration: underline;
}

.reset-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reset-form[hidden] {
    display: none;
}

.login-brand[hidden],
.login-footer[hidden],
.login-form[hidden] {
    display: none;
}

.reset-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.reset-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
}

.reset-heading {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

/* ========== CONTENT WRAPPER ========== */
.content-wrapper {
    display: flex;
    gap: 24px;
    padding: 24px 30px 32px;
    overflow: visible;
}

/* Right sidebar for reminders and secondary content */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

/* ========== CALENDAR SECTION ========== */
.calendar-section {
    flex: 1;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.calendar-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #0f172a;
}

/* View Toggle */
.view-toggle {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    background-color: #eef4ff;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.toggle-btn {
    padding: 8px 20px;
    border: none;
    background-color: transparent;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    color: #475569;
    font-weight: 600;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: #1d4ed8;
}

.toggle-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Date Navigation */
.date-navigation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 0;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.nav-arrow {
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

.nav-arrow:hover {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.date-range {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
}

.today-btn {
    padding: 9px 16px;
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1d4ed8;
    font-weight: 700;
}

.today-btn:hover {
    background-color: #eff6ff;
}

/* Calendar Grid */
.calendar-grid {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: visible;
    min-height: 520px;
    background-color: #ffffff;
    box-shadow: none;
    border: 1px solid var(--border);
    min-width: 0;
}

.time-column {
    width: 90px;
    background-color: #f8fafc;
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.time-slot {
    height: 68px;
    padding: 0 12px;
    font-size: 12px;
    color: #64748b;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-header-spacer {
    height: 72px;
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    flex-shrink: 0;
}

.week-view {
    display: flex;
    flex: 1;
    min-width: 0;
    background-color: #ffffff;
}

.day-view {
    display: none;
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    padding: 0;
    background-color: #ffffff;
}

.day-view-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.day-view-header {
    background-color: #f8fafc;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.day-view-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #475569;
    text-transform: uppercase;
}

.day-view-date {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 8px;
}

.day-view-body {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.day-view-sidebar {
    width: 110px;
    background-color: #f8fafc;
    border-right: 1px solid rgba(226, 232, 240, 0.95);
    display: flex;
    flex-direction: column;
}

.day-view-time-slot {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    font-size: 13px;
    color: #475569;
}

.day-view-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    background-color: #ffffff;
}

.day-view-grid-row {
    position: relative;
    flex: 1;
    min-height: 68px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    width: 100%;
}

.day-view-grid-row:hover {
    z-index: 5;
}

.day-view-grid-row:last-child {
    border-bottom: none;
}

.month-view {
    display: none;
    flex: 1;
    min-width: 0;
    min-height: 0;
    background-color: #ffffff;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
}

.month-view-header-cell,
.month-view-empty-cell,
.month-view-cell {
    min-height: 100px;
    padding: 16px;
}

.month-view-header-cell {
    background-color: #f8fafc;
    text-align: center;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.month-view-empty-cell {
    background-color: #f8fafc;
    opacity: 0.7;
}

.month-view-cell {
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.month-view-day-number {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.month-view-cell--today {
    background-color: #eff6ff;
    border-color: rgba(37, 99, 235, 0.35);
}

.month-view-today-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.month-view-cell--today .month-view-day-number {
    color: #2563eb;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    padding: 10px 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    background-color: #ffffff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-wrapper {
    position: relative;
}

.month-view-cell:hover {
    z-index: 5;
}

.filter-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1000;
    min-width: 320px;
    max-width: 360px;
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    padding: 20px;
}

.filter-menu-section {
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    padding-bottom: 16px;
}

.filter-menu-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-menu-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.filter-menu label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

.filter-menu label input[type="checkbox"] {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    accent-color: #2563eb;
}

.filter-menu input[type="date"],
.filter-menu select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    background-color: #f8fafc;
}

.filter-menu-actions {
    display: flex;
    gap: 12px;
}

.filter-menu-actions button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.apply-btn {
    background-color: #2563eb;
    color: #ffffff;
}

.clear-btn {
    background-color: #f1f5f9;
    color: #334155;
}

.day-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    min-width: 0;
    position: relative;
}

.day-column:hover {
    z-index: 5;
}

.day-column:last-child {
    border-right: none;
}

.day-header {
    background-color: #f8fafc;
    padding: 18px 12px;
    min-height: 72px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    text-align: center;
    border-right: 1px solid rgba(226, 232, 240, 0.8);
}

.day-name {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.day-date {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 6px;
}

.day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #ffffff;
    background-image: linear-gradient(to bottom, rgba(226, 232, 240, 0.9) 1px, transparent 1px);
    background-size: 100% 68px;
    background-position: top left;
}

.booking-event {
    position: absolute;
    left: 10px;
    right: 10px;
    z-index: 2;
    padding: 8px 10px;
    overflow: visible;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
    cursor: pointer;
}

.booking-event:hover,
.booking-event:focus,
.booking-event.is-open {
    z-index: 30;
}

.booking-event strong,
.booking-event span {
    display: block;
    font-size: 12px;
    line-height: 1.35;
}

.booking-sticky-note {
    position: absolute;
    left: 14px;
    top: calc(100% + 12px);
    bottom: auto;
    z-index: 31;
    width: 270px;
    padding: 18px;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
    background: #fff;
    color: #172b4d;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.booking-event:hover .booking-sticky-note,
.booking-event:focus-within .booking-sticky-note,
.booking-event.is-open .booking-sticky-note {
    opacity: 1;
    transform: translateY(0);
}

.admin-booking-event {
    position: relative;
    left: auto;
    right: auto;
    top: auto !important;
    min-height: 58px;
    margin: 8px 10px 0;
}

.booking-sticky-note b {
    display: block;
    margin-bottom: 12px;
    color: #2563eb;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.booking-sticky-note dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px 12px;
    margin: 0;
    font-size: 13px;
}

.booking-sticky-note dt { color: #718096; }
.booking-sticky-note dd { margin: 0; font-weight: 700; text-align: right; }

.day-view .day-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-image: linear-gradient(to bottom, rgba(226, 232, 240, 0.9) 1px, transparent 1px);
    background-size: 100% 68px;
    background-position: top left;
}

.day-view .hour-row {
    min-height: 68px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.school-calendar-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0 24px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.school-calendar-panel h3 {
    margin-bottom: 6px;
    font-size: 17px;
}

.school-calendar-panel p {
    color: var(--muted);
    font-size: 13px;
}

.school-calendar-link {
    display: inline-block;
    border: 0;
    margin-top: 10px;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.school-calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.school-calendar-delete {
    display: inline-block;
    margin-top: 10px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #b42318;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.school-calendar-archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.school-calendar-archive-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.school-calendar-archive-item a,
.school-calendar-archive-item button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.school-calendar-archive-item button {
    margin-left: 12px;
    color: #15803d;
}

.school-calendar-form {
    display: grid;
    min-width: 280px;
    gap: 8px;
}

.schedule-notice-panel,
.schedule-notices {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.right-sidebar .schedule-reminders,
.right-sidebar .schedule-notices {
    width: 100%;
}

.schedule-notice-panel h3,
.schedule-notices h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.schedule-notice-panel p,
.schedule-notices p {
    color: var(--muted);
    font-size: 13px;
}

.schedule-notice-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.schedule-notice-form input,
.schedule-notice-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fbfdff;
}

.schedule-notice-form button {
    justify-self: start;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.schedule-notice-admin-list,
.schedule-notices-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.schedule-notice-admin-item,
.schedule-notice-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfdff;
}

.schedule-notice-admin-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.schedule-notice-admin-item p,
.schedule-notice-item p {
    margin: 6px 0;
    white-space: pre-line;
}

.schedule-notice-admin-item a,
.schedule-notice-item a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.schedule-notice-admin-item button {
    align-self: start;
    border: 0;
    background: transparent;
    color: #b42318;
    font-weight: 700;
    cursor: pointer;
}

.school-calendar-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.school-calendar-form input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
}

.school-calendar-button {
    border: 0;
    border-radius: 8px;
    padding: 11px 14px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.school-calendar-view {
    margin: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
}

#scheduleContent[hidden],
#schoolCalendarView[hidden] {
    display: none !important;
}

.school-calendar-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-eyebrow {
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.school-calendar-view h2 {
    margin-bottom: 6px;
}

.school-calendar-view-header p:not(.calendar-eyebrow) {
    color: var(--muted);
    font-size: 13px;
}

.calendar-download {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.school-calendar-content {
    min-height: 420px;
    display: grid;
    place-items: center;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.school-calendar-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.school-calendar-document {
    width: 100%;
    min-height: 520px;
    border: 0;
}

.calendar-file-empty {
    display: grid;
    gap: 8px;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.school-calendar-preview {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.5);
}

.school-calendar-preview[hidden] {
    display: none;
}

.school-calendar-preview-card {
    display: flex;
    flex-direction: column;
    width: min(980px, 100%);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.school-calendar-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.school-calendar-preview-header h3 {
    font-size: 18px;
}

.school-calendar-preview-header button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.school-calendar-preview-content {
    min-height: 360px;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 20px;
    background: #f8fafc;
}

.school-calendar-preview-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.school-calendar-preview-document {
    width: 100%;
    min-height: 650px;
    border: 0;
}

.school-calendar-preview-table-wrap {
    width: 100%;
    align-self: stretch;
    overflow: auto;
}

.school-calendar-preview-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    background: #fff;
}

.school-calendar-preview-table th,
.school-calendar-preview-table td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    text-align: left;
}

.school-calendar-preview-table th {
    background: var(--sidebar);
    font-weight: 700;
}

.calendar-file-empty strong {
    color: var(--text);
}

.school-calendar-table-wrap {
    width: 100%;
    overflow: auto;
    align-self: stretch;
}

.school-calendar-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    background: #fff;
}

.school-calendar-table th,
.school-calendar-table td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    text-align: left;
}

.school-calendar-table th {
    background: var(--sidebar);
    font-weight: 700;
}

@media (max-width: 720px) {
    .school-calendar-panel {
        flex-direction: column;
    }

    .school-calendar-form {
        width: 100%;
        min-width: 0;
    }

    .school-calendar-view {
        margin: 16px;
        padding: 16px;
    }

    .school-calendar-view-header {
        flex-direction: column;
    }
}

.month-view .month-header-cell {
    background-color: #f8fafc;
    padding: 14px 12px;
    text-align: center;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.month-view .month-cell {
    background-color: #ffffff;
    min-height: 100px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.month-view-cell {
    position: relative;
}

.booking-event-compact {
    position: relative;
    left: auto;
    right: auto;
    top: auto !important;
    height: auto !important;
    margin-top: 8px;
    padding: 6px 8px;
}

.booking-event-compact .booking-sticky-note {
    left: 0;
    top: calc(100% + 8px);
    bottom: auto;
}

.month-view .month-day-cell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.month-view .empty-cell {
    background-color: #f8fafc;
    opacity: 0.7;
}

.month-view .day-number {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.month-view .month-cell--today {
    background-color: #eff6ff;
    border-color: rgba(37, 99, 235, 0.35);
}

.month-view .month-cell--today .day-number {
    color: #2563eb;
}

.month-view .event-badge {
    margin-top: auto;
    width: 24px;
    height: 24px;
    background-color: #2563eb;
    color: white;
    font-size: 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.day-events::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
}

/* Schedule Reminders */
.schedule-reminders {
    background-color: #e8f0fe;
    border-left: 4px solid #2563eb;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.reminder-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bell-icon {
    font-size: 18px;
}

.reminder-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.reminder-list {
    list-style: none;
}

.reminder-list li {
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 8px;
    line-height: 1.5;
}

.reminder-list li:before {
    content: "• ";
    margin-right: 8px;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #999;
}

/* Page-level footer spacing when placed outside the container */
body > .footer {
    padding: 18px 0;
    margin-top: 18px;
    background-color: transparent;
}



/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
    }

    .right-sidebar {
        width: 100%;
    }

    .sidebar {
        width: 160px;
        padding: 18px 12px;
    }

    .main-content {
        margin-left: 160px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .logo {
        min-height: 0;
        margin-bottom: 10px;
    }

    .logo-mark {
        width: 64px;
        height: 64px;
    }

    .logo-image {
        width: 56px;
        height: 56px;
    }

    .nav-menu {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin: 0;
    }

    .nav-item {
        min-width: 0;
        min-height: 60px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        font-size: 12px;
        text-align: center;
    }

    .nav-item .icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .main-content {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .header {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 16px;
    }

    .header-left {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        justify-content: flex-start;
    }

    .header-left h1 {
        display: block;
        font-size: 18px;
    }

    .header-right {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 8px;
    }

    .content-wrapper {
        width: 100%;
        min-width: 0;
        gap: 14px;
        padding: 12px;
    }

    .calendar-section {
        width: 100%;
        min-width: 0;
        padding: 14px;
    }

    .right-sidebar {
        width: 100%;
    }

    .view-toggle {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .toggle-btn {
        min-width: 0;
        padding: 10px 6px;
    }

    .date-navigation {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        grid-template-areas:
            "range range range"
            "previous today next";
        align-items: center;
        justify-content: stretch;
        gap: 8px;
        margin-bottom: 12px;
        padding: 4px 0;
    }

    .date-navigation > .nav-arrow:first-child {
        grid-area: previous;
    }

    .date-navigation > .date-range {
        grid-area: range;
        min-width: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .date-navigation > .nav-arrow:nth-of-type(2) {
        grid-area: next;
    }

    .date-navigation > .today-btn {
        grid-area: today;
        justify-self: center;
    }

    .calendar-grid {
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .time-column {
        width: 74px;
        flex: 0 0 74px;
    }

    .week-view,
    .month-view {
        min-width: 700px;
        flex: 0 0 700px;
    }

    .calendar-grid .week-view {
        width: max-content;
        max-width: none;
    }

    .month-view-header-cell,
    .month-view-empty-cell,
    .month-view-cell,
    .month-view .month-header-cell,
    .month-view .month-cell {
        min-height: 72px;
        padding: 8px;
    }

    .day-view-sidebar {
        width: 74px;
        flex: 0 0 74px;
    }

    .day-view-header {
        padding: 14px;
    }

    .filter-menu {
        position: fixed;
        inset: auto 12px 12px;
        width: min(360px, calc(100vw - 24px));
        min-width: 0;
        max-width: calc(100vw - 24px);
        max-height: min(80dvh, 640px);
        margin-inline: auto;
        overflow-y: auto;
    }

    .school-calendar-view {
        min-width: 0;
        margin: 12px;
        padding: 14px;
    }

    .school-calendar-content {
        min-width: 0;
        min-height: 280px;
    }
}

@media (max-width: 400px) {
    .calendar-section h2 {
        font-size: 18px;
    }

    .date-navigation > .date-range {
        font-size: 13px;
    }

    .nav-item {
        font-size: 11px;
    }
}
