/* ============================================================
   Plum-Rite Plumbing Services — Design System v2 "Deep Water & Copper"
   Deep petrol blues + copper-pipe accent, Sora display + Inter body,
   warm paper background, pill buttons, soft layered shadows.
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand palette — deep water */
    --navy-900: #0c2733;
    --navy-800: #123a4a;
    --navy-700: #1a4d61;
    --navy-950: #081c26;

    /* Copper-pipe accent */
    --accent: #bf5b21;
    --accent-dark: #9c4a1c;
    --accent-light: #e0854e;
    --accent-soft: #f9ede2;

    /* Water accent */
    --aqua: #2f9db8;
    --aqua-soft: #e3f2f7;

    /* Neutrals — warm paper */
    --ink: #1d2a32;
    --muted: #5b6a74;
    --bg: #f5f2ec;
    --card: #ffffff;
    --line: #e7e1d5;

    /* Status */
    --success: #1e8e5a;
    --success-soft: #e6f5ee;
    --warning: #b7791f;
    --warning-soft: #fdf3e0;
    --danger: #c0392b;
    --danger-soft: #fdeaea;
    --info: #21618c;
    --info-soft: #e8f1f8;

    /* Effects */
    --radius: 16px;
    --radius-lg: 22px;
    --radius-sm: 11px;
    --shadow: 0 1px 2px rgba(18, 42, 51, 0.06), 0 6px 20px rgba(18, 42, 51, 0.07);
    --shadow-hover: 0 10px 34px rgba(18, 42, 51, 0.16);
    --transition: all 0.22s ease;

    --font-display: 'Sora', 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.68;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent-dark);
}

::selection {
    background: rgba(191, 91, 33, 0.22);
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

/* Icons */
.ic {
    width: 1.05em;
    height: 1.05em;
    flex: none;
    vertical-align: -0.15em;
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy-900);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 3000;
    border-radius: 0 0 10px 0;
}

.skip-link:focus {
    left: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Top utility bar
   ============================================================ */
.topbar {
    background: var(--navy-950);
    color: #b7cbd6;
    font-size: 0.84rem;
    position: relative;
}

.topbar::after {
    /* thin copper seam under the utility bar */
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 45%, var(--aqua) 100%);
    opacity: 0.9;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.75rem;
    min-height: 40px;
    flex-wrap: wrap;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: inherit;
}

.topbar-emergency {
    color: #ffce9c;
    font-weight: 600;
}

.topbar-phone {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.topbar-phone:hover {
    color: var(--accent-light);
}

/* ============================================================
   Header + navigation — frosted glass, sticky
   ============================================================ */
.site-header {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
    box-shadow: 0 6px 24px rgba(12, 39, 51, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 76px;
    flex-wrap: wrap;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--navy-900);
    margin-right: auto;
}

.brand-mark {
    display: inline-flex;
    width: 46px;
    height: 46px;
    flex: none;
    filter: drop-shadow(0 3px 8px rgba(12, 39, 51, 0.25));
    transition: var(--transition);
}

.brand:hover .brand-mark {
    transform: rotate(-6deg) scale(1.04);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    flex-direction: column;
}

.brand-sub {
    font-family: var(--font-body);
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--accent-dark);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.site-nav > a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.site-nav > a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.site-nav > a.active {
    color: #fff;
    background: var(--navy-900);
}

.site-nav > a.nav-portal {
    color: var(--navy-800);
    border: 1.5px solid var(--line);
    margin-left: 0.35rem;
    background: #fff;
}

.site-nav > a.nav-portal:hover {
    border-color: var(--navy-800);
    color: var(--navy-900);
    background: #fff;
}

.site-nav > a.nav-portal.active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.site-nav > a.btn-nav {
    margin-left: 0.35rem;
}

.nav-toggle {
    display: none;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    color: var(--navy-900);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
}

.beta-badge {
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-dark);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 99px;
    margin-left: 0.4rem;
}

/* ============================================================
   Buttons — pill silhouette, copper gradient
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #d3692b, #b34f1d);
    color: #fff;
    padding: 0.72rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    font-family: inherit;
    letter-spacing: 0.005em;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(191, 91, 33, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn:hover {
    background: linear-gradient(135deg, #c25c22, #9c4a1c);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(191, 91, 33, 0.38);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    box-shadow: 0 2px 8px rgba(12, 39, 51, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
    box-shadow: 0 8px 20px rgba(12, 39, 51, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--navy-800);
    border: 2px solid var(--navy-800);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
}

.btn-danger {
    background: linear-gradient(135deg, #cc4a3a, #b03427);
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.28);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b03427, #96291e);
}

.btn-sm {
    padding: 0.42rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.95rem 2rem;
    font-size: 1.07rem;
}

.btn-nav {
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #d3692b, #b34f1d);
    color: #fff;
    padding: 0.72rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.98rem;
    font-family: inherit;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(191, 91, 33, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #c25c22, #9c4a1c);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(191, 91, 33, 0.38);
}

/* ============================================================
   Hero (homepage) — split layout on deep water
   ============================================================ */
.hero {
    background:
        radial-gradient(760px 420px at 88% -8%, rgba(224, 133, 78, 0.24), transparent 62%),
        radial-gradient(600px 380px at -8% 108%, rgba(47, 157, 184, 0.18), transparent 60%),
        linear-gradient(152deg, var(--navy-950) 10%, var(--navy-900) 45%, var(--navy-800) 100%);
    color: #fff;
    padding: 4.5rem 0 6.5rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M35 0v22a14 14 0 0 0 14 14h42a14 14 0 0 1 14 14v90' fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='7'/%3E%3Ccircle cx='35' cy='118' r='5' fill='rgba(224,133,78,0.07)'/%3E%3C/svg%3E");
    background-size: 140px 140px;
    pointer-events: none;
}

.hero-split {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffd4ae;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.42rem 1rem;
    border-radius: 99px;
    margin-bottom: 1.4rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.55rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.15rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent-light);
    position: relative;
    white-space: nowrap;
}

.hero h1 em::after {
    /* hand-drawn copper underline */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.08em;
    height: 0.16em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 60 3, 118 7' fill='none' stroke='%23e0854e' stroke-width='4' stroke-linecap='round' opacity='0.75'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero-sub {
    font-size: clamp(1.02rem, 2vw, 1.18rem);
    color: #c3d4de;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2.4rem;
}

.hero-phone-note {
    font-size: 0.9rem;
    color: #93aab8;
}

.hero-badges {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #d5e2ea;
}

.hero-badge .ic {
    color: var(--accent-light);
    width: 1.25em;
    height: 1.25em;
}

/* Hero photo card */
.hero-media {
    position: relative;
    z-index: 1;
}

.hero-photo {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 60px rgba(4, 16, 22, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.05);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--navy-900);
    border-radius: 14px;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(4, 16, 22, 0.4);
    white-space: nowrap;
}

.float-chip .ic {
    width: 1.35em;
    height: 1.35em;
    color: var(--accent);
}

.float-chip small {
    display: block;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.2;
}

.float-chip-tl { top: -1.1rem; left: -1.4rem; }
.float-chip-br { bottom: -1.1rem; right: -0.9rem; }

/* Wave divider — sits at the bottom edge of dark bands */
.wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    color: var(--bg);
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.wave svg {
    display: block;
    width: 100%;
    height: 44px;
}

/* Inner page hero */
.page-hero {
    background:
        radial-gradient(620px 300px at 92% -20%, rgba(224, 133, 78, 0.2), transparent 60%),
        linear-gradient(150deg, var(--navy-950) 15%, var(--navy-900) 60%, var(--navy-800) 100%);
    color: #fff;
    padding: 3.2rem 0 4.2rem;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M35 0v22a14 14 0 0 0 14 14h42a14 14 0 0 1 14 14v90' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='7'/%3E%3C/svg%3E");
    background-size: 140px 140px;
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .kicker {
    color: var(--accent-light);
}

.page-hero .kicker::before {
    background: var(--accent-light);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: #c3d4de;
    font-size: 1.05rem;
    max-width: 720px;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: #fbf9f5;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin-bottom: 2.4rem;
}

.section-head.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.kicker::before {
    content: '';
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    flex: none;
}

.section-head.center .kicker::after {
    content: '';
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    flex: none;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--navy-900);
    margin-bottom: 0.6rem;
}

.section-head p {
    color: var(--muted);
    font-size: 1.05rem;
}

.page-pad {
    padding-top: 2.6rem;
    padding-bottom: 3.6rem;
}

.content-prose h2 {
    font-family: var(--font-display);
    color: var(--navy-900);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    margin: 2rem 0 1rem;
}

.content-prose h3 {
    font-family: var(--font-display);
    color: var(--navy-800);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.75rem 0 0.75rem;
}

.content-prose p {
    margin-bottom: 1rem;
}

.content-prose ul {
    margin: 0 0 1.25rem 1.4rem;
}

.content-prose li {
    margin-bottom: 0.5rem;
}

/* ============================================================
   Cards
   ============================================================ */
.grid {
    display: grid;
    gap: 1.4rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #ddcfb9;
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-soft), #fde3cd);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    box-shadow: inset 0 0 0 1px rgba(191, 91, 33, 0.15);
}

.card-icon .ic {
    width: 26px;
    height: 26px;
}

.card h3 {
    font-family: var(--font-display);
    color: var(--navy-900);
    font-size: 1.13rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    letter-spacing: -0.015em;
}

.card p {
    color: var(--muted);
    font-size: 0.97rem;
}

.card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}

.card .card-link:hover {
    text-decoration: underline;
}

/* Stat / trust strip — one floating band with dividers */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 44px rgba(12, 39, 51, 0.12);
    margin-top: -3.4rem;
    position: relative;
    z-index: 3;
    overflow: hidden;
}

.trust-item {
    padding: 1.3rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-left: 1px solid var(--line);
}

.trust-item:first-child {
    border-left: none;
}

.trust-item .ic {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.trust-item strong {
    display: block;
    font-family: var(--font-display);
    color: var(--navy-900);
    font-size: 0.99rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

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

/* ============================================================
   Testimonials
   ============================================================ */
.testimonial {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.8rem 1.75rem;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.testimonial::before {
    content: '\201C';
    position: absolute;
    top: 0.4rem;
    right: 1.2rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4.2rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.18;
    pointer-events: none;
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.testimonial-stars {
    color: #eda23a;
    display: inline-flex;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
}

.testimonial-stars .ic {
    width: 1.02rem;
    height: 1.02rem;
    fill: currentColor;
    stroke: currentColor;
}

.testimonial p {
    font-size: 1rem;
    color: var(--ink);
}

.testimonial cite {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
    font-style: normal;
    font-weight: 700;
    color: var(--navy-800);
    font-size: 0.95rem;
}

.testimonial cite::before {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    flex: none;
}

/* ============================================================
   Team
   ============================================================ */
.team-member {
    text-align: center;
}

.team-member img {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid #fff;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    display: block;
    box-shadow: 0 10px 26px rgba(12, 39, 51, 0.18);
}

.team-member .role {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* ============================================================
   Tables
   ============================================================ */
.responsive-table {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table th {
    background: var(--navy-900);
    color: #e8eef2;
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background-color: #faf8f3;
}

table tr.highlight {
    background-color: var(--warning-soft);
    font-weight: 600;
}

table tr.highlight:hover {
    background-color: #fbeccb;
}

/* ============================================================
   Forms
   ============================================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.25rem;
}

.form-grid .form-full {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--navy-900);
    font-size: 0.93rem;
}

.form-group .req {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fdfcfa;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(191, 91, 33, 0.13);
}

.form-group input:disabled {
    background: var(--bg);
    color: var(--muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* Honeypot field — hidden from humans, tempting to bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================================
   Alerts + badges
   ============================================================ */
.alert {
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.97rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-left-width: 4px;
}

.alert-success { background: var(--success-soft); color: #14603d; border-color: #bfe5d2; border-left-color: var(--success); }
.alert-error   { background: var(--danger-soft);  color: #8e2a1f; border-color: #f3c1bb; border-left-color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: #7c5312; border-color: #eed9ac; border-left-color: var(--warning); }
.alert-info    { background: var(--info-soft);    color: #1b4e70; border-color: #c3d9e8; border-left-color: var(--info); }

.badge {
    display: inline-block;
    padding: 0.24rem 0.7rem;
    border-radius: 99px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-pending   { background: var(--warning-soft); color: #7c5312; box-shadow: inset 0 0 0 1px #eed9ac; }
.badge-confirmed { background: var(--success-soft); color: #14603d; box-shadow: inset 0 0 0 1px #bfe5d2; }
.badge-completed { background: var(--info-soft);    color: #1b4e70; box-shadow: inset 0 0 0 1px #c3d9e8; }
.badge-cancelled { background: #efedea;             color: #6a6a6a; box-shadow: inset 0 0 0 1px #dedbd4; }
.badge-beta      { background: var(--accent-soft);  color: var(--accent-dark); box-shadow: inset 0 0 0 1px #f0d4bc; }

/* Beta feature banner */
.beta-banner {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #fdf6ef, var(--accent-soft));
    border: 1px solid #efd2b8;
    border-radius: var(--radius);
    padding: 1.05rem 1.3rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

.beta-banner .ic {
    color: var(--accent-dark);
    width: 22px;
    height: 22px;
    margin-top: 0.1rem;
}

/* ============================================================
   Modal
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    overflow: auto;
    background-color: rgba(8, 28, 38, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.25s;
    padding: 1rem;
}

.modal.open {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 4vh auto;
    padding: 2.2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(8, 28, 38, 0.45);
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideDown 0.25s;
}

.modal-content h2,
.modal-content h3 {
    font-family: var(--font-display);
    color: var(--navy-900);
    margin-bottom: 1rem;
    padding-right: 2.5rem;
    letter-spacing: -0.015em;
}

@keyframes slideDown {
    from { transform: translateY(-24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    color: var(--muted);
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    background: var(--bg);
    border: none;
    padding: 0.35rem 0.55rem;
    border-radius: 99px;
    transition: var(--transition);
}

.close:hover,
.close:focus {
    color: #fff;
    background: var(--accent);
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 0.9rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item[open] {
    border-color: #e9c9a8;
    box-shadow: var(--shadow-hover);
}

.faq-item summary {
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    font-weight: 700;
    color: var(--navy-900);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    background: var(--navy-900);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: var(--transition);
    line-height: 1;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    background: var(--accent);
}

.faq-item .faq-body {
    padding: 0 1.4rem 1.2rem;
    color: var(--muted);
}

/* ============================================================
   CTA band — copper glow panel
   ============================================================ */
.cta-band {
    background:
        radial-gradient(640px 320px at 12% 130%, rgba(224, 133, 78, 0.35), transparent 62%),
        radial-gradient(520px 300px at 95% -30%, rgba(47, 157, 184, 0.25), transparent 60%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3.2rem 2.5rem;
    text-align: center;
    margin: 3rem 0 0;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M35 0v22a14 14 0 0 0 14 14h42a14 14 0 0 1 14 14v90' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='7'/%3E%3C/svg%3E");
    background-size: 140px 140px;
    pointer-events: none;
}

.cta-band > * {
    position: relative;
    z-index: 1;
}

.cta-band h2 {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.cta-band p {
    color: #c3d4de;
    max-width: 640px;
    margin: 0 auto 1.75rem;
}

.cta-band .hero-actions {
    justify-content: center;
    margin-bottom: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background:
        radial-gradient(700px 300px at 90% -10%, rgba(224, 133, 78, 0.08), transparent 60%),
        var(--navy-950);
    color: #a7bcc8;
    margin-top: auto;
    padding: 3.2rem 0 0;
    font-size: 0.95rem;
    border-top: 3px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.9rem;
    letter-spacing: -0.02em;
}

.footer-brand .brand-mark {
    width: 38px;
    height: 38px;
    filter: none;
}

.footer-about p {
    margin-bottom: 0.75rem;
}

.footer-license {
    display: inline-block;
    font-size: 0.8rem;
    color: #ffce9c;
    background: rgba(224, 133, 78, 0.12);
    border: 1px solid rgba(224, 133, 78, 0.3);
    border-radius: 99px;
    padding: 0.25rem 0.8rem;
}

.footer-col h3 {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col h3::before {
    content: '';
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    flex: none;
}

.footer-col p {
    margin-bottom: 0.55rem;
}

.footer-col a {
    color: #a7bcc8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: #7e97a5;
}

/* ============================================================
   Floating call button (mobile)
   ============================================================ */
.floating-call {
    display: none;
    position: fixed;
    bottom: 1.1rem;
    right: 1.1rem;
    z-index: 1500;
    background: linear-gradient(135deg, #d3692b, #b34f1d);
    color: #fff;
    border-radius: 99px;
    padding: 0.9rem 1.35rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(191, 91, 33, 0.5);
    align-items: center;
    gap: 0.5rem;
}

.floating-call::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 99px;
    border: 2px solid rgba(224, 133, 78, 0.55);
    animation: callPulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes callPulse {
    0%   { transform: scale(0.92); opacity: 0.9; }
    70%  { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}

.floating-call .ic {
    width: 1.2em;
    height: 1.2em;
}

/* ============================================================
   Portal / auth
   ============================================================ */
.auth-wrap {
    max-width: 470px;
    margin: 1.5rem auto 0;
}

.auth-wrap .card {
    padding: 2.4rem;
    border-radius: var(--radius-lg);
}

.auth-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-head .card-icon {
    margin: 0 auto 1rem;
}

.auth-head h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
}

.auth-head p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.4rem;
    font-size: 0.93rem;
    color: var(--muted);
}

.auth-links a {
    color: var(--accent-dark);
    font-weight: 600;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.page-title h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
}

.page-title .sub {
    color: var(--muted);
    margin-top: 0.25rem;
    font-size: 0.98rem;
}

/* Booking list rows */
.booking-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.booking-row:last-child {
    border-bottom: none;
}

.booking-row .when {
    font-weight: 700;
    color: var(--navy-900);
}

.booking-row .meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.booking-row .actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Slot picker */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.slot-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.slot-option label {
    display: block;
    text-align: center;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    padding: 0.6rem 0.4rem;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--navy-800);
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
    margin-bottom: 0;
}

.slot-option label:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.slot-option input:checked + label {
    background: linear-gradient(135deg, #d3692b, #b34f1d);
    border-color: var(--accent-dark);
    color: #fff;
    box-shadow: 0 3px 10px rgba(191, 91, 33, 0.35);
}

.slot-option input:focus-visible + label {
    outline: 3px solid var(--accent-light);
    outline-offset: 2px;
}

.slot-option input:disabled + label {
    background: var(--bg);
    color: #adb6bc;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: var(--line);
}

/* Admin stat tiles */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.35rem;
    position: relative;
    overflow: hidden;
}

.stat-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.stat-tile .num {
    font-family: var(--font-display);
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.stat-tile .lbl {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.inline-form {
    display: inline;
}

/* ============================================================
   Admin inbox (webmail)
   ============================================================ */
.mail-toolbar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.mail-toolbar .spacer {
    margin-left: auto;
}

.mail-toolbar select {
    padding: 0.5rem 0.85rem;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy-800);
    background: #fff;
    cursor: pointer;
}

.inbox-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    box-shadow: inset 0 0 0 1px #f0d4bc;
}

.mail-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--navy-900);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
}

.mail-account-chip .ic {
    color: var(--accent-light);
}

.mail-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mail-row {
    display: grid;
    grid-template-columns: 230px 1fr 130px;
    gap: 0.5rem 1.1rem;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.15s ease;
    position: relative;
}

.mail-row:last-child {
    border-bottom: none;
}

.mail-row:hover {
    background: #faf7f1;
}

.mail-row .mail-from {
    font-weight: 600;
    color: var(--navy-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.mail-row .mail-subject {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    font-size: 0.95rem;
}

.mail-row .mail-date {
    color: var(--muted);
    font-size: 0.83rem;
    text-align: right;
    white-space: nowrap;
}

.mail-row .dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: transparent;
    flex: none;
}

.mail-row.unread .dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(191, 91, 33, 0.18);
}

.mail-row.unread .mail-from {
    font-weight: 800;
    color: var(--navy-900);
}

.mail-row.unread .mail-subject {
    color: var(--ink);
    font-weight: 600;
}

.mail-row.unread .mail-date {
    color: var(--accent-dark);
    font-weight: 700;
}

.mail-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}

.pager .pager-info {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Message view */
.mail-head-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

.mail-head-card h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    margin-bottom: 0.9rem;
    overflow-wrap: anywhere;
}

.mail-meta {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 0.3rem 0.9rem;
    font-size: 0.92rem;
}

.mail-meta dt {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 0.12rem;
}

.mail-meta dd {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.mail-body-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mail-body-text {
    padding: 1.6rem 1.75rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.97rem;
    line-height: 1.7;
}

.mail-body-frame {
    display: block;
    width: 100%;
    height: 62vh;
    min-height: 380px;
    border: none;
    background: #fff;
}

.mail-attachments {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 1rem 1.75rem;
    border-top: 1px dashed var(--line);
    background: #fbf9f5;
}

.att-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    padding: 0.4rem 0.95rem;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--navy-800);
    text-decoration: none;
    transition: var(--transition);
}

.att-chip:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.att-chip .size {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.8rem;
}

.mail-note {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0.6rem 1.75rem;
    border-top: 1px solid var(--line);
    background: #fbf9f5;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.notice-strip {
    background: var(--warning-soft);
    border: 1px solid #eed9ac;
    border-left: 4px solid var(--warning);
    color: #7c5312;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Scroll-reveal (class added by JS only; no-JS visitors see everything) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media screen and (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .trust-strip { grid-template-columns: repeat(2, 1fr); }
    .trust-item:nth-child(odd) { border-left: none; }
    .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
    .stat-tiles { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .slot-grid { grid-template-columns: repeat(3, 1fr); }

    .hero-split { grid-template-columns: 1fr; gap: 3.4rem; }
    .hero-media { max-width: 560px; }
    .float-chip-tl { left: 0.5rem; }
    .float-chip-br { right: 0.5rem; }
}

@media screen and (max-width: 820px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0.6rem 0 0.6rem;
        gap: 0.25rem;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav > a {
        padding: 0.8rem 1rem;
        border-radius: 12px;
    }

    .site-nav > a.nav-portal,
    .site-nav > a.btn-nav {
        margin-left: 0;
        margin-top: 0.3rem;
        justify-content: center;
    }

    .topbar-inner {
        justify-content: center;
        gap: 1rem;
    }

    .mail-row {
        grid-template-columns: 1fr auto;
    }

    .mail-row .mail-subject {
        grid-column: 1 / -1;
        white-space: normal;
    }
}

@media screen and (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .trust-strip { grid-template-columns: 1fr 1fr; margin-top: -2rem; }
    .stat-tiles { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .slot-grid { grid-template-columns: repeat(2, 1fr); }

    .hero { padding: 3.2rem 0 4.5rem; }
    .section { padding: 2.75rem 0; }
    .cta-band { padding: 2.4rem 1.5rem; }
    .auth-wrap .card { padding: 1.7rem; }
    .page-hero { padding: 2.4rem 0 3.4rem; }

    .float-chip { font-size: 0.8rem; padding: 0.5rem 0.8rem; }

    .floating-call {
        display: inline-flex;
    }

    .site-footer {
        padding-bottom: 4.5rem; /* clear the floating call button */
    }

    .brand-text { font-size: 1.12rem; }

    .mail-meta { grid-template-columns: 1fr; gap: 0 0; }
    .mail-meta dt { margin-top: 0.4rem; }
    .mail-body-text { padding: 1.2rem 1.1rem; }
    .mail-attachments { padding: 1rem 1.1rem; }

    /* Stacked data tables on small screens */
    .stack-table table,
    .stack-table thead,
    .stack-table tbody,
    .stack-table th,
    .stack-table td,
    .stack-table tr {
        display: block;
    }

    .stack-table thead {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .stack-table tr {
        border-bottom: 1px solid var(--line);
        padding: 0.75rem 0;
    }

    .stack-table td {
        border: none;
        position: relative;
        padding: 0.3rem 0.9rem 0.3rem 46%;
        text-align: left;
        min-height: 1.4rem;
    }

    .stack-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.9rem;
        width: 42%;
        padding-right: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 700;
        color: var(--navy-900);
        font-size: 0.82rem;
    }
}

/* ============================================================
   Motion + print
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

@media print {
    .topbar, .site-header, .site-footer, .floating-call, .nav-toggle {
        display: none !important;
    }
    body {
        background: #fff;
    }
}

/* ============================================================
   Panel components — portal & admin sub-navigation, dispatch
   board, filters, pagination, detail views, activity feed
   ============================================================ */
.sub-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    padding: 0.4rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sub-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.sub-nav-link:hover {
    color: var(--navy-900);
    background: var(--bg);
}

.sub-nav-link.active {
    background: var(--navy-900);
    color: #fff;
}

.sub-nav-end {
    margin-left: auto;
    display: inline-flex;
}

.sub-nav-logout {
    color: var(--danger);
}

.sub-nav-logout:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

/* Dispatch board (admin weekly schedule) */
.board-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.board {
    display: grid;
    min-width: 760px;
    border-collapse: collapse;
}

.board-cell {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.45rem;
    min-height: 52px;
}

.board-cell:last-child {
    border-right: none;
}

.board-head {
    background: var(--navy-900);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.7rem 0.6rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.board-head small {
    display: block;
    font-weight: 500;
    opacity: 0.75;
    letter-spacing: 0;
    text-transform: none;
}

.board-head.today {
    background: var(--accent);
}

.board-slot {
    background: var(--bg);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.board-chip {
    display: block;
    border-radius: 9px;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.35;
    text-decoration: none;
    margin-bottom: 0.3rem;
}

.board-chip strong {
    display: block;
    font-size: 0.8rem;
}

.board-chip.chip-confirmed { background: var(--success-soft); color: #14603d; box-shadow: inset 0 0 0 1px #bfe5d2; }
.board-chip.chip-pending   { background: var(--warning-soft); color: #7c5312; box-shadow: inset 0 0 0 1px #eed9ac; }

.board-cell.is-past {
    background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(0, 0, 0, 0.025) 8px 16px);
}

/* Filter bar */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-bar .form-group {
    margin-bottom: 0;
    min-width: 150px;
    flex: 1;
}

.filter-bar .form-group.grow-2 {
    flex: 2;
}

.filter-bar .btn {
    flex: none;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.75rem 0 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--navy-800);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.pagination .current {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.pagination .disabled {
    opacity: 0.45;
}

/* Detail views (customer profile in admin) */
.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detail-list li {
    display: flex;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
    align-items: baseline;
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-list .k {
    flex: none;
    width: 84px;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Activity feed */
.activity-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.93rem;
    align-items: flex-start;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .ic {
    color: var(--accent);
    margin-top: 0.2rem;
}

.activity-item .who {
    font-weight: 700;
    color: var(--navy-900);
}

.activity-item .when {
    color: var(--muted);
    font-size: 0.8rem;
    margin-left: auto;
    flex: none;
    white-space: nowrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.25rem 1rem;
    color: var(--muted);
}

.empty-state .ic {
    width: 34px;
    height: 34px;
    color: var(--line);
    margin-bottom: 0.6rem;
}

/* Next-appointment hero card (customer dashboard) */
.next-appt {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

.next-appt .date-block {
    flex: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    min-width: 92px;
}

.next-appt .date-block .mon {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
}

.next-appt .date-block .day {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
}

.next-appt h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.next-appt p {
    color: #c3d3dd;
    font-size: 0.93rem;
}

.next-appt .actions {
    margin-left: auto;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Quick-action tiles (customer dashboard) */
.quick-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-tile {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.15rem 1.25rem;
    text-decoration: none;
    transition: var(--transition);
}

.quick-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

.quick-tile .ic {
    width: 24px;
    height: 24px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.quick-tile strong {
    display: block;
    color: var(--navy-900);
    font-size: 0.95rem;
}

.quick-tile span {
    color: var(--muted);
    font-size: 0.83rem;
}

.quick-tile.tile-danger .ic { color: var(--danger); }

/* Inbox (staff mailbox viewer) */
.mail-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.mail-toolbar .spacer {
    margin-left: auto;
}

.mail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mail-row {
    display: flex;
    gap: 0.9rem;
    align-items: baseline;
    padding: 0.75rem 0.4rem;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    flex-wrap: wrap;
    transition: var(--transition);
}

.mail-row:hover {
    background: var(--bg);
}

.mail-row.unseen .mail-from,
.mail-row.unseen .mail-subject {
    font-weight: 700;
    color: var(--navy-900);
}

.mail-from {
    flex: none;
    width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.mail-subject {
    flex: 1;
    min-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    color: var(--muted);
}

.mail-date {
    flex: none;
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.mail-body {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.4rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.7;
    max-height: 65vh;
    overflow-y: auto;
}

@media screen and (max-width: 820px) {
    .detail-grid { grid-template-columns: 1fr; }
    .quick-tiles { grid-template-columns: repeat(2, 1fr); }
    .next-appt .actions { margin-left: 0; }
}

@media screen and (max-width: 640px) {
    .quick-tiles { grid-template-columns: 1fr 1fr; }
    .mail-from { width: 100%; }
    .mail-date { order: -1; margin-left: auto; }
}

/* ============================================================
   Mail search, unread nav badges, new-mail toasts
   ============================================================ */
.mail-search input[type="search"] {
    padding: 0.45rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: var(--ink);
    min-width: 170px;
    transition: var(--transition);
}

.mail-search input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(191, 91, 33, 0.13);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    margin-left: 0.4rem;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.toast-stack {
    position: fixed;
    bottom: 1.1rem;
    left: 1.1rem;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(360px, calc(100vw - 2.2rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--navy-900);
    color: #e6eef3;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: 0 14px 40px rgba(4, 16, 22, 0.45);
    text-decoration: none;
    animation: toastIn 0.3s ease;
}

.toast:hover {
    background: var(--navy-800);
}

.toast.out {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-icon {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(224, 133, 78, 0.18);
    color: var(--accent-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
}

.toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.toast-body strong {
    color: #fff;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-body span {
    font-size: 0.85rem;
    color: #b7cbd6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-close {
    flex: none;
    margin-left: auto;
    background: none;
    border: none;
    color: #8fa8b5;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.1rem;
}

.toast-close:hover {
    color: #fff;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; }
}

@media screen and (max-width: 640px) {
    .toast-stack { left: 0.75rem; bottom: 4.6rem; } /* clear the floating call button */
    .mail-search input[type="search"] { min-width: 120px; }
}

/* ==========================================================================
   Customer profile header (admin customer detail)
   ========================================================================== */
.profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.avatar {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 2px rgba(224, 133, 78, 0.55);
}

.detail-hint {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    font-style: italic;
}

.contact-edit {
    margin-top: 0.9rem;
    border-top: 1px dashed var(--line);
    padding-top: 0.75rem;
}

.contact-edit summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-dark);
    list-style: none;
    user-select: none;
}

.contact-edit summary::-webkit-details-marker { display: none; }

.contact-edit summary .ic { width: 15px; height: 15px; }

.contact-edit summary:hover { color: var(--accent); }

.stat-tile-warn .num { color: var(--accent-dark); }

/* ==========================================================================
   Invoices — status badges, line-item editor, printable document
   ========================================================================== */
.badge-inv-draft { background: #efedea;             color: #6a6a6a;  box-shadow: inset 0 0 0 1px #dedbd4; }
.badge-inv-sent  { background: var(--warning-soft); color: #7c5312;  box-shadow: inset 0 0 0 1px #eed9ac; }
.badge-inv-paid  { background: var(--success-soft); color: #14603d;  box-shadow: inset 0 0 0 1px #bfe5d2; }
.badge-inv-void  { background: #efedea;             color: #6a6a6a;  box-shadow: inset 0 0 0 1px #dedbd4; }
.badge-overdue   { background: var(--danger-soft);  color: #8e2a1f;  box-shadow: inset 0 0 0 1px #f3c1bb; }

/* Line-item editor (admin/invoice.php) */
.items-table th.n,
.items-table td.n {
    text-align: right;
    white-space: nowrap;
}

.item-add {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
}

.item-add .form-group { margin-bottom: 0; }

.item-add .form-group.grow-2 { flex: 2 1 240px; }

.item-add .form-group.qty { flex: 0 1 90px; }

.item-add .form-group.price { flex: 0 1 140px; }

.item-add .btn { flex: none; }

.invoice-totals {
    margin-left: auto;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 2px solid var(--line);
}

.invoice-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.invoice-totals .grand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--navy-900);
    border-top: 1px dashed var(--line);
    padding-top: 0.45rem;
    margin-top: 0.25rem;
}

/* The printable document (shared by admin preview + customer portal) */
.invoice-doc {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.25rem 2.5rem;
    max-width: 860px;
    margin: 0 auto;
    overflow: hidden;
}

.inv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.1rem;
    border-bottom: 3px solid var(--accent);
}

.inv-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.inv-brand .brand-mark svg {
    width: 46px;
    height: 46px;
    display: block;
}

.inv-brand-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--navy-900);
    line-height: 1.15;
}

.inv-brand-text span {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.inv-title { text-align: right; }

.inv-title span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    font-weight: 700;
}

.inv-title strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--navy-900);
}

.inv-company {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0.6rem 0 1.5rem;
}

.inv-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.inv-block h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-dark);
    margin-bottom: 0.35rem;
}

.inv-block p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ink);
    margin: 0;
}

.inv-dim { color: var(--muted); }

.inv-dates .k {
    display: inline-block;
    min-width: 54px;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}

.inv-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 2px solid var(--navy-900);
    padding: 0.5rem 0.6rem 0.45rem;
}

.inv-table td {
    padding: 0.6rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    vertical-align: top;
}

.inv-table th.n,
.inv-table td.n {
    text-align: right;
    white-space: nowrap;
}

.inv-totals {
    margin-left: auto;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.9rem;
}

.inv-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.inv-grand {
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--navy-900);
    border-top: 2px solid var(--navy-900);
    padding-top: 0.45rem;
    margin-top: 0.25rem;
}

.inv-due {
    background: var(--accent-soft);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-weight: 800;
    color: var(--accent-dark);
    margin-top: 0.4rem;
}

.inv-due-paid {
    background: var(--success-soft);
    color: #14603d;
}

.inv-notes,
.inv-foot {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--line);
}

.inv-notes h3,
.inv-foot h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-dark);
    margin-bottom: 0.35rem;
}

.inv-notes p,
.inv-foot p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink);
    margin: 0;
}

.inv-thanks {
    margin-top: 0.6rem !important;
    font-weight: 700;
    color: var(--navy-900);
}

/* Diagonal PAID / VOID watermark */
.inv-stamp {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-14deg);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 9vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 0.1em 0.5em 0.1em 0.72em; /* extra left balances letter-spacing */
    border: 6px solid currentColor;
    border-radius: 14px;
    pointer-events: none;
    z-index: 1;
}

.inv-stamp-paid { color: var(--success); opacity: 0.13; }

.inv-stamp-void { color: #6a6a6a; opacity: 0.11; }

@media screen and (max-width: 640px) {
    .invoice-doc { padding: 1.4rem 1.2rem; }
    .inv-title { text-align: left; }
    .item-add .form-group.qty,
    .item-add .form-group.price { flex: 1 1 40%; }
}

/* Printing an invoice keeps just the document — no site chrome. These rules
   also tidy up printouts of every other page as a side effect. */
@media print {
    .topbar, .site-header, .sub-nav, .site-footer, .floating-call,
    .page-title, .filter-bar, .stat-tiles, .alert, .toast-stack,
    .pagination, .no-print {
        display: none !important;
    }

    /* Invoice pages: the editor grid disappears, the customer copy stays. */
    body:has(.invoice-doc) .detail-grid { display: none !important; }

    body { background: #fff; }

    .page-pad { padding: 0; }

    .preview-card,
    .invoice-doc {
        border: none !important;
        box-shadow: none !important;
        padding: 0;
        max-width: none;
    }

    .preview-card { margin: 0; }

    .inv-stamp { position: absolute; } /* keep the watermark on paper too */
}
