/* General Body/Page Styling */
body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: black;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Centering the main dashboard title */
#dashboard-section h1 {
    text-align: center;
    color: var(--ink);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Centering the entire dashboard section container */
#dashboard-section {
    max-width: 1860px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

/* Logout Button Styling */
#logout-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
#logout-btn:hover {
    background-color: #5a6268;
    box-shadow: var(--shadow);
}

/* Refresh Button Styling */
#refresh-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
#refresh-btn:hover {
    background-color: #5a6268;
    box-shadow: var(--shadow);
}

/* Admin button — sits directly under the Logout button (admins only) */
#admin-link {
    position: absolute;
    top: 62px;
    right: 25px;
    background-color: #FFA500;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    transition: background-color 0.2s, box-shadow 0.2s;
}
#admin-link:hover {
    background-color: #E09400;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.10);
}

/* Adjusting the grid layout for responsiveness */
.dashboard-grid, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    margin-bottom: 20px;
}

/* Main dashboard: fixed 8-wide grid. The two charts span two columns each, so the
   layout is a clean 8 x 2 (12 KPIs + two double-width charts at the bottom-right). */
.dashboard-grid.grid-8 { grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; }
.dashboard-grid.grid-8 .chart-block { grid-column: span 2; }
@media (max-width: 1300px) { .dashboard-grid.grid-8 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .dashboard-grid.grid-8 { grid-template-columns: repeat(2, 1fr); } }

/* Team Breakdown sits centered under the grid. */
.team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1400px; margin: 0 auto 20px; }
@media (max-width: 760px) { .team-grid { grid-template-columns: 1fr; } }

/* Chart entry tiles stand out from the grey KPI tiles. */
a.dashboard-block.chart-block { background-color: #3f4e63; }
a.dashboard-block.chart-block:hover { background-color: #4a5a72; }
a.dashboard-block.chart-block p { font-size: 1.05rem; font-weight: 600; opacity: 0.92; }
.chart-block .mini-chart-wrap { position: relative; width: 100%; height: 88px; margin: 8px 0 4px; }
.chart-block .mini-chart-cta { font-size: 0.8rem; font-weight: 600; opacity: 0.85; }

/* "Reviews" link sits directly under the Refresh button. */
#reviews-link {
    position: absolute;
    top: 66px;
    left: 25px;
    background-color: #FFA500;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 15px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
#reviews-link:hover { background-color: #E09400; }

/* First tile combines two metrics; each heading links to its own report. */
.combo-block { justify-content: center; gap: 10px; }
.combo-item { display: flex; flex-direction: column; align-items: center; }
.combo-head { color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.combo-head:hover { text-decoration: underline; }
.combo-item p { margin: 2px 0 0; font-size: 1.6rem; font-weight: 700; }

/* Google reviews tracker page */
.review-stars { color: #f5b50a; letter-spacing: 2px; }
.review-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 6px 0 18px;
}
.review-add select, .review-add input {
    padding: 7px 10px;
    border: 1px solid #cbd0d6;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}
.review-add button {
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
}
.review-add button:hover { background-color: #5a6268; }
#reviews-table td:not(:first-child), #reviews-table th:not(:first-child) { text-align: center; }
table.users tr.totals-row td { background: #f7f8fa; border-top: 2px solid #e6e8eb; }

/* Reviews month scroller (Prev / Next), mirrors the charts page selector. */
.review-nav { justify-content: center; margin: 4px 0 16px; }
#rev-period-label { min-width: 220px; text-align: center; font-weight: 700; color: var(--ink); }

/* Reviews table tuned for a large TV: 25% larger, bold, soft zebra striping. */
#reviews-table { font-size: 1.25rem; }
#reviews-table th, #reviews-table td { font-weight: 700; padding: 14px 18px; }
#reviews-table thead th { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
#reviews-table tbody tr:nth-child(even):not(.totals-row) td { background: #eef1f4; }
#rev-remove-btn, #rev-del-member-btn { background-color: #d9534f; }
#rev-remove-btn:hover, #rev-del-member-btn:hover { background-color: #c9302c; }
.review-manage { margin-top: -6px; }
.review-manage-sep { color: #cbd0d6; font-weight: 700; }

/* Kiosk auto-rotate toggle (dashboard <-> reviews) */
#rotate-toggle {
    position: fixed;
    bottom: 14px;
    right: 14px;
    z-index: 50;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    opacity: 0.85;
}
#rotate-toggle:hover { opacity: 1; }
#rotate-toggle.off { background: #adb5bd; }

/* Trends (charts) page */
.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 18px;
}
.chart-modes, .chart-nav { display: flex; gap: 8px; align-items: center; }
.chart-mode, .chart-nav button {
    background: #fff;
    border: 1px solid #cbd0d6;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: #5b6470;
    transition: background-color 0.2s;
}
.chart-mode:hover, .chart-nav button:hover { background: #f3f4f6; }
.chart-mode.active { background: var(--neutral, #6c757d); color: #fff; border-color: transparent; }
.chart-nav button:disabled { opacity: 0.4; cursor: default; }
.chart-nav button:disabled:hover { background: #fff; }
#period-label { min-width: 240px; text-align: center; font-weight: 700; color: var(--ink); }
.chart-wrap {
    position: relative;
    height: 460px;
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* Styles for individual blocks within the dashboard */
.dashboard-block, .team-block {
    background-color: #555;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

/* Even out dashboard metric tiles: title at top, value grows & centers, the
   View List / View Report links sit at the bottom so every tile lines up. */
.dashboard-grid .dashboard-block { justify-content: flex-start; }
.dashboard-grid .dashboard-block > p:first-of-type {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
    font-size: 1.7rem;
    font-weight: 700;
}

/* Specific styling for Unpaid Rents block to handle two-line display */
#unpaid-rents {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Ensure headings and paragraphs in blocks don't override centering */
.dashboard-block h2,
.dashboard-block p,
.team-block h4,
.team-block p {
    margin: 5px 0;
    color: inherit;
}

/* Styles for the "Download List" buttons within the blocks */
.dashboard-block button {
    background-color: #494E53;
    color: white;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8em;
    margin-top: 5px !important;
    transition: background-color 0.2s;
}

.dashboard-block button:hover {
    background-color: #5a6268;
}

/* Style for report links */
.report-link {
    color: #FFA500;
    text-decoration: none;
    margin-top: 5px;
    font-size: 0.9em;
}
.report-link:hover {
    text-decoration: underline;
}

/* The whole dashboard tile links to its report; keep the white text, no underline. */
a.dashboard-block {
    text-decoration: none;
    color: white;
    cursor: pointer;
}

/* Make the Team 1/2/3 titles stand out as headers. */
.team-block h4 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Diagnostic and Team Breakdown section titles */
h3 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--ink);
}

/* Specific styling for login section */
#login-section {
    text-align: center;
    padding-top: 50px;
}
#login-section h1 {
    color: var(--ink);
}
#login-form {
    max-width: 300px;
    margin: 20px auto;
    padding: 22px;
    background-color: #555;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.10);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#login-form label {
    text-align: left;
    color: white;
}
#login-form input[type="text"],
#login-form input[type="password"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #777;
    background-color: #666;
    color: white;
}
#login-form button {
    padding: 10px 15px;
    background-color: #FFA500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
#login-form button:hover {
    background-color: #E09400;
}
#login-error {
    color: #ff4d4d;
    font-weight: bold;
    margin-top: 10px;
}

/* "Admin Panel" link below the login box */
.admin-panel-link {
    margin-top: 18px;
}
.admin-panel-link a {
    color: #FFA500;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: bold;
}
.admin-panel-link a:hover {
    text-decoration: underline;
}

/* Logo Styling */
.login-logo,
.dashboard-logo {
    display: block;
    margin: 10px auto;
    max-width: 150px;
    height: auto;
}

/* Specific styling for the snapshot button */
#snapshot-btn {
    display: block;
    width: fit-content;
    margin: 40px auto 20px auto;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: normal;
    transition: background-color 0.2s;
}
#snapshot-btn:hover {
    background-color: #5a6268;
}

/* "Previous Snapshots" link sits just under Generate Snapshot (secondary look) */
#snapshots-history-link {
    display: block;
    width: fit-content;
    margin: 0 auto 30px auto;
    padding: 7px 15px;
    background: #fff;
    color: #5b6470;
    border: 1px solid #cbd0d6;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.2s, box-shadow 0.2s;
}
#snapshots-history-link:hover {
    background: #f3f4f6;
    box-shadow: var(--shadow-sm);
}

/* --- ▼▼▼ UPDATED STYLES FOR TEAM VACANCY RATES ▼▼▼ --- */

/* Green for vacancy rates between 0% and 5% */
.vacancy-green {
    background-color: #28a745;
    border-color: #28a745;
}

/* Yellow for vacancy rates between 5% and 7% */
.vacancy-yellow {
    background-color: #f0ad4e;
    border-color: #f0ad4e;
}

/* Red for vacancy rates above 7% */
.vacancy-red {
    background-color: #d9534f;
    border-color: #d9534f;
}
.team-download-btn {
    background-color: transparent;
    color: white; /* Changed from orange to white */
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 5px 0;
    font-size: 0.9em;
    font-family: Arial, sans-serif;
}

.team-download-btn:hover {
    color: #ccc; /* Lighter gray on hover */
}

/* =========================================================
   Shared design system (brand tokens, admin UI polish)
   ========================================================= */
:root {
    --brand-orange: #FFA500;
    --brand-orange-hover: #E09400;
    --ink: #1f2937;
    --muted: #6b7280;
    --surface: #ffffff;
    --surface-alt: #f7f8fa;
    --border: #e6e8eb;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 6px 20px rgba(16, 24, 40, 0.10);
    --danger: #dc3545;
    --neutral: #6c757d;
    --neutral-hover: #5a6268;
}

#snapshot-btn { box-shadow: var(--shadow-sm); }
#snapshot-btn:hover { box-shadow: var(--shadow); }

/* Unify the dashboard utility buttons with the softer, rounded look */
#logout-btn,
#refresh-btn,
#snapshot-btn,
#admin-link {
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* "View Team Details" link inside each team block */
.team-details-link {
    display: block;
    width: 190px;
    margin: 10px auto 0;
    padding: 8px 15px;
    background-color: var(--neutral);
    color: #fff;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.team-details-link:hover {
    background-color: var(--neutral-hover);
    box-shadow: var(--shadow);
}
/* the owners button sits in a <p> wrapper — remove its default margin */
.team-block [id$="-owners-download"] { margin: 0; }

/* Back button on the team detail page (mirrors the dashboard Refresh button) */
#back-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: var(--neutral);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
#back-btn:hover {
    background-color: var(--neutral-hover);
    box-shadow: var(--shadow);
}

/* ---- Admin page layout ---- */
.admin-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px 20px 64px;
    color: var(--ink);
}

.admin-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.admin-bar h1 {
    margin: 0;
    font-size: 1.55rem;
    color: var(--ink);
}
.admin-bar .spacer { flex: 1; }
.admin-bar .admin-logo {
    height: 40px;
    width: auto;
    margin: 0;
    display: inline-block;
}
.admin-bar a {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 600;
}
.admin-bar a:hover { text-decoration: underline; }

/* ---- Cards ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    margin-top: 22px;
}
.card h3 {
    margin: 0 0 14px;
    text-align: left;
    color: var(--ink);
    font-size: 1.1rem;
}

/* ---- Tables ---- */
.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
table.users {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
table.users th,
table.users td {
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.users thead th {
    background: var(--surface-alt);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 700;
}
table.users tbody tr:last-child td { border-bottom: none; }
table.users tbody tr:hover { background: #fafbfc; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}
.badge.admin   { background: rgba(46, 125, 50, 0.12); color: #2e7d32; }
.badge.user    { background: rgba(107, 114, 128, 0.16); color: #4b5563; }
.badge.success { background: rgba(46, 125, 50, 0.12); color: #2e7d32; }

/* ---- Buttons (admin) ---- */
.admin-wrap button {
    font: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s, box-shadow 0.15s, color 0.15s, opacity 0.15s;
}
.admin-wrap button:hover { box-shadow: var(--shadow); }
.admin-wrap button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* Primary (orange) */
.btn-primary {
    background: var(--brand-orange);
    color: #fff;
}
.btn-primary:hover { background: var(--brand-orange-hover); }

/* Logout */
#admin-panel #logout-btn {
    position: static;
    background: var(--neutral);
    color: #fff;
}
#admin-panel #logout-btn:hover { background: var(--neutral-hover); }

/* Row action buttons */
.row-actions { white-space: nowrap; }
.row-actions button { margin-right: 6px; }
.row-actions button:last-child { margin-right: 0; }
.row-actions button[data-act="password"],
.row-actions button[data-act="toggle"] {
    background: #fff;
    color: #374151;
    border-color: var(--border);
}
.row-actions button[data-act="password"]:hover,
.row-actions button[data-act="toggle"]:hover {
    background: var(--surface-alt);
}
.row-actions button[data-act="delete"] {
    background: #fff;
    color: var(--danger);
    border-color: rgba(220, 53, 69, 0.4);
}
.row-actions button[data-act="delete"]:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* ---- Forms ---- */
.field {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    max-width: 360px;
}
.field label {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 600;
}
.field input[type="text"],
.field input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.field input[type="text"]:focus,
.field input[type="password"]:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.18);
}
.field.inline {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.field.inline label { margin: 0; }
.add-user-card {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Messages ---- */
.msg {
    margin: 12px 0;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    display: none;
    font-size: 0.9rem;
}
.msg.error   { background: #fdecea; color: #b71c1c; display: block; }
.msg.success { background: #e7f6ec; color: #1b5e20; display: block; }
.muted { color: var(--muted); font-size: 13px; }

/* ---- Admin login (mirror the dashboard login styling) ---- */
#admin-login {
    text-align: center;
    padding-top: 50px;
}
#admin-login h1 { color: var(--ink); }
#admin-login-form {
    max-width: 300px;
    margin: 20px auto;
    padding: 22px;
    background-color: #555;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#admin-login-form label {
    text-align: left;
    color: white;
    font-weight: 600;
}
#admin-login-form input[type="text"],
#admin-login-form input[type="password"] {
    padding: 9px;
    border-radius: var(--radius-sm);
    border: 1px solid #777;
    background-color: #666;
    color: white;
}
#admin-login-form button {
    padding: 10px 15px;
    background-color: var(--brand-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s, box-shadow 0.15s;
}
#admin-login-form button:hover {
    background-color: var(--brand-orange-hover);
    box-shadow: var(--shadow);
}

/* ---- Snapshot format picker modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 26px 24px 20px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow);
}
.modal-card h3 { margin: 0 0 6px; color: var(--ink); text-align: center; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin: 18px 0 12px; }
.modal-actions button {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--brand-orange);
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.modal-actions button:hover { background-color: var(--brand-orange-hover); box-shadow: var(--shadow); }
.modal-cancel {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
}

/* ---- "View List" tile button (spacing from the Download button) ---- */
.view-list-btn { margin-left: 4px !important; }

/* ---- View List page ---- */
.list-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 0 0 14px;
}
#list-filter {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--ink);
}
#list-filter:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.18);
}
.list-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list-actions button {
    background-color: var(--neutral);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.list-actions button:hover { background-color: var(--neutral-hover); box-shadow: var(--shadow); }

/* "Look up all work orders" button + the lookup page controls */
#wo-lookup-btn, #wo-vendor-btn { background-color: var(--brand-orange, #FFA500); }
#wo-lookup-btn:hover, #wo-vendor-btn:hover { background-color: #E09400; }
#wo-search {
    background-color: var(--neutral);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
}
#wo-search:hover { background-color: var(--neutral-hover); }
#wo-address {
    padding: 9px 12px;
    border: 1px solid var(--border, #cbd0d6);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}
.wo-daterange { font-size: 0.9em; font-weight: 600; color: var(--muted, #6b7280); display: flex; align-items: center; gap: 6px; }
.wo-daterange input[type="date"], .wo-daterange select {
    padding: 7px 9px;
    border: 1px solid var(--border, #cbd0d6);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
/* Lookup toolbar stays on a single row; the address/vendor field flexes to fill. */
.list-toolbar.wo-toolbar { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
.wo-toolbar #wo-address { flex: 1 1 160px; min-width: 150px; }
.wo-toolbar .list-actions { flex-wrap: nowrap; }
.wo-toolbar .wo-daterange, .wo-toolbar #wo-search { flex: 0 0 auto; }

.list-table td { font-size: 0.92rem; }

/* Clickable values inside list tables (e.g. owner names -> Rentvine) */
table.users td a { color: var(--brand-orange); font-weight: 600; text-decoration: none; }
table.users td a:hover { text-decoration: underline; }

/* "Current Stats Rating" block on the team detail page */
.rating-block {
    max-width: 360px;
    margin: 34px auto 10px;
    padding: 16px 22px;
    border-radius: var(--radius);
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.rating-block .rating-title { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; }
.rating-block .rating-value { font-size: 1.3rem; font-weight: 700; margin-top: 4px; }

/* Status pills (work order Status / Vendor Status columns) */
.status-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.status-badge.badge-green { color: #1e7e34; border-color: #28a745; background: rgba(40, 167, 69, 0.08); }
.status-badge.badge-grey { color: #5b6470; border-color: #cbd0d6; background: rgba(107, 114, 128, 0.07); }
.status-badge.badge-red { color: #c9302c; border-color: #d9534f; background: rgba(217, 83, 79, 0.08); }

/* Sortable table headers */
table.users thead th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.users thead th.sortable:hover { background: #eef1f4; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 22px 0 10px;
    flex-wrap: wrap;
}
.pagination button {
    background-color: var(--neutral);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s;
}
.pagination button:hover:not(:disabled) { background-color: var(--neutral-hover); }
.pagination button:disabled { opacity: 0.45; cursor: not-allowed; }
.pagination .pg-info { color: var(--muted); font-size: 0.9rem; }