
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    background: url('../img/bkg_clouds.jpg');
    text-align:left;
}

#login-container{
    background: url('../img/bkg_sharklet.png') left bottom no-repeat;
    height: 100%;
    width: 100%;
    position: absolute;
    text-align: left;

}

#loginBox {
    width: 100%;
    vertical-align: middle;
    padding: 50px;
    max-width: 50rem;
}

#loginBox_header {
    background: #19398a;
    font-size: 13px;
    color: #fff;
    height: 90px;
    margin: auto;
    vertical-align: middle;
    padding: 10px;
}

#loginBox_header img{
    max-height: 60px;
    
}

#loginContent{
    padding: 10px;
    background-color: #ffffff;
    margin: auto;
    text-align: center;
}

/* ---- Shared card pages (welcome / upload) ---- */
.welcome-page,
.upload-page {
    background: url('../img/bkg_clouds.jpg') center / cover fixed;
    min-height: 100vh;
    padding: 32px 12px;
}

.welcome-card,
.upload-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.upload-card {
    max-width: 1180px;
}

.welcome-header,
.upload-header {
    background: #19398a;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.welcome-header img,
.upload-header img {
    max-height: 48px;
}

.welcome-header span,
.upload-header span {
    font-size: 14px;
    font-weight: 600;
}

/* Logout button, top-right of the dashboard header */
.logout-form {
    margin-left: auto;
}

.welcome-body,
.upload-body {
    padding: 20px;
}

/* ---- Admin roster ---- */
.admin-toolbar,
.admin-roster-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-count {
    color: #6c757d;
    font-size: 0.85rem;
}

.admin-meta {
    color: #6c757d;
    font-size: 0.78rem;
    margin-top: 2px;
}

.upload-form {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fafafa;
}

.admin-roster {
    margin-top: 18px;
}

.admin-roster-head {
    margin-bottom: 10px;
}

.admin-roster-head input {
    max-width: 260px;
}

.admin-table-wrap {
    max-height: 68vh;
    overflow: auto;
    border: 1px solid #d9dfe8;
    border-radius: 8px;
    background: #fff;
}

.admin-table {
    min-width: 2100px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #19398a;
    color: #fff;
    font-weight: 700;
    vertical-align: middle;
}

.admin-table th,
.admin-table td {
    min-width: 74px;
    text-align: center;
    vertical-align: middle;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2),
.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    min-width: 138px;
    text-align: left;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    min-width: 54px;
}

.admin-table tbody tr:nth-child(even) td {
    background: #f7f9fc;
}

.admin-table .sticky-col {
    position: sticky;
    z-index: 2;
    background: #fff;
}

.admin-table thead .sticky-col {
    z-index: 4;
    background: #19398a;
}

.admin-table tbody tr:nth-child(even) .sticky-col {
    background: #f7f9fc;
}

.admin-table .sticky-col-0 {
    left: 0;
}

.admin-table .sticky-col-1 {
    left: 54px;
}

.admin-table .sticky-col-2 {
    left: 192px;
    box-shadow: 8px 0 10px -10px rgba(0, 0, 0, 0.45);
}

.empty-roster {
    border: 1px dashed #cfd6e2;
    border-radius: 8px;
    color: #6c757d;
    padding: 18px;
    text-align: center;
}

.welcome-greeting {
    color: #19398a;
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---- Dashboard sections ---- */
.dash-section {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}

.dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-title {
    color: #19398a;
    font-weight: 700;
    margin: 0;
}

.dash-sub {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 2px 0 0;
}

/* Calendar / List toggle */
.view-toggle {
    display: inline-flex;
    border: 1px solid #19398a;
    border-radius: 999px;
    overflow: hidden;
}

.view-toggle button {
    border: none;
    background: #fff;
    color: #19398a;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
}

.view-toggle button.active {
    background: #19398a;
    color: #fff;
}

/* Calendar grid */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-head {
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #6c757d;
    padding-bottom: 4px;
}

.cal-cell {
    min-height: 62px;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.cal-cell.cal-empty {
    background: transparent;
    border-color: transparent;
}

.cal-cell.cal-has {
    background: #eaf0ff;
    border-color: #c5d4ff;
}

.cal-day {
    font-size: 0.72rem;
    color: #6c757d;
}

.cal-hours {
    margin-top: auto;
    font-weight: 700;
    color: #19398a;
    font-size: 0.95rem;
}

.cal-parts {
    font-size: 0.65rem;
    color: #6c757d;
}

/* Totals (shown as its own section in calendar view) */
.totals-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #d9d9d9;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.stat {
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fafafa;
}

.stat-label {
    font-size: 0.72rem;
    color: #6c757d;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #19398a;
}

/* ---- Mobile (phones) ---- */
@media (max-width: 576px) {
    /* Login: don't centre-and-clip the box; let it flow and scroll. */
    #login-container { position: static; height: auto; min-height: 100%; }
    #loginBox {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100%;
        max-width: 100%;
        padding: 16px;
    }

    .welcome-page,
    .upload-page { padding: 16px 10px; }
    .welcome-body,
    .upload-body { padding: 16px; }
    .dash-section { padding: 12px; }

    /* Bigger, full-width toggle for thumbs. */
    .dash-section-head { flex-direction: column; align-items: stretch; }
    .view-toggle { width: 100%; }
    .view-toggle button { flex: 1; padding: 10px 8px; font-size: 0.9rem; }

    /* Calendar that fits a phone without overflowing. */
    .calendar { gap: 3px; }
    .cal-head { font-size: 0.62rem; }
    .cal-cell { min-height: 50px; padding: 2px 3px; overflow: hidden; }
    .cal-day { font-size: 0.6rem; }
    .cal-hours { font-size: 0.72rem; }
    /* Hide the per-sector breakdown on phones (the day total still shows);
       use List view for the full breakdown. */
    .cal-parts { display: none; }

    .admin-roster-head input { max-width: 100%; }
    .admin-table-wrap { max-height: 64vh; }
}
