/* =========================================================
   OSK Tracker – Layout, Navbar, Calendar, Admin, Sidebar
   ========================================================= */

/* ------------------------------
   GLOBAL LAYOUT
------------------------------ */

.main-container {
    padding-top: 90px; /* desktop header height */
}

@media (max-width: 768px) {
    .main-container {
        padding-top: 72px; /* shorter header on mobile */
    }
}

/* ------------------------------
   HEADER / NAVBAR
------------------------------ */

.header-container.container-xxl {
    margin-top: 0.75rem;
}

/* Cork header base, just darkened + rounded */
.header.navbar {
    background: #151a2a;
    border-radius: 14px;
    padding: 0.5rem 1rem;
    min-height: 56px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

/* Brand text */
.osk-brand-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.1;
}

.osk-brand-subtitle {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Avatar circle */
.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #3f51b5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* User chip */
.osk-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.osk-user-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.osk-user-btn:focus {
    outline: none;
    box-shadow: none;
}

.osk-user-label {
    color: #fff;
    font-size: 0.9rem;
}

/* Mobile tightening */
@media (max-width: 576px) {
    .header-container.container-xxl {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 0.25rem;
    }

    .header.navbar {
        padding: 0.35rem 0.75rem;
        min-height: 44px;
        border-radius: 10px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    }

    .osk-brand-subtitle {
        display: none; /* save vertical space */
    }

    .user-avatar-circle {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .osk-user-label {
        display: none; /* avatar only on phones */
    }

    .osk-user-btn {
        padding: 0;
        background: transparent; /* just the circle */
    }

    .main-container {
        padding-top: 56px; /* shorter header offset */
    }
}

/* ------------------------------
   SCHEDULE CALENDAR
------------------------------ */

#schedule-calendar {
    background: #0d1224;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

#schedule-calendar .fc {
    background: transparent;
    color: #e4e9ff;
    font-size: 0.85rem;
}

#schedule-calendar .fc-toolbar-title {
    font-size: 1.05rem;
}

#schedule-calendar .fc-button {
    border-radius: 999px;
    background: #1e263e;
    border-color: #303a5a;
}

/* grid + headers */
#schedule-calendar .fc-scrollgrid,
#schedule-calendar .fc-timegrid-slot,
#schedule-calendar .fc-timegrid-axis,
#schedule-calendar .fc-col-header-cell {
    border-color: #272f4a;
}

#schedule-calendar .fc-col-header-cell {
    background: #151b31;
}

/* events */
#schedule-calendar .fc-timegrid-event {
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    opacity: 0.95;
}

/* "now" line */
#schedule-calendar .fc-timegrid-now-indicator-line,
#schedule-calendar .fc-timegrid-now-indicator-arrow {
    border-color: #ff6b6b;
}

/* calendar mobile tweaks */
@media (max-width: 768px) {
    #schedule-calendar {
        padding: 4px;
    }
    #schedule-calendar .fc {
        font-size: 0.78rem;
    }
}

/* calendar popovers above sidebar */
.fc-tooltip,
.fc-popover {
    z-index: 2000;
}

/* ------------------------------
   ADMIN TABLE
------------------------------ */

.admin-users-table th,
.admin-users-table td {
    padding: 6px 8px !important;
    white-space: nowrap;
}

.admin-users-table td:nth-child(4) { /* email column */
    white-space: normal !important;
    max-width: 180px;
}

.admin-users-table th:nth-child(n+7),
.admin-users-table td:nth-child(n+7) {
    width: 55px;
    text-align: center;
}

/* tiny switches */
.form-check-input {
    width: 36px;
    height: 18px;
}

@media (max-width: 1199px) {
    .admin-table-wrapper {
        overflow-x: auto;
    }
}

@media (min-width: 1200px) {
    .admin-table-wrapper {
        overflow-x: visible !important;
    }
}

/* ------------------------------
   SIDEBAR (MOBILE)
------------------------------ */

/* use Cork's .overlay element */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 25, 0.6);
    z-index: 998;
}

/* sidebar z-index above overlay */
.sidebar-wrapper {
    z-index: 999;
}

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -260px !important;      /* hidden off-screen */
        width: 260px !important;
        max-width: 80% !important;
        background: #050816 !important;
        overflow-y: auto;
        transition: left 0.2s ease-out !important;
    }

    body.sidebar-open .sidebar-wrapper {
        left: 0 !important;           /* slide in */
    }

    body.sidebar-open .overlay {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}
