/* Keep Shining — cleaning-dispatch app (Big Diamond Polishing Co)
   Visually consistent with the Diamond In The Ruff site's
   --navy/--blue/--gold palette, since both are part of The Diamond Corp. */

:root {
    --navy: #10233f;
    --navy-light: #19375f;
    --blue: #2477c9;
    --blue-dark: #195d9e;
    --gold: #e8b84a;
    --green: #1f8a52;
    --green-light: #e8f6ee;
    --orange: #c77a1a;
    --orange-light: #fff2df;
    --red: #b44040;
    --red-light: #fdecec;
    --background: #f7f9fc;
    --white: #ffffff;
    --text: #16243a;
    --muted: #627086;
    --border: #dce5ef;
    --shadow: 0 18px 45px rgba(16, 35, 63, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

button,
select,
input {
    font: inherit;
}

/* ============================== */
/* LOGIN PAGE */
/* ============================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 34px 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-brand .brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--navy);
    color: var(--white);
    font-size: 1.2rem;
}

.login-brand span {
    color: var(--navy);
    font-weight: 900;
    font-size: 1.1rem;
}

.login-card h1 {
    margin: 18px 0 6px;
    color: var(--navy);
    font-size: 1.5rem;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.88rem;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card input {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--background);
    color: var(--text);
    outline: none;
}

.login-card input:focus {
    border-color: var(--blue);
}

.login-card button {
    margin-top: 6px;
    padding: 13px;
    border: none;
    border-radius: 11px;
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    font-weight: 800;
}

.login-card button:disabled {
    opacity: 0.6;
    cursor: default;
}

.login-error {
    min-height: 1.2em;
    color: var(--red);
    font-size: 0.85rem;
}

.login-terms-link {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

/* ============================== */
/* DASHBOARD */
/* ============================== */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 14px 24px;
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 5px 18px rgba(16, 35, 63, 0.22);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: 1.08rem;
    font-weight: 900;
    text-decoration: none;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 700;
}

.logout-button {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.dashboard-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 42px 24px 70px;
}

.dashboard-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 32px;
}

.dashboard-top h1 {
    margin: 0 0 7px;
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.dashboard-top p {
    margin: 0;
    color: var(--muted);
}

.availability-control {
    min-width: 210px;
}

.availability-control label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 800;
}

.availability-control select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 34px;
}

.stat-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(16, 35, 63, 0.06);
}

.stat-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    color: var(--navy);
    font-size: 2rem;
    font-weight: 900;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
    gap: 24px;
    align-items: start;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.25rem;
}

.panel-header span {
    color: var(--muted);
    font-size: 0.82rem;
}

.request-list {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.request-card {
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.request-card:hover {
    transform: translateY(-2px);
    border-color: rgba(36, 119, 201, 0.35);
    box-shadow: 0 12px 28px rgba(16, 35, 63, 0.1);
}

.request-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.request-card h3 {
    margin: 0 0 5px;
    color: var(--navy);
    font-size: 1.05rem;
}

.request-address {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.priority-badge {
    flex-shrink: 0;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.priority-high {
    background: var(--red-light);
    color: var(--red);
}

.priority-medium {
    background: var(--orange-light);
    color: var(--orange);
}

.priority-low {
    background: var(--green-light);
    color: var(--green);
}

.request-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.detail-box {
    padding: 11px;
    border-radius: 11px;
    background: var(--background);
}

.detail-box strong {
    display: block;
    margin-bottom: 3px;
    color: var(--navy);
    font-size: 0.75rem;
}

.detail-box span {
    color: var(--muted);
    font-size: 0.78rem;
}

.request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 9px;
    margin-top: 16px;
}

.request-button {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
}

.accept-button {
    border: 1px solid var(--navy);
    background: var(--navy);
    color: var(--white);
}

.directions-button {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
}

.complete-button {
    border: 1px solid var(--green);
    background: var(--green);
    color: var(--white);
}

.status-panel {
    padding: 24px;
}

.current-job {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy), var(--blue-dark));
    color: var(--white);
}

.current-job-label {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.current-job h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.current-job p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.current-job button {
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--gold);
    color: var(--navy);
    cursor: pointer;
    font-weight: 900;
}

.activity-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.activity-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
}

.activity-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--navy);
    font-size: 0.86rem;
}

.activity-item span {
    color: var(--muted);
    font-size: 0.78rem;
}

#jobsMap {
    width: 100%;
    height: 340px;
}

.map-info-window {
    max-width: 220px;
}

.map-info-window h4 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 0.95rem;
}

.map-info-window p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.8rem;
}

.map-info-window button {
    padding: 8px 12px;
    border: 1px solid var(--navy);
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
}

.empty-message {
    padding: 30px 20px;
    color: var(--muted);
    text-align: center;
}

/* ============================== */
/* TERMS PAGE */
/* ============================== */

.terms-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 42px 24px 70px;
}

.terms-page h1 {
    color: var(--navy);
}

.terms-page h2 {
    margin-top: 30px;
    color: var(--navy);
    font-size: 1.15rem;
}

.legal-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.review-notice {
    padding: 14px 16px;
    margin-bottom: 24px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: var(--orange-light);
    color: var(--navy);
    font-size: 0.85rem;
}

@media (max-width: 950px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .dashboard-header {
        padding: 12px 16px;
    }

    .user-badge {
        display: none;
    }

    .dashboard-page {
        padding: 28px 14px 55px;
    }

    .dashboard-top {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .request-details {
        grid-template-columns: 1fr;
    }

    .request-actions {
        grid-template-columns: 1fr;
    }
}
