/* 
 * Track the Truck – Food Truck Tracker
 * assets/css/style.css — Main stylesheet
 * 
 * Mobile-first responsive CSS3 with custom properties.
 */

/* ──────────────────────────────────────────────
   CSS Custom Properties
   ────────────────────────────────────────────── */
:root {
    /* Colors */
    --color-primary: #4361ee;
    --color-primary-hover: #3a56d4;
    --color-primary-light: #eef2ff;
    --color-danger: #e63946;
    --color-danger-hover: #c9302c;
    --color-success: #2d6a4f;
    --color-success-hover: #1b543a;
    --color-warning: #f4a261;
    --color-warning-hover: #e08f4b;
    --color-dark: #1a1a2e;
    --color-text: #1a1a2e;
    --color-text-muted: #666;
    --color-text-light: #888;
    --color-bg: #f4f4f6;
    --color-white: #fff;
    --color-border: #e9ecef;
    --color-border-light: #ccc;
    --color-input-bg: #fff;

    /* Flash colors */
    --flash-success-bg: #d4edda;
    --flash-success-text: #155724;
    --flash-success-border: #c3e6cb;
    --flash-error-bg: #f8d7da;
    --flash-error-text: #721c24;
    --flash-error-border: #f5c6cb;
    --flash-info-bg: #d1ecf1;
    --flash-info-text: #0c5460;
    --flash-info-border: #bee5eb;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-sm: 0.85rem;
    --font-size-base: 0.95rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.4rem;
    --font-size-xxl: 1.6rem;
    --line-height: 1.6;

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-full: 20px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s;
    --transition-normal: 0.25s;

    /* Layout */
    --container-max: 1100px;
    --nav-height: 56px;
}

/* ──────────────────────────────────────────────
   Reset & Base
   ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: var(--line-height);
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

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

ul, ol {
    list-style: none;
}

/* ──────────────────────────────────────────────
   Container
   ────────────────────────────────────────────── */
.container,
.main-container {
    max-width: var(--container-max);
    margin: var(--space-lg) auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container,
    .main-container {
        margin: var(--space-xl) auto;
        padding: 0 var(--space-lg);
    }
}

/* ──────────────────────────────────────────────
   Navigation
   ────────────────────────────────────────────── */
.nav-bar {
    background: var(--color-dark);
    color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 var(--space-md);
    position: relative;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white) !important;
    white-space: nowrap;
}

.nav-brand:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Hamburger toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: #ccc;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-white);
    text-decoration: none;
    border-bottom-color: var(--color-primary);
}

/* Admin dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-dropdown-toggle:hover {
    color: var(--color-white);
    text-decoration: none;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    padding: 0.35rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.9rem;
    border-bottom: none;
    transition: background var(--transition-fast);
}

.nav-dropdown-menu a:hover {
    background: var(--color-primary-light);
    border-bottom: none;
}

.nav-dropdown-menu a.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* ──────────────────────────────────────────────
   Mobile Navigation
   ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-dark);
        padding: var(--space-sm) var(--space-md);
        gap: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

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

    .nav-links a {
        display: block;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a.active {
        border-bottom: 1px solid var(--color-primary);
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        display: block;
        padding: 0.7rem 0;
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.05);
        padding: 0 0 0 var(--space-md);
    }

    .nav-dropdown-menu a {
        color: #ccc;
        padding: 0.5rem 0;
    }

    .nav-dropdown-menu a:hover {
        background: none;
        color: var(--color-white);
    }
}

/* ──────────────────────────────────────────────
   Flash Messages
   ────────────────────────────────────────────── */
.flash {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    animation: flashSlideIn 0.3s ease-out;
    position: relative;
}

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

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

.flash.flash-hiding {
    animation: flashSlideOut 0.3s ease-in forwards;
}

.flash-success {
    background: var(--flash-success-bg);
    color: var(--flash-success-text);
    border: 1px solid var(--flash-success-border);
}

.flash-error {
    background: var(--flash-error-bg);
    color: var(--flash-error-text);
    border: 1px solid var(--flash-error-border);
}

.flash-info {
    background: var(--flash-info-bg);
    color: var(--flash-info-text);
    border: 1px solid var(--flash-info-border);
}

.flash-message {
    flex: 1;
}

.flash-dismiss {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: opacity var(--transition-fast), background var(--transition-fast);
    color: inherit;
    flex-shrink: 0;
}

.flash-dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.error-list {
    margin-left: 1.25rem;
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────
   Loading Spinner
   ────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-round);
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: var(--radius-round);
    animation: spin 0.6s linear infinite;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* ──────────────────────────────────────────────
   Forms
   ────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: var(--font-size-base);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: var(--color-input-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-family);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-control.has-error {
    border-color: var(--color-danger);
}

.form-control.has-error:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

textarea.form-control {
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.form-error {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-danger);
    font-weight: 500;
}

.required {
    color: var(--color-danger);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-lg);
    align-items: center;
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────
   Buttons
   ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
    text-decoration: none !important;
    line-height: 1.4;
    font-family: var(--font-family);
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
    border-color: var(--color-border-light);
}

.btn-secondary:hover {
    background: #dde0e3;
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background: var(--color-danger-hover);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-success:hover {
    background: var(--color-success-hover);
}

.btn-warning {
    background: var(--color-warning);
    color: var(--color-white);
}

.btn-warning:hover {
    background: var(--color-warning-hover);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0;
    font-family: var(--font-family);
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--color-primary-hover);
}

/* ──────────────────────────────────────────────
   Auth Pages (Login / Register)
   ────────────────────────────────────────────── */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-md);
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    box-shadow: var(--shadow-sm);
    max-width: 420px;
    width: 100%;
}

.auth-title {
    font-size: var(--font-size-xl);
    margin-bottom: 0.25rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.auth-form {
    max-width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ──────────────────────────────────────────────
   Profile Page
   ────────────────────────────────────────────── */
.profile-page,
.user-profile-page,
.truck-profile-page {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.profile-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.profile-avatar {
    margin-bottom: 0.75rem;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-round);
    object-fit: cover;
    border: 3px solid var(--color-border);
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-round);
    background: var(--color-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-header h1 {
    font-size: var(--font-size-xxl);
    margin-bottom: 0.2rem;
}

.profile-role {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.profile-form {
    max-width: 540px;
    margin: 0 auto;
}

.current-avatar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--space-sm);
}

.avatar-preview {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-round);
    object-fit: cover;
}

.avatar-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Profile Section (Manage Trucks etc.) */
.profile-section {
    margin-top: 2.5rem;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.profile-section h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.section-actions {
    margin-bottom: 1.25rem;
}

.profile-section h3 {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.75rem;
    color: #444;
}

/* Trucks List (Profile) */
.trucks-list,
.applications-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.truck-item,
.application-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    gap: var(--space-md);
}

.truck-item-info,
.app-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.truck-mini-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.app-status-label {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.4rem;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: var(--flash-success-text);
}

.status-denied {
    background: #f8d7da;
    color: var(--flash-error-text);
}

.status-withdrawn {
    background: #e2e3e5;
    color: #383d41;
}

.badge-inactive {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    background: var(--color-border);
    color: var(--color-text-muted);
    margin-left: 0.3rem;
}

.meta-item {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ──────────────────────────────────────────────
   Truck Profile Page
   ────────────────────────────────────────────── */
.truck-header {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.truck-logo-img {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.truck-logo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
}

.truck-info {
    flex: 1;
}

.truck-info h1 {
    font-size: var(--font-size-xxl);
    margin-bottom: var(--space-sm);
}

.truck-description {
    color: #444;
    margin-bottom: var(--space-md);
    line-height: 1.65;
}

.truck-owner-info {
    margin-bottom: 0.75rem;
}

.owner-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: #333;
    font-size: 0.9rem;
}

.owner-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-round);
    object-fit: cover;
}

.mini-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-round);
    background: var(--color-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.truck-zones {
    margin-bottom: 0.75rem;
}

.zones-label {
    font-size: var(--font-size-sm);
    color: #555;
}

.zone-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.zone-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: #e7f0ff;
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.truck-follow-action {
    margin-top: 0.75rem;
}

/* ──────────────────────────────────────────────
   Truck Profile Header (Redesigned)
   ────────────────────────────────────────────── */
.truck-profile-header {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.truck-profile-header .truck-card-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.truck-profile-header .truck-card-photo img,
.truck-profile-header .truck-card-photo .truck-logo-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.truck-card-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
}

.truck-profile-header .truck-card-body {
    flex: 1;
    min-width: 0;
}

.truck-profile-header .truck-card-body h1 {
    font-size: var(--font-size-xxl);
    margin-bottom: var(--space-sm);
}

.truck-item-desc {
    color: #444;
    margin-bottom: var(--space-md);
    line-height: 1.65;
}

.truck-profile-header .truck-card-body p {
    margin: 0 0 0.25rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.truck-profile-header .truck-card-body p i {
    width: 1.2rem;
    text-align: center;
    margin-right: 0.25rem;
    color: var(--color-primary);
}

.truck-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.truck-info-col h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.truck-info-col p {
    margin: 0 0 0.3rem;
    font-size: var(--font-size-sm);
}

.truck-info-col p i {
    width: 1.2rem;
    text-align: center;
    color: var(--color-primary);
}

@media (max-width: 600px) {
    .truck-profile-header {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }
    .truck-info-grid {
        grid-template-columns: 1fr;
    }
    .truck-card-photo,
    .truck-profile-header .truck-card-photo {
        margin: 0 auto;
    }
}

/* ──────────────────────────────────────────────
   Apply Truck Page
   ────────────────────────────────────────────── */
.apply-truck-page {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    max-width: 640px;
    margin: 0 auto;
}

.apply-truck-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
}

.apply-truck-form {
    max-width: 100%;
}

/* ──────────────────────────────────────────────
   Admin Pages
   ────────────────────────────────────────────── */
.admin-approvals-page,
.admin-reports-page,
.admin-dashboard-page {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.admin-approvals-page h1,
.admin-reports-page h1,
.admin-dashboard-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: 1.25rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.filter-tab:hover {
    color: #333;
    text-decoration: none;
}

.filter-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Application Card */
.application-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: var(--space-md);
    background: #fafbfc;
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: 0.75rem;
}

.app-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.app-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.app-details h2 {
    font-size: var(--font-size-lg);
    margin-bottom: 0.15rem;
}

.app-owner {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.app-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-description {
    color: #444;
    font-size: var(--font-size-base);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.app-meta {
    margin-bottom: var(--space-md);
}

.app-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

/* Approve Zone Form */
.approve-zone-form {
    background: #f0f4ff;
    border: 1px solid #cfe0ff;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-sm);
}

/* Inline Form */
.inline-form {
    display: inline;
}

/* ──────────────────────────────────────────────
   Post Cards
   ────────────────────────────────────────────── */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.post-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: box-shadow var(--transition-fast);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-author-avatar {
    flex-shrink: 0;
}

.post-author-avatar:hover {
    text-decoration: none;
}

.post-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.post-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background: var(--color-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-author-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1.3;
}

.post-author-name a {
    color: var(--color-text);
}

.post-author-name a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.post-as-truck {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.post-as-truck a {
    color: var(--color-primary);
    font-weight: 500;
}

.post-time {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.post-body p {
    margin-bottom: 0.5rem;
    line-height: 1.65;
    word-break: break-word;
}

.post-image {
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
    max-height: 400px;
    object-fit: cover;
}

.post-image-link {
    display: block;
    margin-top: var(--space-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-image-link:hover {
    opacity: 0.97;
}

.post-location,
.post-event {
    display: inline-block;
    margin-top: 0.3rem;
    margin-right: 0.75rem;
    font-size: var(--font-size-sm);
    color: #555;
}

.post-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ── Inline Edit / Delete Buttons (Post Engagement Bar) ── */
.btn-edit-post-inline,
.btn-delete-post-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    line-height: 1;
    font-family: var(--font-family);
}

.btn-edit-post-inline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-delete-post-inline:hover {
    background: #fef2f2;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* ── Inline Edit / Delete Buttons (Comments) ── */
.comment-actions-inline {
    display: inline-flex;
    gap: 0.15rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.btn-edit-comment-inline,
.btn-delete-comment-inline {
    padding: 0.1rem 0.3rem;
    font-size: 0.7rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    color: var(--color-text-muted);
    line-height: 1;
    font-family: var(--font-family);
}

.btn-edit-comment-inline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-delete-comment-inline:hover {
    background: #fef2f2;
    color: var(--color-danger);
}

/* Post Header needs relative positioning for kebab */
.post-card {
    position: relative;
}

/* Post Inline Edit Form */
.post-edit-form {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.post-edit-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: 0.5rem;
}

/* ── Leaflet Map ── */
.location-map-container {
    width: 100%;
    height: 300px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    z-index: 1;
}

/* ── Address Autocomplete ── */
.autocomplete-container {
    position: relative;
    z-index: 100;
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    cursor: pointer;
    border: 1px solid var(--color-border);
    border-top: none;
    background: #fff;
    transition: background var(--transition-fast);
}

.autocomplete-item:first-child {
    border-top: 1px solid var(--color-border);
    border-radius: 0 0 0 0;
}

.autocomplete-item:hover {
    background: var(--color-primary-light);
}

/* Comment Inline Edit Form */
.comment-edit-form {
    margin-top: 0.35rem;
}

.comment-edit-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: 0.3rem;
}

/* Post Engagement */
.post-engagement {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    flex-wrap: wrap;
}

.btn-like,
.btn-dislike {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    line-height: 1;
    font-family: var(--font-family);
}

.btn-like:hover,
.btn-dislike:hover {
    background: #edf2ff;
    border-color: var(--color-primary);
}

.btn-like.active {
    background: #e7f0ff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-dislike.active {
    background: #fff0f0;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.stat-like,
.stat-dislike,
.stat-comments {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ──────────────────────────────────────────────
   Comments
   ────────────────────────────────────────────── */
.comments-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.remaining-comments {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.comment-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0;
}

.comment-avatar-link {
    flex-shrink: 0;
}

.comment-avatar-link:hover {
    text-decoration: none;
}

.comment-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-round);
    object-fit: cover;
}

.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-round);
    background: var(--color-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-right: 0.4rem;
}

.comment-author a {
    color: var(--color-text);
}

.comment-author a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.15rem 0;
    word-break: break-word;
}

.comment-time {
    font-size: 0.75rem;
    color: #999;
}

/* Comment Engagement: Like / Dislike — matches post engagement pill style */
.comment-engagement {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.btn-comment-like,
.btn-comment-dislike {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    line-height: 1;
    font-family: var(--font-family);
}

.btn-comment-like:hover,
.btn-comment-dislike:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.btn-comment-like.active {
    background: #e7f0ff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-comment-dislike.active {
    background: #fff0f0;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.stat-comment-like,
.stat-comment-dislike {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.no-comments {
    font-size: var(--font-size-sm);
    color: #999;
    text-align: center;
    padding: 0.75rem 0;
}

/* Comment Form */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.comment-input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    resize: vertical;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.comment-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.comment-form .btn-comment-submit {
    align-self: flex-end;
}

/* Post Comments Toggle */
.post-comments-toggle {
    margin-top: 0.4rem;
}

.load-comments-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    font-family: var(--font-family);
}

.load-comments-link:hover {
    text-decoration: underline;
    color: var(--color-primary-hover);
}

/* ──────────────────────────────────────────────
   Pagination
   ────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    flex-wrap: wrap;
}

.page-info {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ──────────────────────────────────────────────
   Empty State
   ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    color: var(--color-text-light);
    padding: var(--space-xl) var(--space-md);
    font-size: var(--font-size-base);
}

/* ──────────────────────────────────────────────
   Error Page
   ────────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.error-page p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ──────────────────────────────────────────────
   Create Post Page
   ────────────────────────────────────────────── */
.create-post-page {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    max-width: 720px;
    margin: 0 auto;
}

.create-post-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
}

.post-form {
    max-width: 100%;
}

/* ──────────────────────────────────────────────
   Feed Page
   ────────────────────────────────────────────── */
.feed-page {
    max-width: 680px;
    margin: 0 auto;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.feed-header h1 {
    font-size: var(--font-size-xl);
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
    overflow: hidden;
}

.feed-tab {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    white-space: nowrap;
}

.feed-tab:hover {
    color: #333;
    text-decoration: none;
    background: #f8f9fa;
}

.feed-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: var(--color-white);
}

.feed-tab.active:hover {
    background: var(--color-white);
}

/* ──────────────────────────────────────────────
   Fieldset (Location group)
   ────────────────────────────────────────────── */
.form-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-fieldset legend {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 0.4rem;
}

.form-hint-inline {
    font-weight: 400;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-group-half {
    flex: 1;
}

.form-location-coords {
    margin-top: var(--space-sm);
}

.form-location-coords .btn {
    margin-top: var(--space-sm);
}

/* ──────────────────────────────────────────────
   Follow / Unfollow Button States
   ────────────────────────────────────────────── */
.btn-unfollow {
    background: #e9ecef;
    color: #333;
    border-color: var(--color-border-light);
}

.btn-unfollow:hover {
    background: #f8d7da;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* Follow Counts */
.follow-counts {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.follow-count-item {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.follow-count-item strong {
    font-size: 1.05rem;
    color: var(--color-text);
}

/* Follow Management Page */
.follow-page {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    max-width: 680px;
    margin: 0 auto;
}

.follow-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
}

.follow-section {
    margin-bottom: var(--space-xl);
}

.follow-section:last-child {
    margin-bottom: 0;
}

.follow-section h2 {
    font-size: var(--font-size-lg);
    color: #555;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.follow-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.follow-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    gap: var(--space-md);
}

.follow-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.follow-avatar-link {
    flex-shrink: 0;
}

.follow-avatar-link:hover {
    text-decoration: none;
}

.follow-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    object-fit: cover;
}

.follow-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    background: var(--color-primary);
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.follow-item-details {
    min-width: 0;
}

.follow-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--color-text);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-name:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.follow-bio {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0.1rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-time {
    font-size: 0.75rem;
    color: #999;
}

/* User Actions (profile pages) */
.user-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.user-bio {
    color: #555;
    margin-top: var(--space-sm);
    font-size: var(--font-size-base);
}

.user-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

/* Report Form (user profile page) */
.report-form {
    max-width: 480px;
    margin: 0 auto var(--space-lg);
    padding: 1.25rem;
    background: #fff5f5;
    border: 1px solid var(--flash-error-border);
    border-radius: var(--radius-md);
}

.report-form .form-group {
    margin-bottom: var(--space-md);
}

.report-form .form-control {
    background: var(--color-white);
}

/* Report Card */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.report-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: #fafbfc;
}

.report-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: 0.75rem;
}

.report-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.report-details .report-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.report-body {
    margin-bottom: var(--space-md);
}

.report-user-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.report-user-col {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.report-user-col strong {
    font-size: var(--font-size-base);
}

.report-user-col a {
    color: var(--color-text);
}

.report-user-col a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.report-user-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.report-email {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.report-arrow {
    font-size: 1.25rem;
    color: var(--color-border-light);
    padding-top: 1.1rem;
}

.report-reason {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-base);
}

.report-reason-label {
    font-weight: 600;
    color: #555;
}

.report-meta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.report-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────
   Admin Dashboard Cards
   ────────────────────────────────────────────── */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.dashboard-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    text-decoration: none !important;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2rem;
    line-height: 1;
}

.card-body {
    display: flex;
    flex-direction: column;
}

.card-count {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.card-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

.card-warning {
    background: #fffbf0;
    border-color: #ffeeba;
}

.card-warning .card-count {
    color: #856404;
}

.card-info {
    background: #f0f7ff;
    border-color: #bee5eb;
}

.card-info .card-count {
    color: #0c5460;
}

.card-primary {
    background: var(--color-primary-light);
    border-color: #cfe0ff;
}

.card-primary .card-count {
    color: var(--color-primary);
}

.card-success {
    background: #edf7f0;
    border-color: #c3e6cb;
}

.card-success .card-count {
    color: var(--flash-success-text);
}

/* ──────────────────────────────────────────────
   Search Page
   ────────────────────────────────────────────── */
.search-page {
    max-width: 680px;
    margin: 0 auto;
}

.search-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
}

.search-form {
    margin-bottom: var(--space-lg);
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    min-width: 0;
}

.search-results-count {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
}

.truck-search-results {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.truck-card {
    display: flex;
    gap: var(--space-lg);
    padding: 1.25rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition-fast);
}

.truck-card:hover {
    box-shadow: var(--shadow-md);
}

.truck-card-logo {
    flex-shrink: 0;
}

.truck-card-logo .truck-logo-img,
.truck-card-logo .truck-logo-placeholder {
    width: 100px;
    height: 100px;
}

.truck-card-info {
    flex: 1;
    min-width: 0;
}

.truck-card-name {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.truck-card-name a {
    color: var(--color-text);
}

.truck-card-name a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.truck-card-description {
    color: #555;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.truck-card-owner {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.truck-card-owner a {
    color: var(--color-primary);
}

.truck-card-date {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

/* ── Horizontal Truck Card (Manage Trucks page) ── */
.truck-card-horizontal {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--color-bg-secondary, #f8f9fa);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-md, 8px);
}

.truck-card-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.truck-card-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md, 8px);
}

.truck-card-photo-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary, #4361ee);
    border-radius: var(--radius-md, 8px);
}

.truck-card-body {
    flex: 1;
    min-width: 0;
}

.truck-item-name {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.truck-item-desc {
    margin: 0 0 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.4;
}

.truck-item-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.truck-item-zones {
    margin: 0 0 0.4rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

@media (max-width: 500px) {
    .truck-card-horizontal {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }
    .truck-card-photo {
        margin: 0 auto;
    }
    .truck-item-buttons {
        justify-content: center;
    }
}

/* ──────────────────────────────────────────────
   Responsive: Tablet (768px and below)
   ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .truck-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .truck-logo-img,
    .truck-logo-placeholder {
        width: 100px;
        height: 100px;
    }

    .truck-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .truck-card-logo .truck-logo-img,
    .truck-card-logo .truck-logo-placeholder {
        width: 80px;
        height: 80px;
    }

    .zone-badges {
        justify-content: center;
    }

    .truck-owner-info {
        justify-content: center;
    }

    .app-card-header {
        flex-direction: column;
    }

    .manage-trucks-page,
    .profile-page,
    .user-profile-page,
    .truck-profile-page,
    .apply-truck-page,
    .admin-approvals-page,
    .admin-reports-page,
    .admin-dashboard-page {
        padding: 1.25rem;
    }

    .report-user-group {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .report-arrow {
        display: none;
    }

    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ──────────────────────────────────────────────
   Responsive: Phone (480px and below)
   ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .truck-item,
    .application-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .feed-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .feed-tabs {
        gap: 0;
    }

    .feed-tab {
        padding: 0.5rem 0.9rem;
        font-size: var(--font-size-sm);
    }

    .filter-tab {
        padding: 0.4rem 0.8rem;
        font-size: var(--font-size-sm);
    }

    .auth-card {
        padding: var(--space-lg) var(--space-md);
    }

    .search-input-group {
        flex-direction: column;
    }

    .post-engagement {
        gap: 0.35rem;
    }

    .btn-like,
    .btn-dislike {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .post-card {
        padding: var(--space-md);
    }

    .post-header {
        gap: 0.5rem;
    }

    .post-avatar-img,
    .post-avatar-placeholder {
        width: 36px;
        height: 36px;
    }

    .truck-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .manage-post-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .hours-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hours-form-group {
        min-width: auto;
    }

    .hours-form-action {
        align-self: flex-end;
    }

    .logo-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ──────────────────────────────────────────────
   Utility Classes
   ────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.mt-1 {
    margin-top: var(--space-md);
}

.mt-2 {
    margin-top: var(--space-lg);
}

.mb-1 {
    margin-bottom: var(--space-md);
}

.mb-2 {
    margin-bottom: var(--space-lg);
}

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

/* ──────────────────────────────────────────────
   Host Apply Card (Profile Page)
   ────────────────────────────────────────────── */
.host-apply-card {
    max-width: 500px;
    width: 100%;
    margin: 2rem auto 1rem;
    padding: 2rem;
    text-align: center;
    background: var(--color-bg-secondary, #f8f9fa);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    box-sizing: border-box;
}

.host-apply-card h3 {
    margin: 0 0 0.75rem;
    font-size: var(--font-size-lg, 1.1rem);
    color: var(--color-text);
}

.host-apply-subtext {
    margin: 0 0 1.25rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}

.host-apply-status {
    margin: 0;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.host-apply-status.pending {
    background: #fff3cd;
    color: #856404;
}

.host-apply-status.denied {
    background: #f8d7da;
    color: #721c24;
}

/* ──────────────────────────────────────────────
   Comment Replies (Threaded)
   ────────────────────────────────────────────── */
.comment-reply {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-border);
}

.comment-reply-form {
    margin-top: 0.5rem;
    margin-left: 0;
}

.comment-reply-form .comment-reply-textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    resize: vertical;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.comment-reply-form .comment-reply-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.comment-reply-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: 0.3rem;
}

.btn-reply-comment {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    line-height: 1;
    font-family: var(--font-family);
}

.btn-reply-comment:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ──────────────────────────────────────────────
   Manage Trucks Page
   ────────────────────────────────────────────── */
.manage-trucks-page {
    max-width: 820px;
    margin: 0 auto;
}

.manage-trucks-page h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
}

.truck-edit-panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.truck-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: #f8f9fa;
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-md);
}

.truck-panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--font-size-lg);
}

.truck-panel-body {
    padding: var(--space-lg);
}

.truck-edit-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.truck-edit-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.truck-edit-section h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    color: #444;
}

.truck-inline-form {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.truck-inline-form:last-child {
    margin-bottom: 0;
}

.truck-contact-form {
    padding: var(--space-sm) var(--space-md);
}

.contact-field-row {
    align-items: flex-end;
}

.checkbox-group {
    display: flex;
    align-items: center;
    padding-bottom: 0.35rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.current-logo {
    flex-shrink: 0;
}

.logo-preview {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--color-border);
}

/* Location Cards */
.location-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.location-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    background: #fafbfc;
}

.location-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.location-address {
    flex: 1;
    min-width: 0;
}

.location-address strong {
    font-size: var(--font-size-base);
}

.location-coords {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-left: 0.4rem;
}

.location-hours {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.location-hours h4 {
    font-size: var(--font-size-base);
    color: #555;
    margin-bottom: var(--space-sm);
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--space-sm);
}

.hours-entry {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    padding: 0.3rem 0.5rem;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.hours-day {
    font-weight: 600;
    min-width: 80px;
    color: #444;
}

.hours-time {
    color: var(--color-text);
    flex: 1;
}

.hours-entry .inline-form {
    flex-shrink: 0;
}

.no-hours,
.no-locations {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    padding: var(--space-sm) 0;
}

/* Hours Add Form */
.hours-add-form {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: #f0f4ff;
    border: 1px solid #cfe0ff;
    border-radius: var(--radius-md);
}

.hours-form-row {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    flex-wrap: wrap;
}

.hours-form-group {
    flex: 1;
    min-width: 100px;
}

.hours-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.2rem;
}

.hours-form-action {
    flex: 0 0 auto;
    min-width: auto;
}

/* Manage Posts List */
.manage-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.manage-post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    gap: var(--space-md);
}

.manage-post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.manage-post-text {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manage-post-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.manage-post-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.manage-post-item .inline-form {
    flex-shrink: 0;
}

/* Owner Links on Profile */
.owner-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

/* ──────────────────────────────────────────────
   Permanent Locations on Truck Profile
   ────────────────────────────────────────────── */
.truck-locations {
    margin-bottom: 0.75rem;
}

.permanent-location-item {
    margin-top: 0.4rem;
    padding: 0.5rem 0.65rem;
    background: #f0f7ff;
    border: 1px solid #cfe0ff;
    border-radius: var(--radius-sm);
}

.location-address-line {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #333;
}

.location-hours-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.hours-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: #555;
}

.location-add-form {
    margin-bottom: var(--space-md);
}
