/* Staff portal — login & dashboard */
body.staff-portal-page .site-header {
    box-shadow: 0 2px 20px rgba(15, 23, 42, 0.06);
}

body.staff-portal-page #preloader {
    display: none !important;
}

.staff-portal-main {
    min-height: calc(100vh - 320px);
    background: linear-gradient(165deg, #f0fdf4 0%, #f8fafc 45%, #fff7ed 100%);
    padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
}

.staff-login-section .container {
    display: flex;
    justify-content: center;
}

.staff-login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-white);
    border-radius: 20px;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.12);
}

.staff-login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.staff-login-brand img {
    margin-bottom: 1rem;
}

.staff-login-brand h1 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.staff-login-brand p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.staff-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.staff-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.staff-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.staff-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.staff-field label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.staff-input-wrap {
    position: relative;
}

.staff-input-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.85;
    pointer-events: none;
}

.staff-input-wrap input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.staff-input-wrap input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.staff-login-submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.35rem;
}

.staff-login-footnote {
    text-align: center;
    margin: 1.5rem 0 0;
    font-size: 0.88rem;
}

.staff-login-footnote a {
    color: var(--text-muted);
}

.staff-login-footnote a:hover {
    color: var(--primary-color);
}

.staff-dashboard-section .container {
    max-width: 900px;
}

.staff-dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.staff-dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    background: rgba(22, 163, 74, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.staff-dashboard-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.35rem;
}

.staff-dashboard-greeting {
    margin: 0;
    color: var(--text-muted);
}

.staff-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-tools-grid {
    display: grid;
    gap: 1.25rem;
}

.staff-tool-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: clamp(1.5rem, 4vw, 2rem);
    border: 1px solid rgba(22, 163, 74, 0.12);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.staff-tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--fresh-green));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.staff-tool-card h2 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.staff-tool-card p {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.staff-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Full-screen tracker (post-login dashboard) */
html.staff-tracker-fullscreen-root {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
}

html.staff-tracker-fullscreen-root body.staff-tracker-fullscreen {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    background: #f8fafc;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

.staff-tracker-frame-full {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    border: 0;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-fullscreen-logout {
    position: fixed;
    z-index: 2147483646;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    padding: 0.4rem 0.65rem;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: rgba(15, 23, 42, 0.72);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0.55;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.staff-fullscreen-logout:hover,
.staff-fullscreen-logout:focus {
    opacity: 1;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.staff-fullscreen-logout:focus-visible {
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.45);
}

@media (max-width: 600px) {
    .staff-fullscreen-logout {
        font-size: 0.65rem;
        padding: 0.35rem 0.55rem;
        opacity: 0.5;
    }
}