* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #0f172a;
    color: #e5e7eb;
    min-height: 100vh;
}

/* Layout: sidebar + main */
body.app-layout {
    display: flex;
}

.sidebar {
    width: 260px;
    background: #020617;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid #1f2937;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fb923c; /* orange */
}

.nav-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.nav-link:hover {
    background: #111827;
    color: #e5e7eb;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, #fb923c, #f97316); /* orange gradient */
    color: #020617;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: 12px;
}

.main {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.card {
    background: #020617;
    border-radius: 16px;
    padding: 20px 20px 16px;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid #1f2937;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fb923c, #f97316); /* orange gradient */
    color: #020617;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.45);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.55);
}

.btn-secondary {
    background: #111827;
    color: #e5e7eb;
    box-shadow: none;
}

/* Bright reset button */
/* Reset button same as Add Student button */
.btn-reset {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #020617;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.45);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-reset:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.55);
}



/* TABLES */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.table th,
.table td {
    padding: 10px 8px;
    border-bottom: 1px solid #111827;
    text-align: left;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.table tbody tr:hover {
    background: #020617;
}

/* Clean alignment & button spacing */
.table td {
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-buttons .btn {
    width: 90px;
    justify-content: center;
    border-radius: 14px;
}

/* FORM INPUTS */

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
select {
    background: #020617;
    border-radius: 10px;
    border: 1px solid #1f2937;
    padding: 8px 10px;
    color: #e5e7eb;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

input:focus,
select:focus {
    border-color: #f97316; /* orange focus */
}

/* ============================
   MODAL SYSTEM (FIXED)
   ============================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: #020617;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid #1f2937;
    width: 420px;
    max-width: 90vw;
    animation: fadeInModal 0.25s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
}

.form-row {
    margin-bottom: 10px;
}

.form-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 4px;
    display: block;
}

.form-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* LOGIN */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #c2410c 0, transparent 55%), #020617; /* warm orange glow */
}

.login-card {
    width: 380px;
    background: #020617;
    padding: 24px 24px 18px;
    border-radius: 18px;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.85);
}

.login-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fb923c;
    margin-bottom: 4px;
}

.login-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.login-row {
    margin-bottom: 10px;
}

.login-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 4px;
    display: block;
}

.login-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
    font-size: 0.8rem;
    padding: 6px 8px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* FOOTER FIX */

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: 0.8rem;
    color: #9ca3af;
}

.sidebar-footer span {
    color: #e5e7eb;
    display: block;
    margin-top: 4px;
}

.sidebar-footer a {
    color: #f97316; /* orange link */
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 4px;
    display: inline-block;
}


/* Student profile modal layout */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
    font-size: 0.86rem;
}

.profile-item-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

.profile-item-value {
    margin-top: 2px;
}


/* =========================
   CALENDAR / PRACTICE VIEW
   ========================= */
.calendar-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-top: 10px;
}

.calendar-panel {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #1f2937;
    padding: 14px 14px 10px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-month-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.calendar-nav-btn {
    border: none;
    background: #0b1220;
    color: #e5e7eb;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.calendar-nav-btn:hover {
    background: #111827;
    transform: translateY(-1px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 0.8rem;
}

.calendar-day-name {
    text-align: center;
    color: #6b7280;
    padding-bottom: 4px;
}

/* new: actual days grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 4px;
    font-size: 0.8rem;
}

.calendar-day.blank {
    background: transparent;
    border: none;
    cursor: default;
}
.calendar-day-number {
    font-size: 0.85rem;
    color: #e5e7eb;
}
.calendar-day-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    margin-top: 3px;
    background: #f97316; /* orange dot by default */
}

.calendar-day.today {
    border-color: #f97316;
}

.calendar-day.selected {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(248, 153, 72, 0.14));
    border-color: #f97316;
    transform: translateY(-1px);
}

.calendar-day:hover:not(.blank) {
    background: #020617;
    border-color: #f97316;
    transform: translateY(-1px);
}

.calendar-detail {
    padding: 6px 0 0 0;
}

.calendar-detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 8px;
}

.selected-date-label {
    font-size: 0.9rem;
    font-weight: 600;
}


.coach-checkbox-list {
    background: #0b1120;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.coach-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    color: #e5e7eb;
}

.coach-check-item:hover {
    background: #1e293b;
}

.coach-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}


/* Calendar dots by status */
.calendar-day-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    margin-top: 3px;
}

.calendar-day-dot-scheduled {
    background: #f97316; /* orange */
}

.calendar-day-dot-completed {
    background: #22c55e; /* keep green for completed */
}

/* Disable Add button look */
.btn.btn-disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Better cursor + no text selection in calendar */
.calendar-panel,
.calendar-grid,
.calendar-days,
.calendar-day,
.calendar-day * {
    user-select: none;
    cursor: pointer;
}

.calendar-day.blank {
    cursor: default;
}
.calendar-day.blank * {
    cursor: default;
}


/* ==========================
   COACH MOBILE DASHBOARD
   ========================== */

/* Background + base font only for coach pages */
body.coach-layout {
    background: radial-gradient(circle at top, #c2410c 0, transparent 55%), #020617;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Centered column for mobile + desktop */
.coach-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 14px 24px;
}

/* Top header line */
.coach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.coach-logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fb923c;
}

.coach-subtitle {
    font-size: 0.8rem;
    color: #9ca3af;
}

.coach-logout {
    font-size: 0.8rem;
    color: #fb7185;
    text-decoration: none;
}
.coach-logout:hover {
    text-decoration: underline;
}

/* Main vertical stack of sections */
.coach-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Each big box (Today / Upcoming) */
.coach-section {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 14px 12px 10px;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.65);
}

.coach-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Stack of cards inside each section */
.coach-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Single practice card */
.coach-card {
    border-radius: 16px;
    padding: 14px 18px;
    background: #020617;
    border: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Extra glow for today’s practices */
.coach-card-today {
    background: radial-gradient(circle at top, rgba(249, 115, 22, 0.22), transparent 65%), #020617;
    border-color: rgba(249, 115, 22, 0.7);
}

/* --- Header layout of the card --- */
/* Left: date + center/district; Right: time + status pill */
.coach-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

/* LEFT block */
.coach-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coach-card-date {
    font-size: 0.86rem;
    font-weight: 600;
}

/* RIGHT block */
.coach-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.coach-card-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fed7aa; /* soft light orange */
    line-height: 1.1;
}

/* Location text below header */
.coach-card-location {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 100%;
}

.coach-card-center {
    font-size: 0.85rem;
    font-weight: 500;
}

.coach-card-district {
    font-size: 0.76rem;
    color: #9ca3af;
}

.coach-card-coaches {
    font-size: 0.76rem;
    color: #e5e7eb;
}

/* Status pill (Scheduled / Ended / Completed) */
.coach-card-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    line-height: 1.1;
    border-width: 1px;
    border-style: solid;
    margin: 0;
    white-space: nowrap;
}

/* Status colours – orange themed */
.coach-status-scheduled {
    background: rgba(249, 115, 22, 0.12);
    border-color: #f97316;
    color: #fed7aa;
}

.coach-status-ended {
    background: rgba(250, 204, 21, 0.06);
    border-color: #facc15;
    color: #facc15;
}

.coach-status-completed {
    background: rgba(34, 197, 94, 0.12);
    border-color: #22c55e;
    color: #bbf7d0;
}

/* Empty state text */
.coach-empty {
    font-size: 0.8rem;
    color: #6b7280;
    padding: 6px 2px 4px;
}

/* Footer note under sections */
.coach-footer-note {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
}

/* Mobile tap highlight removal */
.coach-card,
.coach-logout {
    -webkit-tap-highlight-color: transparent;
}

/* Finish & Submit button row under card, right aligned */
.coach-finish-btn-row {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

/* Finish & Submit button itself */
.coach-finish-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.83rem;
    cursor: pointer;
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #020617;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
}

.coach-finish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.55);
}

/* -------------------------
   Pretty file input in modal
   ------------------------- */

.file-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.file-input-label {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #1f2937;
    font-size: 0.82rem;
    color: #e5e7eb;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.file-input-label:hover {
    border-color: #f97316;
    background: #020617;
}

/* Hide native file input */
.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-filename {
    font-size: 0.75rem;
    color: #9ca3af;
}

.file-input-text {
    font-size: 0.72rem;
    color: #6b7280;
}

/* LOGIN – coach / shared */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #c2410c 0, transparent 55%), #020617;
    padding: 16px;          /* add padding so card doesn’t touch edges on mobile */
}

.login-card {
    width: 100%;            /* full width on small screens */
    max-width: 380px;       /* but don’t grow bigger than original */
    background: #020617;
    padding: 24px 24px 18px;
    border-radius: 18px;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.85);
}

.login-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fb923c;
    margin-bottom: 4px;
}

.login-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.login-row {
    margin-bottom: 10px;
}

.login-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 4px;
    display: block;
}

.login-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
    font-size: 0.8rem;
    padding: 6px 8px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Small tweaks for very small phones */
@media (max-width: 400px) {
    .login-card {
        padding: 18px 16px 14px;
        border-radius: 14px;
    }
    .login-title {
        font-size: 1.15rem;
    }
}


/* Extra highlight for practices where THIS coach is assigned */
.coach-card-assigned {
    border-color: rgba(249, 115, 22, 0.9);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4);
}

.coach-card-assigned-pill {
    display: inline-flex;
    align-items: center;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(249, 115, 22, 0.18);
    border: 1px solid #f97316;
    color: #ffedd5;
}
