﻿/* ============================================================
   Mwatate e-DCS  -  Taita Taveta County
   UI modelled on Mombasa e-DAMS
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    font-family: 'Times New Roman', Times, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 16px;
}

h1,h2,h3,h4,h5,h6 {
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    color: #111111;
}
:root {
    --forest:   #1a5c2e;
    --forest2:  #1f7038;
    --forest3:  #145224;
    --accent:   #c0392b;
    --accent2:  #e74c3c;
    --gold:     #b8860b;
    --gold-lt:  #fef9e7;
    --green:    #27ae60;
    --blue:     #1565c0;
    --navy:     #134293;
    --bg:       #f4f5f7;
    --white:    #ffffff;
    --border:   #d0d7e2;
    --text:     #111111;
    --muted:    #4a5568;
    --shadow:   0 2px 12px rgba(0,0,0,.09);
    --shadow-md: 0 4px 24px rgba(0,0,0,.13);
}

/* ============================================================
   TOPBAR ANNOUNCEMENT
   ============================================================ */
/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.site-header {
    background: var(--forest);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    border-bottom: 2px solid var(--gold);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 16px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}
.site-logo .logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}
.site-logo .logo-text {
    font-size: .8rem;
    line-height: 1.3;
    opacity: .9;
}
.site-logo .logo-text strong {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    opacity: 1;
}

/* Nav links */
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: 4px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
    background: rgba(255,255,255,.13);
    color: #fff;
}
.main-nav .nav-btn {
    background: var(--accent);
    color: #fff !important;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 4px;
    margin-left: 6px;
}
.main-nav .nav-btn:hover { background: var(--accent2); }
.main-nav .nav-btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    color: #fff !important;
    margin-left: 4px;
}
.main-nav .nav-btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.nav-user-chip {
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0 6px;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: .3s;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; }
main.container { flex: 1; padding-top: 0; padding-bottom: 40px; }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    background:
        linear-gradient(160deg, rgba(13,61,26,.82) 0%, rgba(10,40,18,.72) 50%, rgba(0,0,0,.65) 100%),
        url('../images/mwatatemap.png') center center / cover no-repeat;
    color: #fff;
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--gold);
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    pointer-events: none;
}
.hero-center {
    position: relative;
    z-index: 1;
    max-width: 680px;
    padding: 60px 24px;
}
.hero-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: 20px;
}
.hero-tag-line {
    display: inline-block;
    width: 30px;
    height: 1px;
    background: rgba(255,255,255,.35);
    border-radius: 2px;
}
.hero-center h1 {
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 16px;
    letter-spacing: .01em;
    color: #ffffff;
}
.hero-sub {
    font-size: .98rem;
    opacity: .72;
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero-primary {
    background: var(--gold);
    color: #fff;
    border: 2px solid var(--gold);
    font-size: .95rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .18s, transform .12s, box-shadow .18s;
}
.btn-hero-primary:hover { background: #a87200; border-color: #a87200; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.22); }
.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.55);
    font-size: .95rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .18s, border-color .18s, transform .12s, box-shadow .18s;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.14); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 24px;
    border-radius: 6px;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .18s;
    line-height: 1.4;
    letter-spacing: .01em;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn-primary   { background: var(--accent);  color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-secondary { background: var(--navy);  color: #fff; border-color: var(--navy); }
.btn-secondary:hover { background: #002060; border-color: #002060; }
.btn-gold      { background: var(--gold);    color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #a87200; border-color: #a87200; }
.btn-outline   { background: transparent;    color: #fff; border-color: rgba(255,255,255,.65); }
.btn-outline:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: #fff; }
.btn-green     { background: #00796b;   color: #fff; border-color: #00796b; }
.btn-green:hover { background: #00574b; }
.btn-danger    { background: var(--accent);  color: #fff; border-color: var(--accent); }
.btn-danger:hover { background: var(--accent2); }
.btn-sm        { padding: 6px 14px; font-size: .82rem; }

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
    background: #fff;
    border-top: 1px solid var(--border);
}
.services-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 1300px;
    margin: 0 auto;
}
.services-left {
    background: var(--navy);
    color: #fff;
    padding: 52px 32px;
    display: flex;
    flex-direction: column;
}
.svc-eyebrow {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}
.services-left h2 {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 18px;
    letter-spacing: .01em;
    color: #ffffff;
}
.svc-desc {
    font-size: .87rem;
    opacity: .78;
    line-height: 1.8;
    margin-bottom: 32px;
}
.svc-steps { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.svc-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .84rem;
    opacity: .88;
    line-height: 1.5;
}
.svc-step-n {
    background: var(--gold);
    color: #fff;
    font-weight: 800;
    font-size: .72rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.services-right {
    border-left: 1px solid var(--border);
    padding: 32px;
    background: var(--bg);
}
.svc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.svc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .18s, box-shadow .18s;
}
.svc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.svc-card-icon {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: rgba(255,255,255,.7);
}
.svc-card-body {
    padding: 18px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.svc-card-body h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 7px;
    line-height: 1.3;
}
.svc-card-body p {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
}
.svc-card-body .btn { align-self: flex-start; }

/* ============================================================
   SUPPORT BAND
   ============================================================ */
.support-band {
    background: var(--navy);
    color: #fff;
    padding: 36px 20px;
    text-align: center;
    border-top: 3px solid var(--gold);
}
.support-band h3 {
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--gold);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.support-band .phone { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; }
.support-band .email { display: block; color: rgba(255,255,255,.78); margin-top: 8px; font-size: .95rem; text-decoration: none; }
.support-band .email:hover, .support-band .phone:hover { color: var(--gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--forest3);
    color: rgba(255,255,255,.7);
    padding: 30px 20px;
    margin-top: auto;
    border-top: 3px solid var(--gold);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .84rem;
}
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ============================================================
   AUTH / SIGN-IN PAGES
   ============================================================ */
.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #002060 0%, var(--navy) 60%, #1a5276 100%);
    padding: 40px 20px;
    position: relative;
}
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.auth-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 48px rgba(0,0,0,.30);
    padding: 42px 38px;
    width: 100%;
    max-width: 450px;
    position: relative;
    border-top: 4px solid var(--gold);
}
.auth-box .auth-logo { text-align: center; margin-bottom: 28px; }
.auth-box .auth-logo .logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 12px;
}
.auth-box .auth-logo p { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.auth-box h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.auth-box .auth-sub { font-size: .88rem; color: var(--muted); margin-bottom: 24px; }
.auth-box .btn { width: 100%; justify-content: center; margin-top: 18px; }
.auth-links {
    margin-top: 18px;
    font-size: .85rem;
    color: var(--muted);
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.auth-links a { color: var(--navy); font-weight: 700; text-decoration: none; }
.auth-links a:hover { color: var(--accent); text-decoration: underline; }

/* ============================================================
   FORMS
   ============================================================ */
label {
    display: block;
    margin: 14px 0 5px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--navy);
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="file"], select, textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: .92rem;
    font-family: 'Times New Roman', Times, serif;
    color: var(--text);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0,53,128,.15);
}
input[type="file"] { padding: 7px 10px; }
textarea { resize: vertical; min-height: 90px; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='%231a3552'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 34px;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert, .alert-warning {
    background: var(--gold-lt);
    border-left: 4px solid var(--gold);
    padding: 12px 16px;
    border-radius: 7px;
    color: #5d3b00;
    font-size: .9rem;
}
.alert-success, .ok {
    background: #e8f5e9;
    border-left: 4px solid #43a047;
    padding: 12px 16px;
    border-radius: 7px;
    color: #1b5e20;
    font-size: .9rem;
}
.alert-danger {
    background: #ffebee;
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    border-radius: 7px;
    color: #7b0000;
    font-size: .9rem;
}
.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 12px 16px;
    border-radius: 7px;
    color: #0d47a1;
    font-size: .9rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 26px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.card + .card { margin-top: 22px; }

/* ============================================================
   PAGE HEADER BAR
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, #002060 0%, var(--navy) 100%);
    color: #fff;
    padding: 20px 26px;
    border-radius: 10px;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
}
.page-header h2 { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.page-header p  { color: rgba(255,255,255,.75); }
.page-header .page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-header .btn,
.page-header .btn-outline-dark {
    color: #fff !important;
    border-color: rgba(255,255,255,.65) !important;
    background: transparent !important;
}
.page-header .btn:hover,
.page-header .btn-outline-dark:hover {
    background: rgba(255,255,255,.18) !important;
    border-color: #fff !important;
    color: #fff !important;
}
.page-header .btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}
.page-header .btn-primary:hover {
    background: var(--accent2) !important;
    border-color: var(--accent2) !important;
}

/* ============================================================
   STAT TILES
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--navy);
    transition: transform .18s, box-shadow .18s;
}
.stat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-tile .stat-num  { font-size: 2.4rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.stat-tile .stat-lbl  { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; line-height: 1.4; }
.stat-tile .stat-icon { font-size: 1.6rem; margin-bottom: 10px; opacity: .75; }
.stat-tile.red   { border-top-color: var(--accent); }
.stat-tile.red   .stat-num { color: var(--accent); }
.stat-tile.green { border-top-color: #27ae60; }
.stat-tile.green .stat-num { color: #27ae60; }
.stat-tile.blue  { border-top-color: var(--blue); }
.stat-tile.blue  .stat-num { color: var(--blue); }
.stat-tile.gold  { border-top-color: var(--gold); }
.stat-tile.gold  .stat-num { color: var(--gold); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead { background: var(--navy); color: #fff; }
thead th { padding: 14px 16px; font-weight: 800; text-align: left; white-space: nowrap; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #f8f9fb; }
tbody tr:hover { background: #edf0f7; }
tbody td { padding: 12px 16px; vertical-align: middle; color: var(--text); font-size: .9rem; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .05em;
    white-space: nowrap;
    text-transform: uppercase;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-grey   { background: #e5e7eb; color: #374151; }
.badge-navy   { background: #e2e8f0; color: var(--navy); }
.badge-gold   { background: var(--gold-lt); color: #92400e; }

/* ============================================================
   REVIEW CARD
   ============================================================ */
.review-card {
    background: #f8f9fc;
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy);
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 14px;
}
.review-card .rc-header { font-weight: 800; color: var(--navy); font-size: .9rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.review-card .rc-body   { font-size: .9rem; color: var(--text); white-space: pre-wrap; line-height: 1.7; }

/* ============================================================
   WORKFLOW TIMELINE
   ============================================================ */
.workflow-track { list-style: none; padding: 0; margin: 0; }
.workflow-track li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.workflow-track li:last-child { border-bottom: none; }
.wf-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    margin-top: 2px;
    font-weight: 700;
}
.wf-dot.done    { background: #00796b;  color: #fff; }
.wf-dot.active  { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(0,53,128,.2); }
.wf-dot.pending { background: #e0e0e0;       color: #888; }
.wf-label  { font-weight: 700; font-size: .9rem; color: var(--navy); }
.wf-detail { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ============================================================
   PERMIT BOX
   ============================================================ */
.permit-box {
    background: linear-gradient(135deg, #002060, var(--navy));
    color: #fff;
    border-radius: 12px;
    padding: 30px 26px;
    text-align: center;
    margin-top: 22px;
    border: 3px solid var(--gold);
}
.permit-box h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; }
.permit-box .permit-num { font-size: 1.85rem; font-weight: 900; letter-spacing: .08em; margin-bottom: 10px; }
.permit-box .permit-qr  { font-family: monospace; font-size: .82rem; opacity: .75; word-break: break-all; }

/* ============================================================
   INTERNAL SIDEBAR LAYOUT
   ============================================================ */
.internal-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 70px);
}
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #002060;
    color: #fff;
    display: flex;
    flex-direction: column;
    border-right: 3px solid var(--gold);
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
}
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 4px;
}
.sidebar-logo .logo-sub { font-size: .74rem; opacity: .7; margin-top: 7px; line-height: 1.4; }
.sidebar-nav { padding: 14px 0; flex: 1; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background .16s, color .16s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-left-color: var(--gold);
}
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; opacity: .6; }
.internal-content { flex: 1; padding: 0; overflow-x: hidden; background: var(--bg); }
.int-body { padding: 28px 30px 44px; }

/* ============================================================
   HELPERS
   ============================================================ */
.narrow      { max-width: 580px; margin: 0 auto; }
.mt-8        { margin-top: 8px;  }
.mt-16       { margin-top: 16px; }
.mt-22       { margin-top: 22px; }
.mt-24       { margin-top: 24px; }
.mb-16       { margin-bottom: 16px; }
.mb-24       { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); font-size: .88rem; }
.small       { font-size: .84rem; color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-form { display: inline; }
.chip {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .internal-content { padding: 0; }
    .int-body { padding: 14px 14px 28px; }
    .services-layout { grid-template-columns: 1fr; }
    .svc-steps { margin-top: 28px; }
}
@media (max-width: 700px) {
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 58px; left: 0; right: 0;
        background: var(--forest3);
        padding: 10px 0;
        border-top: 2px solid var(--gold);
        box-shadow: 0 6px 20px rgba(0,0,0,.25);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 13px 24px; border-radius: 0; }
    .nav-toggle { display: flex; }
    .site-header { position: relative; }
    .header-inner { flex-wrap: wrap; }
    .services-right { padding: 20px 16px; }
    .svc-cards { grid-template-columns: repeat(2, 1fr); }
    .auth-box { padding: 30px 22px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
