:root {
    --hsf-navy-dark: #0d1f3c;
    --hsf-navy: #1a2a4a;
    --hsf-navy-mid: #2a3b6f;
    --hsf-navy-hover: #1e2c54;
    --hsf-lime: #e1ff00;
    --hsf-border: #e0e0e0;
    --hsf-input-border: #ccc;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Arimo', 'Segoe UI', Arial, sans-serif;
    background-color: #f4f6f8;
    color: #333;
}

a {
    color: var(--hsf-navy-mid);
}

/* ---- Navbar (logo + links), matches hsfcpr.org ---- */
.hsf-navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--hsf-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 0.5rem 1rem;
}

.navbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.navbar-logo-link {
    display: inline-flex;
    line-height: 0;
}

.navbar-logo {
    height: 48px;
}

.nav-links {
    display: flex;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    display: inline-block;
    color: var(--hsf-navy);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
}

.nav-links li a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

.nav-links li.nav-user {
    margin-left: auto;
    color: var(--hsf-navy);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
}

/* ---- Mobile nav (hamburger + slide-in panel), matches hsfcpr.org ---- */
.nav-hamburger {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--hsf-navy);
    border-radius: 2px;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 72%;
    max-width: 340px;
    height: 100%;
    background: var(--hsf-lime);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 20px 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mobile-nav-panel.open {
    transform: translateX(0);
}

.mobile-nav-close {
    align-self: flex-start;
    width: 40px;
    height: 40px;
    background: var(--hsf-navy);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.mobile-nav-links {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-links li a {
    display: block;
    font-family: 'Arimo', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--hsf-navy);
    text-decoration: none;
    text-align: center;
    padding: 14px 0;
}

.mobile-nav-links li a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.mobile-nav-user {
    text-align: center;
    font-weight: 700;
    color: var(--hsf-navy);
    margin-bottom: 16px;
}

.mobile-logout-btn {
    display: block;
    background: var(--hsf-navy-mid);
    color: #fff;
    font-family: 'Arimo', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-radius: 6px;
}

.mobile-logout-btn:hover {
    background: var(--hsf-navy-hover);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991px) {
    .hsf-navbar .nav-links {
        display: none !important;
    }

    .nav-hamburger {
        display: flex !important;
    }
}

/* ---- Title band ---- */
.site-header {
    background-color: var(--hsf-navy-mid);
    color: #fff;
    padding: 1rem;
    text-align: center;
    border-bottom: 4px solid var(--hsf-lime);
}

.site-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--hsf-lime);
    line-height: 1.3;
}

.site-content {
    padding: 0.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

#calendar {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* FullCalendar toolbar wrapping for narrow screens */
.fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc .fc-toolbar-title {
    font-size: 1.1rem;
}

.fc .fc-button {
    padding: 0.4em 0.65em;
}

.fc .fc-button-primary {
    background-color: var(--hsf-navy-mid);
    border-color: var(--hsf-navy-mid);
}

.fc .fc-button-primary:not(:disabled):hover {
    background-color: var(--hsf-navy-hover);
    border-color: var(--hsf-navy-hover);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--hsf-navy-dark);
    border-color: var(--hsf-navy-dark);
}

.fc .fc-daygrid-day.fc-day-today,
.fc .fc-timegrid-col.fc-day-today {
    background-color: rgba(225, 255, 0, 0.18);
}

@media (max-width: 600px) {
    .navbar-logo {
        height: 36px;
    }

    .nav-links li a {
        font-size: 0.85rem;
        padding: 0.35rem 0.5rem;
    }

    .site-header h1 {
        font-size: 1.05rem;
    }

    .site-content {
        padding: 0.4rem;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        margin-bottom: 0.35rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1rem;
        text-align: center;
    }

    .fc .fc-button {
        padding: 0.35em 0.5em;
        font-size: 0.85rem;
    }

    .fc-event-title, .fc-event-time {
        font-size: 0.75rem;
    }

    .roster-panel {
        width: 100%;
        max-width: none;
        border-radius: 0;
    }
}

/* Roster detail overlay */
.roster-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(13, 31, 60, 0.55);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
}

.roster-overlay.open {
    display: flex;
}

.roster-panel {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.roster-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--hsf-navy-dark);
    padding-right: 1.5rem;
}

.roster-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #52606d;
}

.roster-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.75rem;
}

.roster-list dt {
    font-weight: 600;
    color: var(--hsf-navy);
}

.roster-list dd {
    margin: 0;
}

.signup-section {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hsf-border);
}

.signup-section h3 {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hsf-navy-dark);
}

.signup-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.signup-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

#signupMessage {
    display: none;
}

/* Manage Shifts / Shift Form pages */
h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--hsf-navy-dark);
    margin: 1.25rem 0 0.5rem;
}

.form-panel {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 480px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--hsf-navy);
}

.field input, .field select {
    padding: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    width: 100%;
}

.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--hsf-navy-dark);
    box-shadow: 0 0 0 0.2rem rgba(13, 31, 60, 0.15);
}

.rich-text-toolbar {
    display: flex;
    gap: 0.25rem;
}

.rt-btn {
    background-color: #ffffff;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    width: 30px;
    height: 30px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--hsf-navy);
    cursor: pointer;
}

.rt-btn:hover {
    background-color: #f4f6f8;
}

.rt-select {
    padding: 0 0.4rem;
    height: 30px;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--hsf-navy);
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    background-color: #ffffff;
    cursor: pointer;
}

.rich-text-editor {
    min-height: 11.2rem;
    line-height: 1.4rem;
    padding: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    background-color: #ffffff;
    overflow-y: auto;
}

.rich-text-editor:focus {
    outline: none;
    border-color: var(--hsf-navy-dark);
    box-shadow: 0 0 0 0.2rem rgba(13, 31, 60, 0.15);
}

#callIdsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.callid-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.callid-input {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
}

.callid-input:focus {
    outline: none;
    border-color: var(--hsf-navy-dark);
    box-shadow: 0 0 0 0.2rem rgba(13, 31, 60, 0.15);
}

.btn-remove-callid {
    flex-shrink: 0;
    background-color: #ffffff;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    line-height: 1;
    color: #b71c1c;
    cursor: pointer;
}

.btn-remove-callid:hover {
    background-color: #fdecea;
}

.btn-add-callid {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    padding: 0.5rem 0.9rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--hsf-navy);
    cursor: pointer;
    margin-top: 0.4rem;
}

.btn-add-callid:hover {
    background-color: #f4f6f8;
}

.field-error {
    color: #b71c1c;
    font-size: 0.8rem;
}

.field-hint {
    display: block;
    color: #7b8794;
    font-size: 0.8rem;
}

.form-message {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.form-message-success {
    background-color: #e3f6e5;
    color: #1b5e20;
}

.form-message-error {
    background-color: #fdecea;
    color: #b71c1c;
}

.btn-primary {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--hsf-navy-mid);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 0.65rem 1.4rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--hsf-navy-hover);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0.5rem;
}

.page-actions-title {
    margin: 0;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--hsf-navy);
    border: 1px solid var(--hsf-input-border);
    border-radius: 3px;
    padding: 0.65rem 1.4rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #f4f6f8;
}

.table-responsive {
    overflow-x: auto;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.shift-grid {
    border-collapse: collapse;
    width: 100%;
    min-width: 720px;
}

.shift-grid th, .shift-grid td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid #e4e7eb;
    white-space: nowrap;
}

.shift-grid th {
    background-color: #f4f6f8;
    color: var(--hsf-navy);
    font-weight: 700;
}

.shift-grid a {
    color: var(--hsf-navy-mid);
}

@media (max-width: 600px) {
    .form-panel {
        max-width: none;
    }
}

/* ---- Login page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.login-header {
    background-color: #ffffff;
    border-bottom: 3px solid var(--hsf-navy-dark);
    padding: 28px 24px 20px;
    text-align: center;
}

.login-header img {
    height: 56px;
    margin-bottom: 12px;
}

.login-header h1 {
    color: var(--hsf-navy-dark);
    font-weight: 800;
    margin: 0;
    font-size: 1.15rem;
}

.login-header p {
    color: #666;
    font-size: 0.85rem;
    margin: 4px 0 0;
}

.login-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.btn-login {
    display: block;
    background-color: var(--hsf-navy-dark);
    border: none;
    color: #fff;
    width: 100%;
    padding: 0.7rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-login:hover {
    background-color: #1a3a6a;
}

.register-link {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.register-link a {
    font-weight: 700;
}

/* ---- Calendar legend ---- */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    padding: 0.25rem 0.25rem 0.75rem;
    font-size: 0.85rem;
    color: var(--hsf-navy);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot-full {
    background-color: #2563eb;
}

.legend-dot-open {
    background-color: #eab308;
}

.legend-dot-completed {
    background-color: #000000;
}

/* ---- Reports list ---- */
.report-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.report-list-item {
    display: block;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.report-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.report-list-title {
    font-weight: 800;
    color: var(--hsf-navy-dark);
    margin-bottom: 0.3rem;
}

.report-list-desc {
    font-size: 0.85rem;
    color: #52606d;
}

/* ---- Shift Detail report ---- */
.shift-detail-panel {
    margin-top: 1rem;
    max-width: none;
}

.shift-detail-list {
    margin-bottom: 1rem;
}

.shift-detail-comments {
    background-color: #f9fafb;
}

/* ---- Reports page ---- */
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.summary-tile {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--hsf-navy-dark);
    line-height: 1.2;
}

.summary-label {
    font-size: 0.8rem;
    color: #52606d;
    margin-top: 0.25rem;
}

.section-hint {
    font-size: 0.85rem;
    color: #52606d;
    margin: -0.25rem 0 0.5rem;
}
