/* assets/css/wagener.css */

:root {
    /* Palette */
    --color-forest: #2c4a3b;
    /* Deep Forest Green */
    --color-forest-dark: #1e352a;
    --color-gold: #c5a065;
    /* Gold */
    --color-gold-light: #d4b685;
    --color-cream: #f4f1ea;
    /* Cream/Off-White */
    --color-cream-dark: #e8e3d6;
    --color-slate: #374151;
    /* Slate Gray for text */
    --color-slate-light: #6b7280;
    --color-white: #ffffff;
    --color-error: #ef4444;
    --color-success: #10b981;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

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

    body {
        font-family: var(--font-body);
        font-size: var(--text-body);
        color: var(--text-primary);
        background-color: var(--bg-page);
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-family: var(--font-heading);
        color: var(--link-color);
        line-height: 1.2;
        margin-bottom: var(--spacing-sm);
    }

    h1 {
        font-size: var(--text-h1);
    }

    h2 {
        font-size: var(--text-h2);
    }

    h3 {
        font-size: var(--text-h3);
    }

    a {
        color: var(--color-forest);
        text-decoration: none;
        transition: color 0.2s;
    }

    a:hover {
        color: var(--color-gold);
    }

    img {
        max-width: 100%;
        display: block;
    }

    /* Layout */
    .container {
        max-width: var(--container-width);
        margin: 0 auto;
        padding: 0 var(--spacing-sm);
    }

    .grid {
        display: grid;
        gap: var(--spacing-md);
    }

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

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

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

    @media (max-width: 768px) {

        .grid-cols-2,
        .grid-cols-3,
        .grid-cols-4 {
            grid-template-columns: 1fr;
        }
    }

    /* Utilities */
    .text-center {
        text-align: center;
    }

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

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

    .text-small {
        font-size: var(--text-small);
    }

    .mb-sm {
        margin-bottom: var(--spacing-sm);
    }

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

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

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

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

    .mb-xl {
        margin-bottom: 6rem;
    }

    .mt-xl {
        margin-top: 6rem;
    }

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

    .bg-forest {
        background-color: var(--color-forest);
        color: var(--color-cream);
    }

    .p-md {
        padding: var(--spacing-md);
    }

    .rounded {
        border-radius: var(--radius-md);
    }

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

    /* Components */
    /* Legacy buttons removed in favor of UI component system */

    .btn-text {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0.25rem 0.5rem;
        color: var(--text-muted);
        text-decoration: none;
    }

    .btn-text:hover {
        background: rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
        text-decoration: underline;
    }

    .btn-danger-outline {
        background: transparent;
        border: 1px solid #e53e3e;
        color: #e53e3e;
    }

    .btn-danger-outline:hover {
        background: #e53e3e;
        color: white;
    }

    .card {
        background: var(--color-white);
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-sm);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .card-header {
        border-bottom: 1px solid var(--color-cream-dark);
        padding-bottom: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        font-family: var(--font-heading);
        font-size: 1.25rem;
        color: var(--link-color);
    }

    /* Form Elements */
    .form-group {
        margin-bottom: var(--spacing-sm);
    }

    .form-label {
        display: block;
        margin-bottom: 0.25rem;
        font-weight: 600;
        font-size: 0.875rem;
    }

    .form-input {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--color-slate-light);
        border-radius: var(--radius-sm);
        font-family: var(--font-body);
    }

    .form-input:focus {
        outline: none;
        border-color: var(--color-gold);
        box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.2);
    }

    /* Alias for compatibility with simpler class names */
    .input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--color-slate-light);
        border-radius: var(--radius-sm);
        font-family: var(--font-body);
        font-size: 1rem;
        background-color: var(--color-white);
    }

    .input:focus,
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: var(--color-gold);
        box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.2);
    }

    /* Dropdown Menu */
    .dropdown {
        position: relative;
        display: inline-block;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        /* background-color: var(--color-white); */
        /* Moved to .dropdown-inner */
        min-width: 180px;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        border-radius: var(--radius-sm);
        top: 100%;
        left: 0;
        /* Use padding instead of margin to bridge the gap */
        padding-top: 0.5rem;
        /* margin-top: 0.5rem; */
        /* Removed */
    }

    /* Inner container for links to separate them from the padding bridge */
    .dropdown-inner {
        background: var(--color-white);
        border-radius: var(--radius-sm);
        overflow: hidden;
    }

    .dropdown-content a {
        color: var(--color-forest) !important;
        padding: 0.75rem 1rem;
        text-decoration: none;
        display: block;
        transition: background 0.2s;
    }

    .dropdown-content a:hover {
        background-color: var(--color-cream);
        color: var(--color-forest-dark) !important;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown>a {
        white-space: nowrap;
        /* Prevent arrow wrapping */
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }


    /* Badge */
    .badge {
        display: inline-block;
        padding: 0.25em 0.6em;
        font-size: 75%;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: var(--radius-sm);
    }

    .rounded-pill {
        border-radius: 50rem;
    }

    /* Badge Variations */
    .badge-purple {
        background-color: #8b5cf6;
        color: white;
    }

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

    .badge-gold {
        background-color: var(--color-gold);
        color: white;
    }

    .badge-red {
        background-color: var(--color-error);
        color: white;
    }

    .badge-blue {
        background-color: #3b82f6;
        color: white;
    }

    .badge-slate {
        background-color: var(--color-slate);
        color: white;
    }

    .badge-light {
        background-color: #f3f4f6;
        color: var(--color-slate);
    }

    .bg-white {
        background-color: #fff !important;
    }

    .bg-gold {
        background-color: var(--color-gold) !important;
    }

    .text-dark {
        color: var(--color-slate) !important;
    }

    .text-white {
        color: #fff !important;
    }

    .text-tiny {
        font-size: 0.75rem;
    }

    .uppercase {
        text-transform: uppercase;
    }

    .tracking-wider {
        letter-spacing: 0.05em;
    }

    .tracking-widest {
        letter-spacing: 0.1em;
    }

    /* Positioning */
    .relative {
        position: relative;
    }

    .absolute {
        position: absolute;
    }

    .top-0 {
        top: 0;
    }

    .right-0 {
        right: 0;
    }

    .bottom-0 {
        bottom: 0;
    }

    .left-0 {
        left: 0;
    }

    /* Padding/Margin Extras */
    .p-0 {
        padding: 0 !important;
    }

    .m-sm {
        margin: var(--spacing-sm);
    }

    .py-xs {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    .px-sm {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Flexbox Utils */
    .flex {
        display: flex;
    }

    .flex-col {
        flex-direction: column;
    }

    .flex-wrap {
        flex-wrap: wrap;
    }

    .items-center {
        align-items: center;
    }

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

    .justify-between {
        justify-content: space-between;
    }

    .flex-grow-1 {
        flex-grow: 1;
    }

    .gap-xs {
        gap: var(--spacing-xs);
    }

    .gap-sm {
        gap: var(--spacing-sm);
    }

    .gap-md {
        gap: var(--spacing-md);
    }

    .h-100 {
        height: 100%;
    }

    .w-100 {
        width: 100%;
    }

    .overflow-hidden {
        overflow: hidden;
    }

    /* =========================================
   UI Refinements (Filters & Maps)
   ========================================= */

    /* Filter Bars */
    .filter-bar {
        background: var(--color-white);
        padding: 1.25rem;
        border-radius: var(--radius-lg);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .filter-bar form {
        display: flex;
        gap: 1rem;
        align-items: center;
        flex-wrap: wrap;
    }

    .filter-bar .form-input,
    .filter-bar select,
    .filter-bar input {
        border: 1px solid #e2e8f0;
        background-color: #f8fafc;
        border-radius: var(--radius-md);
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
        transition: all 0.2s;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    }

    .filter-bar .form-input:focus,
    .filter-bar select:focus,
    .filter-bar input:focus {
        background-color: #fff;
        border-color: var(--color-gold);
        box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.15);
    }

    .filter-bar .btn {
        padding: 0.65rem 1.5rem;
        border-radius: var(--radius-md);
        text-transform: uppercase;
        letter-spacing: 0.02em;
        font-size: 0.85rem;
        font-weight: 700;
    }

    /* Map Popups */
    .leaflet-popup-content-wrapper {
        border-radius: var(--radius-lg) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
        padding: 0 !important;
        overflow: hidden;
    }

    .leaflet-popup-content {
        margin: 0 !important;
        width: 280px !important;
        line-height: 1.5;
    }

    .leaflet-popup-close-button {
        color: white !important;
        z-index: 10;
    }

    .map-popup-header {
        height: 120px;
        background: var(--color-forest);
        position: relative;
        display: flex;
        align-items: flex-end;
        padding: 1rem;
    }

    .map-popup-header img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0.9;
    }

    .map-popup-header::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    }

    .map-popup-badge-container {
        position: relative;
        z-index: 2;
    }

    .map-popup-body {
        padding: 1.25rem;
    }

    .map-popup-title {
        font-family: var(--font-heading);
        color: var(--color-forest);
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

    .map-popup-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: var(--color-gold);
        color: white;
        padding: 4px 10px;
        border-radius: 50px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .map-popup-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        color: var(--color-slate-light);
    }

    .map-popup-icon {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }

    .map-popup-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-top: 1rem;
        background: var(--color-forest);
        color: white !important;
        text-align: center;
        padding: 0.75rem;
        border-radius: var(--radius-md);
        text-decoration: none;
        font-weight: 600;
        transition: all 0.2s;
        box-shadow: 0 4px 6px rgba(44, 74, 59, 0.2);
    }

    .map-popup-btn:hover {
        background: var(--color-forest-dark);
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(44, 74, 59, 0.3);
    }

    /* Custom Marker */
    .custom-marker-shadow {
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    }

    /* Base Tabs (Global) */
    .tabs {
        display: flex;
        gap: 0;
        margin-bottom: 2rem;
        border-bottom: 2px solid #e5e7eb;
        overflow-x: auto;
        /* Handle overflow on mobile */
    }

    .tab {
        padding: 1rem 2rem;
        background: transparent;
        border: none;
        font-weight: 600;
        color: var(--color-slate-light);
        cursor: pointer;
        border-bottom: 3px solid transparent;
        margin-bottom: -2px;
        font-size: 1.1rem;
        /* Bigger text */
        white-space: nowrap;
        transition: all 0.2s;
        font-family: var(--font-heading);
    }

    .tab:hover {
        color: var(--color-forest);
        background-color: rgba(44, 74, 59, 0.03);
    }

    .tab.active {
        color: var(--color-forest);
        border-bottom-color: var(--color-forest);
        background-color: transparent;
    }

    .tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .tab-content.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* =========================================
   Admin Panel Layout (New)
   ========================================= */
    .admin-body {
        background-color: #f3f4f6;
        height: 100vh;
        overflow: hidden;
        /* Prevent body scroll, individual areas scroll */
    }

    .admin-wrapper {
        display: flex;
        height: 100vh;
        width: 100vw;
    }

    /* Sidebar */
    .admin-sidebar {
        width: 260px;
        background-color: var(--color-forest-dark);
        color: white;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        transition: transform 0.3s ease;
        z-index: 50;
        height: 100%;
        overflow-y: auto;
    }

    .admin-brand {
        height: 64px;
        display: flex;
        align-items: center;
        padding: 0 1.5rem;
        font-family: var(--font-heading);
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--color-gold);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .admin-nav {
        padding: 1.5rem 1rem;
        flex-grow: 1;
    }

    .admin-nav-group {
        margin-bottom: 1.5rem;
    }

    .admin-nav-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.4);
        margin-bottom: 0.5rem;
        padding-left: 0.75rem;
        font-weight: 600;
    }

    .admin-nav-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        border-radius: var(--radius-sm);
        transition: all 0.2s;
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .admin-nav-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
        transform: translateX(2px);
    }

    .admin-nav-item.active {
        background-color: var(--color-forest);
        color: var(--color-gold);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .admin-user {
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.2);
    }

    /* Main Content Area */
    .admin-main {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        background-color: #f3f4f6;
    }

    .admin-header {
        height: 64px;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 2rem;
        flex-shrink: 0;
    }

    .admin-content-scroll {
        flex-grow: 1;
        overflow-y: auto;
        padding: 2rem;
    }

    .admin-page-header {
        margin-bottom: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .admin-stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Admin Sorting */
    .admin-sort-link {
        color: inherit;
        text-decoration: none;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: color 0.2s;
    }

    .admin-sort-link:hover {
        color: var(--color-forest);
    }

    .admin-sort-link.active {
        color: var(--color-forest);
    }

    .sort-icon {
        font-size: 0.8em;
        opacity: 0.5;
    }

    .admin-sort-link.active .sort-icon {
        opacity: 1;
    }

    .stat-card {
        background: white;
        padding: 1.5rem;
        border-radius: var(--radius-md);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        background: #f3f4f6;
        color: var(--color-forest);
    }

    .stat-info h3 {
        margin: 0;
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--color-forest-dark);
    }

    .stat-info p {
        margin: 0;
        color: #6b7280;
        font-size: 0.875rem;
    }

    /* Responsive Admin List / Table Replacement */
    .admin-list-card {
        background: white;
        border-radius: var(--radius-md);
        overflow: hidden;
        border: 1px solid #e5e7eb;
        box-shadow: var(--shadow-sm);
    }

    .admin-list-header {
        display: flex;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.75rem 1rem;
        font-weight: 600;
        color: var(--color-slate);
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .admin-list-row {
        display: flex;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
        align-items: center;
        transition: background-color 0.2s;
        text-decoration: none;
        color: inherit;
    }

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

    .admin-list-row:hover {
        background: #f9fafb;
    }

    .admin-list-main {
        flex: 1;
        min-width: 0;
    }

    .admin-list-title {
        font-weight: 600;
        color: var(--color-slate);
        margin-bottom: 0.25rem;
        font-size: 1rem;
    }

    .admin-list-meta {
        font-size: 0.875rem;
        color: var(--color-slate-light);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
    }

    .admin-list-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    /* Badges */
    .admin-badge {
        display: inline-flex;
        align-items: center;
        padding: 0.125rem 0.5rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1.25;
        white-space: nowrap;
    }

    .admin-badge-gray {
        background-color: #f3f4f6;
        color: #374151;
    }

    .admin-badge-green {
        background-color: #d1fae5;
        color: #065f46;
    }

    .admin-badge-red {
        background-color: #fee2e2;
        color: #991b1b;
    }

    .admin-badge-blue {
        background-color: #dbeafe;
        color: #1e40af;
    }

    .admin-badge-yellow {
        background-color: #fef3c7;
        color: #92400e;
    }

    /* Specific Columns */
    .admin-col-date {
        min-width: 80px;
        text-align: center;
        flex-shrink: 0;
    }

    .admin-date-month {
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--color-slate-light);
        font-weight: 600;
    }

    .admin-date-day {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--color-forest);
        line-height: 1;
        margin: 2px 0;
    }

    .admin-date-year {
        font-size: 0.75rem;
        color: var(--color-slate-light);
    }

    /* Mobile Responsiveness */
    @media (max-width: 768px) {
        .admin-list-header {
            display: none;
        }

        .admin-list-row {
            flex-direction: column;
            align-items: flex-start;
            padding: 1rem;
            position: relative;
        }

        /* Force all columns to full width on mobile to stack */
        .admin-list-row>div {
            width: 100% !important;
            flex: none !important;
            max-width: 100% !important;
            margin-bottom: 0.5rem;
            text-align: left !important;
        }

        /* Remove margin from last item before actions */
        .admin-list-row>div:nth-last-child(2) {
            margin-bottom: 0;
        }

        .admin-list-actions {
            width: 100% !important;
            justify-content: flex-start;
            /* Align left or between? */
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px dashed #e5e7eb;
            margin-bottom: 0 !important;
        }

        .admin-list-actions .btn {
            flex: 1;
            /* Make buttons expanded and touch friendly? Or just auto? */
            justify-content: center;
        }

        .admin-col-date {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
            text-align: left;
        }

        .admin-date-day {
            font-size: 1.2rem;
            margin: 0;
        }

        .admin-mobile-label {
            display: inline-block;
            font-weight: 600;
            color: #9ca3af;
            /* muted */
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-right: 0.5rem;
            width: 80px;
            /* fixed width for alignment */
        }

        /* If we unhide items, we need to ensure they don't look weird */
        .hide-mobile {
            /* display: none !important; -- removing this rule so we can manually control visibility */
        }
    }

    @media (min-width: 769px) {
        .hide-desktop {
            display: none !important;
        }

        .admin-overlay {
            display: none !important;
        }

        .admin-mobile-label {
            display: none;
        }
    }

    /* Mobile Sidebar Logic */
    @media (max-width: 768px) {
        .hide-desktop {
            display: block !important;
        }

        .admin-sidebar {
            position: fixed;
            left: -280px;
            top: 0;
            bottom: 0;
            z-index: 1000;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            width: 260px;
            box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
        }

        .admin-sidebar.open {
            left: 0;
        }

        .admin-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 900;
            backdrop-filter: blur(2px);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .admin-overlay.open {
            display: block;
            opacity: 1;
        }

        .admin-main {
            width: 100%;
            margin-left: 0;
        }

        /* Adjust breadcrumb/header for mobile */
        .admin-header {
            padding: 0.75rem 1rem;
        }
    }

    @media (min-width: 769px) {
        .hide-desktop {
            display: none !important;
        }

        .admin-overlay {
            display: none !important;
        }
    }

    /* Production Polish for Admin Lists */
    .admin-list-row {
        transition: background-color 0.15s ease;
    }

    .admin-list-row:hover {
        background-color: #fcfcfc;
    }

    .admin-badge {
        white-space: nowrap;
        font-size: 0.75rem;
        font-weight: 600;
        padding: 3px 8px;
        border-radius: 99px;
        letter-spacing: 0.02em;
    }

    /* Badge Colors */
    .admin-badge-green {
        background: #dcfce7;
        color: #166534;
    }

    .admin-badge-blue {
        background: #dbeafe;
        color: #1e40af;
    }

    .admin-badge-red {
        background: #fee2e2;
        color: #991b1b;
    }

    .admin-badge-yellow {
        background: #fef9c3;
        color: #854d0e;
    }

    .admin-badge-gray {
        background: #f3f4f6;
        color: #4b5563;
    }

    /* Better empty states */
    .admin-empty-state {
        padding: 4rem 1rem;
        text-align: center;
        color: #6b7280;
    }

    .admin-empty-state svg {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
        color: #d1d5db;
    }

    /* Responsive Page Header */
    @media (max-width: 768px) {
        .admin-page-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .admin-page-header>div {
            width: 100%;
        }

        .admin-page-header .btn {
            width: 100%;
            justify-content: center;
        }

        .admin-content-scroll {
            padding: 1rem;
            /* Reduce padding on mobile */
        }
    }

    /* Admin Tabs (Link based) */
    .admin-tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab-link {
        display: inline-block;
        padding: 0.75rem 1rem;
        text-decoration: none;
        color: #6b7280;
        border-bottom: 2px solid transparent;
        font-weight: 500;
        transition: all 0.2s;
        font-size: 0.95rem;
    }

    .admin-tab-link:hover {
        color: var(--color-forest);
        background: #f9fafb;
    }

    .admin-tab-link.active {
        color: var(--color-forest);
        border-bottom-color: var(--color-forest);
        font-weight: 600;
    }

    /* Variant colors for tabs */
    .admin-tab-link.active-gold {
        color: var(--color-gold);
        border-bottom-color: var(--color-gold);
    }

    .admin-tab-link.active-green {
        color: #166534;
        border-bottom-color: #166534;
    }

    .admin-tab-link.active-red {
        color: #991b1b;
        border-bottom-color: #991b1b;
    }

    /* =====================================================
   FOOTER STYLES - Dark Theme Compatible
   ===================================================== */
    .footer-link {
        color: var(--footer-link, var(--color-cream-dark));
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .footer-link:hover {
        color: var(--footer-link-hover, var(--color-gold));
    }

    /* =====================================================
   CARD DARK THEME SUPPORT
   Cards need explicit background for dark themes
   ===================================================== */
    .card {
        background-color: var(--card-bg, var(--color-white));
        color: var(--card-text, inherit);
    }

    /* Ensure links in content areas are readable */
    .content-area a:not(.btn) {
        color: var(--link-color, var(--color-forest));
    }

    .content-area a:not(.btn):hover {
        color: var(--link-hover, var(--color-gold));
    }

    /* =====================================================
   ARTICLE CONTENT OVERRIDES (For CMS content)
   ===================================================== */
    .article-content,
    .article-body {
        color: var(--text-primary) !important;
    }

    .article-content p,
    .article-content span,
    .article-content div,
    .article-content li,
    .article-body p {
        color: var(--text-primary) !important;
        background-color: transparent !important;
    }

    .article-content a,
    .article-body a {
        color: var(--link-color) !important;
    }

    /* --- Weather Alerts --- */
    .alert-banner {
        width: 100%;
        text-align: center;
        font-family: var(--font-body);
        font-size: 0.95rem;
        color: #fff;
        position: relative;
        z-index: 9999;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .alert-inner {
        max-width: var(--container-width);
        margin: 0 auto;
        padding: 0.75rem 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

    .alert-content {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
    }

    .alert-title {
        font-weight: 800;
    }

    .alert-description {
        opacity: 0.9;
    }

    .alert-banner.severity-extreme,
    .alert-banner.severity-severe {
        background-color: #dc2626;
        /* Deep Red */
        color: white;
    }

    .alert-banner.severity-moderate {
        background-color: #ea580c;
        /* Deep Orange */
        color: white;
    }

    .alert-banner.severity-minor {
        background-color: #facc15;
        /* Yellow */
        color: #1f2937;
        /* Dark text for contrast */
    }

    .alert-banner a {
        color: inherit;
        text-decoration: underline;
        margin-left: 1rem;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.2);
        padding: 0.1rem 0.5rem;
        border-radius: 4px;
        white-space: nowrap;
    }

    .alert-banner a:hover {
        background: rgba(255, 255, 255, 0.3);
        text-decoration: none;
        color: inherit;
    }

    .alert-banner-close {
        background: none;
        border: none;
        color: inherit;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        opacity: 0.8;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        padding: 0.2rem;
        border-radius: 50%;
        transition: background 0.2s;
    }

    .alert-banner-close:hover {
        background: rgba(255, 255, 255, 0.2);
        opacity: 1;
    }

    @media (max-width: 768px) {
        .alert-inner {
            flex-direction: column;
            gap: 0.75rem;
            padding: 1.25rem 3rem;
        }

        .alert-content {
            flex-direction: column;
            gap: 0.25rem;
            text-align: center;
        }

        .alert-title {
            font-size: 1.1rem;
        }

        .alert-description {
            font-size: 0.9rem;
            line-height: 1.3;
        }

        .alert-banner-close {
            top: 0.5rem;
            right: 0.5rem;
            transform: none;
        }

        .alert-banner a {
            margin-left: 0;
            padding: 0.4rem 1.5rem;
        }
    }
}