@charset "UTF-8";
/* ================================================================
   Wailea Fairway Villas admin site stylesheet

   Contents:
     1. Design tokens (colors)
     2. Base / global elements
     3. Sortable table headers
     4. Navigation (nav.php)
     5. Home page dashboard (index.php)
     6. Occupant detail page (occupantDetail.php)
     7. Concatenated email page (reportEmail.php)
     8. Search results page (search.php)
   ================================================================ */

/* ============================================= */
/* 1. Design tokens                              */
/* ============================================= */

:root {
    --wfv-blue: #1d4f9e;          /* primary blue (links, headings) */
    --wfv-green: #2f8b4c;         /* primary green (accents, "on" states) */
    --wfv-blue-soft: #eef3fb;     /* pale blue fill */
    --wfv-green-soft: #e0efe6;    /* pale green fill (nav, cards) */
    --wfv-blue-border: #8aabd6;   /* border on blue elements */
    --wfv-green-border: #8cbf9a;  /* border on green elements */
    --wfv-gray: #6b7a85;          /* muted text */
    --wfv-border: #e2e6e9;        /* light neutral border (on white) */
}

/* ============================================= */
/* 2. Base / global elements                     */
/* ============================================= */

body {
    margin: 0;
    font-family: Aptos, sans-serif;
}

.content {
    padding: 10px;
    font-size: 16px;
}

h1 {
    font-size: 24px;
    font-weight: normal;
}

.highlight {
    background-color: #ffff99;
}

/* ============================================= */
/* 3. Sortable table headers                     */
/* ============================================= */

th {
    cursor: pointer;
    font-weight: normal;
    font-size: 16px;
    text-align: left;
    color: #0000EE;
    text-decoration: underline;
}
th.asc::after  { content: ' ▲'; font-size: 11px; }
th.desc::after { content: ' ▼'; font-size: 11px; }

/* ============================================= */
/* 4. Navigation (nav.php)                       */
/* ============================================= */

/* Freeze nav at top of screen on tablet/desktop only */
@media (min-width: 768px) {
  .wfv-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--wfv-green-soft);
  }
}

/* Offset jump-link targets so section titles aren't hidden
   under the sticky nav. Values = nav height + small cushion.
   Medium screens get a larger offset because the nav grid
   wraps to three rows there and is taller. Offsets are sized
   for the tallest case (admin toggle on adds a tools row);
   with admin off the extra gap is harmless. */
@media (min-width: 1051px) {
  :target {
    scroll-margin-top: 156px;   /* nav 2 rows + admin tools row */
  }
}

@media (min-width: 768px) and (max-width: 1050px) {
  :target {
    scroll-margin-top: 200px;   /* nav 3 rows + admin tools (may wrap) */
  }
}

.wfv-nav {
    background: var(--wfv-green-soft);
    padding: 12px 16px;
    border-bottom: 2px solid var(--wfv-border);
    margin: 0;
}

.wfv-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: 34px;
    gap: 6px;
    width: 100%;
    max-width: 1600px;
    margin: 0;
}

.wfv-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 2px solid rgba(0, 0, 0, 0.16);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.wfv-card-blue {
    background: linear-gradient(135deg, #dfebf9 0%, #c5daf3 100%);
    border-color: var(--wfv-blue-border);
    color: var(--wfv-blue);
}

.wfv-card-green {
    background: linear-gradient(135deg, #e1f1e5 0%, #c9e5d1 100%);
    border-color: var(--wfv-green-border);
    color: #23753d;
}

.wfv-card-toggle {
    background: linear-gradient(135deg, #eeebe2 0%, #ded9cb 100%);
    border-color: #b8b2a5;
    color: #363633;
}

.wfv-card:hover {
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

.wfv-card:focus-visible,
.wfv-search-input:focus-visible,
.wfv-search-btn:focus-visible {
    outline: 3px solid rgba(29, 79, 158, 0.28);
    outline-offset: 2px;
}

.wfv-home-card {
    grid-column: span 2;
    grid-row: span 2;
    height: 74px;
    padding: 8px 11px;
    background: #ffffff;
    border-color: #d2d6d4;
}

.wfv-home-logo {
    display: block;
    width: 100%;
    max-width: 280px;
    max-height: 53px;
    object-fit: contain;
}

/* --- Nav admin tools row (admin toggle on) --- */

.wfv-admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 1600px;
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--wfv-green-border);
}

.wfv-admin-tools a {
    display: inline-flex;
    align-items: center;
    height: 26px;
    box-sizing: border-box;
    padding: 0 10px;
    background: #fff;
    border: 2px solid var(--wfv-green-border);
    border-radius: 5px;
    color: var(--wfv-blue);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.wfv-admin-tools a:hover {
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

/* --- Nav search bar --- */

.wfv-search {
    grid-column: span 2;
    justify-content: stretch;
    min-width: 0;
    background: linear-gradient(135deg, #fdfcf9 0%, #f4f2ed 100%);
    border-color: #cfcac0;
    color: #363633;
    padding: 0 9px 0 13px;
}

.wfv-search:hover {
    transform: none;
    box-shadow: none;
    filter: none;
}

.wfv-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 100%;
}

.wfv-search-input {
    flex: 1 1 auto;
    min-width: 29px;
    height: 26px;
    box-sizing: border-box;
    border: none;
    background: transparent;
    color: #292927;
    font-family: inherit;
    font-size: 14px;
    padding: 0;
    outline: none;
}

.wfv-search-input::placeholder {
    color: #747470;
    opacity: 1;
}

.wfv-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #171716;
    padding: 4px;
    cursor: pointer;
}

.wfv-search-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.wfv-search-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Nav responsive breakpoints --- */

/* Medium screens: five columns, with search filling the remaining row. */
@media (max-width: 1050px) {
    .wfv-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .wfv-search {
        grid-column: span 3;
    }
}

/* Small screens: logo and search become full-width. */
@media (max-width: 700px) {
    .wfv-nav {
        padding: 10px;
    }

    .wfv-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: 53px;
        grid-auto-rows: 43px;
        gap: 5px;
    }

    .wfv-card:not(.wfv-home-card):not(.wfv-search) {
        height: 43px;
        padding: 5px 3px;
        font-size: 13px;
    }

    .wfv-home-card {
        grid-column: 1 / -1;
        grid-row: span 1;
        height: 53px;
        padding: 6px 10px;
    }

    .wfv-home-logo {
        max-width: 320px;
        max-height: 40px;
    }

    .wfv-card-toggle {
        grid-column: span 2;
    }

    .wfv-search {
        grid-column: 1 / -1;
        height: 34px;
        padding-left: 7px;
    }
}

/* Narrow phones: two equal card columns. */
@media (max-width: 420px) {
    .wfv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: 64px;
    }

    .wfv-home-card {
        height: 64px;
        padding: 8px 10px;
    }

    .wfv-home-logo {
        max-height: 48px;
    }

    .wfv-card-toggle {
        grid-column: span 1;
    }

    .wfv-search-input {
        font-size: 13px;
    }
}

/* ============================================= */
/* 5. Home page dashboard (index.php)            */
/* ============================================= */

.dash {
    max-width: 1100px;
}

.chart-card {
    background: var(--wfv-green-soft);
    border: 2px solid var(--wfv-green-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
    max-width: 340px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

.admin-card {
    background: var(--wfv-green-soft);
    border: 2px solid #d8e4de;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.admin-card h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--wfv-blue);
    margin: 0 0 8px 0;
}

/* Admin Tools buttons: nav-card look with white backgrounds. */
.admin-card .re-jumplinks {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.admin-card .re-jumplinks a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    box-sizing: border-box;
    padding: 0 12px;
    background: #fff;
    border: 2px solid;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.admin-card .re-jumplinks a:nth-child(odd) {
    border-color: var(--wfv-green-border);
    color: #23753d;
}

.admin-card .re-jumplinks a:nth-child(even) {
    border-color: var(--wfv-blue-border);
    color: var(--wfv-blue);
}

.admin-card .re-jumplinks a:hover {
    text-decoration: none;
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

/* ============================================= */
/* 6. Occupant detail page (occupantDetail.php)  */
/* ============================================= */

.od-wrap { display: flex; flex-direction: column; gap: 1.25rem; }
.od-card {
    background: var(--wfv-green-soft);
    border: 1px solid #ddd;
    border-left: 3px solid #2c6e9e;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.od-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.od-card-header strong { font-size: 15px; }
.od-card-header a, .od-card p a { font-size: 13px; }
.od-card p { font-size: 14px; margin: 0 0 6px; }
.od-card p:last-child { margin-bottom: 0; }
.od-card hr { border: none; border-top: 1px solid #eee; margin: 8px 0; }
.od-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.od-grid .od-card.od-span2 { grid-column: 1 / -1; }
.od-muted { color: #777; }

/* Prev/next arrows in detail-page headings */
/* Detail-page heading: title text + prev/next arrows on one centered line */
.od-heading {
    display: flex;
    align-items: center;
}
.od-page-nav {
    display: inline-flex;
    align-items: center;
    font-size: 1.3em;
    margin-left: 14px;
    white-space: nowrap;
}
.od-page-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    text-decoration: none;
    color: var(--wfv-blue);
    font-size: 0.82em;
    line-height: 1;
    transition: background 0.15s ease;
}
.od-page-arrow:hover {
    background: rgba(0, 0, 0, 0.08);
}
.od-page-arrow-disabled {
    opacity: 0.35;
}
.od-page-arrow-disabled:hover {
    background: none;
}

/* "In residence" status label */
.od-in-residence {
    color: var(--wfv-green);
    font-weight: bold;
}

/* "M-t-M" (expired-term / month-to-month) status label */
.od-mtm {
    color: #cc0000;
    font-weight: bold;
}

/* ============================================= */
/* 7. Concatenated email page (reportEmail.php)  */
/* ============================================= */

/* Jump-links bar at top of page */
.re-jumplinks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px 0;
    padding: 12px;
    background: var(--wfv-green-soft);
    border: 1px solid var(--wfv-green-border);
    border-radius: 6px;
}
.re-jumplinks a {
    text-decoration: none;
    color: var(--wfv-blue);
    background: #fff;
    border: 2px solid var(--wfv-green-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.re-jumplinks a:hover {
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

/* Section heading + Copy button rows */
.re-heading-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.re-copy-btn {
    font-family: inherit;
    font-size: 13px;
    color: var(--wfv-blue);
    background: #fff;
    border: 2px solid var(--wfv-green-border);
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.re-copy-btn:hover {
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

.re-copy-btn-done {
    color: var(--wfv-green);
    border-color: var(--wfv-green);
}

/* ============================================= */
/* 8. Search results page (search.php)           */
/* ============================================= */

/* Category headings (Occupants, Vehicles, Pets, Agents) */
.gs-heading {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 28px 0 10px;
}
.gs-heading-green { color: var(--wfv-green); }
.gs-heading-blue  { color: var(--wfv-blue); }

/* Result card grid */
.gs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

/* Result cards: whole card is a clickable link to the detail page */
.gs-card {
    display: block;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gs-card-green {
    background: var(--wfv-green-soft);
    border-left: 3px solid var(--wfv-green);
}

.gs-card-blue {
    background: var(--wfv-blue-soft);
    border-left: 3px solid var(--wfv-blue);
}

.gs-card:hover {
    filter: brightness(0.985);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

.gs-card:focus-visible {
    outline: 3px solid rgba(29, 79, 158, 0.28);
    outline-offset: 2px;
}

.gs-primary {
    font-weight: 600;
    font-size: 15px;
}

.gs-secondary {
    font-size: 14px;
    color: var(--wfv-gray);
    margin-top: 2px;
}