/* =========================================
   Global Styles – Cross Border Permits
   Corporate theme: dark header/sidebar, light content
   ========================================= */

:root {
    --bg-body: #e5e7eb;           /* Page background */
    --bg-header: #0b1120;         /* Top header */
    --bg-sidebar: #020617;        /* Sidebar background */
    --bg-content: #ffffff;        /* Main content area */
    --bg-card: #f9fafb;           /* Cards inside content */

    --border-subtle: #e5e7eb;
    --border-strong: #cbd5e1;

    --text-main: #0f172a;         /* Primary text in content */
    --text-muted: #64748b;
    --text-on-dark: #e5e7eb;      /* Text on header/sidebar */
    --text-on-dark-muted: #9ca3af;

    --accent: #2563eb;            /* Primary corporate blue */
    --accent-soft: rgba(37, 99, 235, 0.08);

    --danger: #b91c1c;
    --danger-soft: rgba(185, 28, 28, 0.1);
    --success: #15803d;
    --success-soft: rgba(21, 128, 61, 0.08);

    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-pill: 999px;

    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.08);

    --transition-fast: 0.18s ease-out;
}

/* =========================================
   Reset / base
   ========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Century Gothic", "Gill Sans", system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    background: var(--bg-body);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

/* Headings – bold, corporate */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

p {
    line-height: 1.5;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* =========================================
   Links as buttons (global)
   ========================================= */

a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.45rem 1rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    gap: 0.35rem;
}

a:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

/* Utility variants for links/buttons */

a.btn-primary,
.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

a.btn-primary:hover,
.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

a.btn-secondary,
.btn-secondary {
    border-color: #cbd5e1;
    background: #f9fafb;
    color: #0f172a;
}

a.btn-secondary:hover,
.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #94a3b8;
}

/* Small pill buttons */

.btn-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent);
    background: transparent;
    color: #1d4ed8;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast),
                transform var(--transition-fast), border-color var(--transition-fast);
}

.btn-small:hover {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Destructive buttons */

.btn-danger {
    border-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fee2e2;
    border-color: #7f1d1d;
}

/* Logout link emphasised */

.logout-link {
    font-size: 0.8rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--danger);
    padding: 0.3rem 0.9rem;
    color: #fee2e2;
    background: #7f1d1d;
}

.logout-link:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

/* =========================================
   HEADER
   ========================================= */

.site-header {
    width: 100%;
    background: var(--bg-header);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-on-dark);
    text-transform: uppercase;
}

.logo span {
    color: var(--accent);
}

/* Top-right header section (user + nav) */

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-on-dark-muted);
}

/* Example pill for role / status in header */
.pill-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-size: 0.75rem;
}

/* Main navigation bar */

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.main-nav a {
    border-color: transparent;
    background: transparent;
    color: var(--text-on-dark-muted);
    padding: 0.25rem 0.8rem;
    font-size: 0.85rem;
}

.main-nav a:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.5);
}

/* =========================================
   LAYOUT: SIDEBAR + CONTENT
   ========================================= */

.layout {
    flex: 1;
    display: flex;
    max-width: 1200px;
    margin: 18px auto 24px;
    padding: 0 16px;
    gap: 16px;
}

/* Sidebar */

.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: var(--text-on-dark);
    box-shadow: var(--shadow-subtle);
}

.sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.sidebar-user {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.9);
}

.sidebar-user-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-user-role {
    font-size: 0.78rem;
    color: #9ca3af;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    margin: 8px 4px 2px;
}

.nav-link,
.nav-link.disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        color var(--transition-fast);
}

.nav-link span {
    opacity: 0.96;
}

.nav-link.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}

.nav-link:hover:not(.active):not(.disabled) {
    background: rgba(148, 163, 184, 0.25);
    border-color: rgba(148, 163, 184, 0.7);
    transform: translateY(-1px);
}

.nav-link.disabled {
    opacity: 0.45;
    cursor: default;
}

.nav-pill {
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.9);
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */

.content {
    flex: 1;
    background: var(--bg-content);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

/* Generic page container (for login/register etc.) */

.page,
.login-page,
.register-page {
    flex: 1;
    padding: 24px 16px 40px;
    display: flex;
    justify-content: center;
}

.page-inner,
.login-inner,
.register-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Page titles */

.page-title {
    margin-bottom: 16px;
}

.page-title h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.page-title p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Content header inside dashboard/content layout */

.content-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.content-header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.content-header-title h1 {
    font-size: 1.4rem;
    font-weight: 700;
}

.content-header-title small {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.content-header-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* Summary cards */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-subtle);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 4px;
    color: var(--text-main);
}

.card-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Lower grid – dashboard detail panels */

.lower-grid {
    display: grid;
    grid-template-columns: 2.1fr 1.3fr;
    gap: 12px;
}

.panel {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.panel-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.panel-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #0369a1;
}

.panel-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px; /* spacing between items */
    margin-top: 4px;
}

.panel-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.panel-list-main {
    color: var(--text-main);
}

.panel-list-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.panel-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================
   Forms & alerts
   ========================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.form-row,
.form-row-full {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

.form-row-full {
    grid-column: 1 / -1;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

.form-actions,
.button-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Alerts */

.alert {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid transparent;
    margin-bottom: 10px;
}

.alert-success {
    background: var(--success-soft);
    border-color: #bbf7d0;
    color: var(--success);
    text-align: center;
    font-weight: 600;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
    text-align: center;
    font-weight: 600;
}

/* =========================================
   Tables
   ========================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th,
td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border-strong);
    text-align: left;
    vertical-align: middle;
}

th {
    font-weight: 700;
    background: #f1f5f9;
}

tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Pills & badges */

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    border: 1px solid rgba(37, 99, 235, 0.6);
    color: #1d4ed8;
    font-size: 0.8rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    border: 1px solid #cbd5e1;
    background: #f9fafb;
    color: #0f172a;
}

.badge.inactive {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}

/* Small utility text */

.text-small {
    font-size: 0.75rem;
}

.text-muted {
    color: var(--text-muted);
}

.detail-text {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Inline forms for actions */

.inline-form {
    display: inline-block;
    margin-left: 4px;
}

/* =========================================
   Footer
   ========================================= */

footer {
    padding: 12px 16px;
    text-align: center;
    font-size: 0.8rem;
    background: var(--bg-header);
    color: var(--text-on-dark-muted);
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 960px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .sidebar-user {
        flex: 1 1 180px;
    }

    .sidebar-nav {
        flex: 2 1 240px;
        margin-top: 4px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .main-nav {
        justify-content: flex-start;
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lower-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .button-bar,
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    a,
    .btn-primary,
    .btn-secondary {
        width: auto;
    }
}

@media (max-width: 540px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 10px;
    }

    .header-inner {
        padding: 0 12px;
    }

    .page,
    .login-page,
    .register-page {
        padding: 18px 12px 28px;
    }
}

/* --- HERO TEXT CENTRING AND SMALLER FONT SIZES --- */

/* Wrapper */
.hero-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* "Streamline your cross-border permit process" */
.hero-text .hero-highlight {
    font-size: 1rem;   /* smaller */
    font-weight: 600;
    margin-bottom: 10px;
}

/* "Centralised Management..." heading */
.hero-text h2 {
    font-size: 1.3rem; /* smaller */
    font-weight: 700;
    margin-bottom: 12px;
}

/* Paragraph under heading */
.hero-text p {
    font-size: 0.9rem; /* smaller text */
    line-height: 1.4;
    margin-bottom: 16px;
}

/* Bullet list */
.hero-bullets {
    margin-top: 10px;
    display: inline-block; /* so bullets centre nicely */
    text-align: left;      /* bullets aligned inside block */
}

.hero-bullets .bullet-item {
    font-size: 0.9rem;     /* smaller */
    margin-bottom: 6px;
}

.hero-bullets span {
    font-size: 1rem;
    margin-right: 6px;
}

/* CTA buttons */
.hero-cta-buttons {
    margin-top: 18px;
    text-align: center;
}

.hero-cta-buttons .btn-primary,
.hero-cta-buttons .btn-secondary {
    font-size: 0.9rem;     /* smaller buttons */
    padding: 8px 18px;
}

/* “How It Works” section */
.info-section h2 {
    font-size: 1.4rem; /* smaller */
}

.info-item h3 {
    font-size: 1rem;
}

.info-item p {
    font-size: 0.85rem;
}

/* CTA strip */
.cta-strip p {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* --- TRUCK IMAGE CENTRED & SMALLER --- */
.truck-wrapper {
    text-align: center;
    margin: 25px auto;
}

.truck-image {
    width: 250px;        /* adjust size here */
    max-width: 80%;
    height: auto;
    border-radius: 10px;  /* optional: rounded corners */
}

/* =============== LANDING PAGE =============== */

body.landing-body {
    min-height: 100vh;
    background: #e5e7eb;            /* light grey for landing page */
    color: #0f172a;
}

/* Header logo text colour */
.site-header .logo-text h1 {
    color: #ffffff;
}

/* Centre header content on landing */
.site-header {
    background: #020617;
    border-bottom: 1px solid #1f2937;
}
.site-header .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #020617;
}
.logo-text p {
    font-size: 0.8rem;
    color: #cbd5f5;
}
.main-nav a {
    font-size: 0.85rem;
}

/* HERO LAYOUT */
.hero-landing {
    padding: 40px 16px 20px;
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Centre and shrink all hero text */
.hero-text {
    flex: 1 1 320px;
    text-align: center;
}
.hero-highlight {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 6px;
}
.hero-text h2 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.hero-lead {
    font-size: 0.85rem;
    max-width: 420px;
    margin: 0 auto 10px;
}
.hero-bullets {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}
.bullet-item {
    display: flex;
    justify-content: center;
    gap: 6px;
}
.bullet-item h3 {
    font-size: 0.9rem;
}
.bullet-item p {
    font-size: 0.78rem;
}
.bullet-icon {
    font-size: 0.8rem;
    margin-top: 2px;
}
.hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Buttons consistent with rest of site */
.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* TRUCK IMAGE – centred & small */
.hero-image {
    flex: 0 0 320px;
    display: flex;
    justify-content: center;
}
.truck-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* HOW IT WORKS & CTA */
.info-section {
    padding: 20px 16px 10px;
    text-align: center;
}
.info-inner {
    max-width: 900px;
    margin: 0 auto;
}
.info-section h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 12px;
    font-size: 0.85rem;
}
.cta-strip {
    text-align: center;
    padding: 18px 16px 24px;
    font-size: 0.9rem;
}

/* =============== WHATSAPP FLOAT BUTTON =============== */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 999;
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
}
.whatsapp-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* =========================================
   Company details / tabbed forms – shared
   (from company_details.php inline styles)
   ========================================= */

/* Simple centre helper (used frequently) */
.auto-style1 {
    text-align: center;
}

/* Main level tabs (e.g. Registered details / Depot / Yard Management) */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.main-tab-link {
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    transition: background-color var(--transition-fast),
                color var(--transition-fast);
}

.main-tab-link.active {
    background: #ffffff;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
    font-weight: 700;
}

.main-tab-content {
    display: none;
}

.main-tab-content.active {
    display: block;
}

/* Secondary tabs in cards (e.g. Company Details / RCP, Your Yards / Add Yard / History) */

.subtabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.company-subtab-link,
.yard-subtab-link {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: background-color var(--transition-fast),
                color var(--transition-fast);
}

.company-subtab-link.active,
.yard-subtab-link.active {
    background: #ffffff;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
    font-weight: 600;
}

.company-subtab-content,
.yard-subtab-content {
    display: none;
}

.company-subtab-content.active,
.yard-subtab-content.active {
    display: block;
}

/* Two-column address blocks (company & yard forms) */

.two-column-address {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.two-column-address .address-block {
    text-align: center;
}

.two-column-address textarea {
    width: 320px;
    min-height: 8em;
    resize: vertical;
}

/* “Same as Physical” checkbox under postal */

.same-as-physical {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.same-as-physical input {
    vertical-align: middle;
}

/* Centre-only variants for special forms (optional) */
/* Use by wrapping your form rows in .form-grid-centered if needed elsewhere */

.form-grid-centered .form-row,
.form-grid-centered .form-row-full {
    align-items: center;
    text-align: center;
}

.form-grid-centered input[type="text"],
.form-grid-centered input[type="email"],
.form-grid-centered input[type="password"],
.form-grid-centered input[type="date"],
.form-grid-centered input[type="file"],
.form-grid-centered select,
.form-grid-centered textarea {
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
}

/* Static display row (e.g. “No. of Vehicles” value only) */

.form-row-static {
    text-align: center;
}

.form-row-static .value {
    margin-top: 4px;
    font-weight: 700;
    color: var(--text-main);
}

/* Upload block rows and small notes */

.form-row-upload {
    margin-top: 14px;
}

.field-group-heading {
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 700;
    text-decoration: underline;
    text-align: center;
}

.years-input {
    width: 140px !important;
    margin-left: auto;
    margin-right: auto;
}

.small-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Yard view / edit panel container */

.yard-view-panel {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    text-align: center;
}

/* Re-use standard table styling */

.yard-view-panel table {
    margin-top: 10px;
}

/* WhatsApp icon buttons used across lists & history */

.wa-icon-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px 6px;
}

.wa-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
    background: #25D366;
    color: #ffffff;
}

/* Button containers for forms */

.btn-container {
    text-align: center;
    margin-top: 20px;
}

/* Back-to-dashboard container used on company details */

.btn-back {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* =========================================
   Permits page: saving overlay (scoped)
   Added to eliminate inline styles without affecting global UI
   ========================================= */

.form-overlay{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.55);
    z-index: 1000;
}

.form-overlay.is-active{
    display: flex;
}

.form-overlay-card{
    width: min(520px, 92vw);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: 18px 18px 14px;
    text-align: center;
}

.form-overlay-title{
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.form-overlay-track{
    width: 100%;
    height: 10px;
    background: #eef2ff;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.form-overlay-bar{
    height: 100%;
    width: 38%;
    background: var(--accent);
    border-radius: 999px;
}

.form-overlay-subtitle{
    margin-top: 10px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* Indeterminate progress animation */
@keyframes cbpProgress{
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

.cbp-progress{
    animation: cbpProgress 1.1s infinite linear;
}

/* =========================================
   Suggestions FAB + panel (scoped)
   Added to eliminate inline styles without affecting global UI
   ========================================= */

.suggestions-fab{
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 950;
}

.suggestions-fab-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 14px;
    border: 1px solid rgba(37, 99, 235, 0.55);
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.suggestions-fab-btn:hover{
    background: #1d4ed8;
}

.suggestions-panel{
    position: fixed;
    right: 18px;
    bottom: 76px;
    width: min(520px, calc(100vw - 36px));
    max-height: min(78vh, 720px);
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 16px;
    z-index: 951;
    display: none;
}

.suggestions-panel.is-open{
    display: block;
}

.suggestions-panel-header{
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.suggestions-panel-title{
    font-size: 1.05rem;
    font-weight: 800;
}

.suggestions-panel-subtitle{
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Suggestions form styles */
.suggestion-container{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestion-title{
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
}

.suggestion-textarea{
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.suggestion-toggle-row{
    display: flex;
    justify-content: center;
}

.suggestion-toggle-label{
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.suggestion-legal{
    display: none;
    border: 1px solid var(--border-subtle);
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.suggestion-legal.is-open{
    display: block;
}

.suggestion-legal ul{
    margin: 10px 0 10px 18px;
}

.suggestion-agree-label{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.suggestion-submit{
    display: flex;
    justify-content: center;
}

@media (max-width: 540px){
    .suggestions-panel{ right: 10px; left: 10px; width: auto; }
    .suggestions-fab{ right: 10px; bottom: 12px; }
}
