/* =========================================
   1. THEME PALETTES (THE MAGIC VARIABLES)
   ========================================= */

/* AUTOMOTIVE THEME (The Default - Sleek, Asphalt, High Contrast) */
:root {
    --bg-color: #0a0a0c;
    --bg-color-album: #121215;
    --bg-color-next: #050506;
    --text-primary: #ffffff;
    --text-secondary: #8c8c94;
    --border-color: #2a2a30;
    --accent-bg: #ffffff;
    --accent-text: #000000;
    --img-placeholder: #1a1a1e;
    --font-sans: 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

/* NATURE THEME (Moody, Deep Forest, Organic) */
.nature-theme {
    --bg-color: #0b110d;
    --bg-color-album: #131a15;
    --bg-color-next: #070a08;
    --text-primary: #e8eee9;
    --text-secondary: #7a877d;
    --border-color: #233328;
    --accent-bg: #e8eee9;
    --accent-text: #0b110d;
    --img-placeholder: #19241d;
}

/* =========================================
   2. GLOBAL RESETS
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    font-family: var(--font-sans);
    background-color: var(--bg-color) !important;
    color: var(--text-primary) !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

    a:hover {
        opacity: 0.7;
    }

/* =========================================
   3. BLAZOR SYSTEM DEFAULTS
   ========================================= */

.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* =========================================
   4. STRUCTURAL & TYPOGRAPHY UTILITIES
   ========================================= */

.main-section {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    padding: 0rem 3vw;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.serif-heading {
    font-family: var(--font-serif);
    font-weight: 400;
}

.medium-heading {
    font-size: 2.5rem;
}

.small-heading {
    font-size: 1.5rem;
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.label, .section-label, .detail {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo h1 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.logo span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.main-nav {
    display: flex;
    gap: 2.5rem;
    font-size: 0.85rem;
}

    .main-nav .active {
        border-bottom: 1px solid var(--text-primary);
        padding-bottom: 2px;
    }

/* =========================================
   6. HERO SECTION
   ========================================= */

.hero-section {
    padding: 8rem 0 2.5rem 0;
}

.hero-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 7rem);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero-description {
    max-width: 350px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-bottom: 1rem;
}

.hero-image-wrapper {
    width: 100%;
    height: 75vh;
    overflow: hidden;
    background-color: var(--img-placeholder);
    border-radius: 4px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
}

.hero-footer-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.view-series {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* =========================================
   7. ALBUMS SECTION (Homepage Grids)
   ========================================= */

.albums-section {
    padding: 5rem 0;
}

.albums-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4rem;
}

    .albums-header .count {
        font-size: 1.2rem;
        font-family: var(--font-sans);
        color: var(--text-secondary);
        margin-left: 0.5rem;
    }

.album-filters {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

    .album-filters .active {
        color: var(--text-primary);
    }

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem 2rem;
}

.album-card .image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: var(--img-placeholder);
    border-radius: 4px;
}

.album-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.album-card:hover img {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
    border-radius: 50px;
    letter-spacing: 0.05em;
    z-index: 2;
}

.hover-button {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--accent-bg);
    color: var(--accent-text);
    padding: 0.7rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.image-container:hover .hover-button {
    opacity: 1;
    transform: translateY(0);
}

.album-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.album-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* =========================================
   8. NEXT SECTION & FOOTER
   ========================================= */

.next-section {
    padding: 6rem 0;
    background-color: var(--bg-color-next);
    margin: 0 -3vw;
    padding-left: 3vw;
    padding-right: 3vw;
}

.next-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.large-link {
    font-size: clamp(2.5rem, 5vw, 4rem);
    transition: color 0.3s ease;
}

    .large-link:hover {
        color: var(--text-secondary);
    }

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3vw;
    font-size: 0.8rem;
    color: var(--text-primary);
    width: 100%;
    background-color: var(--bg-color-album);
    border-top: 1px solid var(--border-color);
}

/* =========================================
   9. ALBUM DETAIL PAGE
   ========================================= */

.album-detail-wrapper {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.albumDetailBackground {
    padding: 6rem 3vw;
}

.album-detail-container {
    max-width: 1400px;
    margin: 0 auto;
}

.back-link {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 3rem;
}

    .back-link:hover {
        color: var(--text-primary);
    }

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.album-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    margin: 0;
}

.photo-count {
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* --- Album Detail Grid --- */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.grid-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--img-placeholder);
    border-radius: 2px;
}

    .grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .grid-item:hover img {
        transform: scale(1.04);
    }

.grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

    .grid-overlay span {
        color: #fff;
        font-family: var(--font-sans);
        font-weight: 500;
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        padding: 0.6rem 1.2rem;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 2px;
        transform: translateY(10px);
        transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

.grid-item:hover .grid-overlay {
    opacity: 1;
}

    .grid-item:hover .grid-overlay span {
        transform: translateY(0);
        border-color: #fff;
    }

/* --- Lightbox Modal --- */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.focused-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .lightbox-close:hover {
        color: var(--text-secondary);
    }

.lightbox-caption {
    margin-top: 1.5rem;
    text-align: center;
    font-family: var(--font-sans);
}

    .lightbox-caption h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        color: #fff;
    }

    .lightbox-caption p {
        margin: 0.5rem 0 0 0;
        color: #aaa;
        font-size: 0.85rem;
        line-height: 1.5;
        max-width: 600px;
    }

.loading-state {
    padding: 4rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   10. ADMIN LAYOUT & NAVIGATION
   ========================================= */

.admin-wrapper {
    min-height: 100vh;
    background-color: #121212; /* Dark background matching the admin theme */
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e1e;
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    margin-right: 1rem;
}

.nav-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: #fff;
    }

.return-link {
    color: #0d6efd; /* Bootstrap primary blue */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

    .return-link:hover {
        text-decoration: underline;
    }

/* Clean, modern logout button matching the admin theme */
.logout-btn {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .logout-btn:hover {
        background-color: #dc3545; /* Bootstrap danger red */
        border-color: #dc3545;
        color: #fff;
    }

.admin-content {
    padding: 2rem;
    flex-grow: 1;
}
.portfolio-app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #0c0c0c;
}

.global-header {
    position: absolute; /* Pulls the header out of the normal flow */
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 1rem 4rem;
    z-index: 100; /* Ensures it always sits on top of images */
    pointer-events: none; /* Allows clicks to pass through empty space to the images below */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Re-enable clicking just for the actual text/links */
.logo-area, .main-nav {
    pointer-events: auto;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Logo Styling */
.logo-area {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: white;
    text-decoration: none;
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: #a0a0a0;
    letter-spacing: 1px;
}

/* Navigation Links */
.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.85rem;
}

    .main-nav a {
        color: white;
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .main-nav a:hover {
            color: #a0a0a0;
        }

.divider {
    color: #555;
}

/* Ensure the page content fills the screen */
.page-content {
    width: 100%;
    min-height: 100vh;
}
/* =========================================
   11. ADMIN UPLOAD PAGE
   ========================================= */

.admin-upload-wrapper {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
    min-height: calc(100vh - 60px); /* Accounts for the admin nav bar */
}

.admin-panel {
    background-color: #1e1e1e;
    width: 100%;
    max-width: 900px;
    padding: 3rem;
    border-radius: 6px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.admin-panel-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.admin-panel-subtitle {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1.5rem;
}

/* --- Form Controls --- */
.admin-label {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.admin-input {
    background-color: #121212 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .admin-input:focus {
        border-color: #0d6efd !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }

/* Dropdown specific */
.form-select.admin-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aaaaaa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Custom Toggle Switch */
.admin-switch-container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.admin-switch {
    width: 2.5rem !important;
    height: 1.25rem !important;
    background-color: #444 !important;
    border-color: #333 !important;
    cursor: pointer;
}

    .admin-switch:checked {
        background-color: #26b050 !important;
        border-color: #26b050 !important;
    }

/* --- File Input & Buttons --- */
.upload-action-box {
    background-color: #161616;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px dashed #555;
    margin-top: 1rem;
}

.admin-file-input {
    background-color: #1e1e1e !important;
    border: 1px solid #444 !important;
    color: #ccc !important;
    padding: 0.5rem;
}

    .admin-file-input::file-selector-button {
        background-color: #333;
        color: #fff;
        border: none;
        border-radius: 2px;
        padding: 0.3rem 0.8rem;
        margin-right: 1rem;
        cursor: pointer;
        transition: background-color 0.2s;
    }

        .admin-file-input::file-selector-button:hover {
            background-color: #444;
        }

.admin-btn-primary {
    background-color: #0d6efd;
    color: #fff;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
}

    .admin-btn-primary:hover {
        background-color: #0b5ed7;
        color: #fff;
    }

    .admin-btn-primary:active {
        transform: scale(0.98);
    }

/* --- Alerts & Status --- */
.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    color: #8bb9fe;
}

.admin-alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

.admin-alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

/* --- Preview Grid --- */
.upload-success-section {
    border-top: 1px solid #333;
    padding-top: 2rem;
}

.success-title {
    color: #26b050;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.preview-card {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 4px;
    overflow: hidden;
    background-color: #121212;
    border: 1px solid #333;
}

    .preview-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 255, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-card:hover .preview-overlay {
    opacity: 1;
}

.preview-overlay span {
    background-color: #26b050;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

/* =========================================
   12. ADMIN MANAGEMENT PAGE
   ========================================= */

.admin-dashboard-wrapper {
    padding: 2rem 1rem 5rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Top Header & Save Button --- */
.admin-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e1e;
    padding: 1.5rem 2rem;
    border-radius: 6px;
    border: 1px solid #333;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.admin-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem 0;
}

.admin-page-subtitle {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0;
}

.admin-btn-success {
    background-color: #26b050;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s;
}

    .admin-btn-success:hover {
        background-color: #1f9442;
        color: #fff;
    }

    .admin-btn-success:active {
        transform: scale(0.98);
    }

/* --- Panel Internal Layout --- */
.settings-subhead {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.automotive-accent {
    color: #8bb9fe;
}

.nature-accent {
    color: #26b050;
}

.admin-col-divider {
    border-right: 1px solid #333;
}

@media (max-width: 768px) {
    .admin-col-divider {
        border-right: none;
        border-bottom: 1px solid #333;
        padding-bottom: 2rem;
    }
}

/* --- Tabs --- */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    background: #121212;
    padding: 0.3rem;
    border-radius: 4px;
    border: 1px solid #333;
}

.admin-tab-btn {
    flex: 1;
    background: transparent;
    color: #888;
    border: none;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

    .admin-tab-btn:hover {
        color: #fff;
    }

    .admin-tab-btn.active {
        background: #2a2a2a;
        color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

/* --- Sortable Lists --- */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    /* Custom Scrollbar for dark panels */
    scrollbar-width: thin;
    scrollbar-color: #444 #121212;
}

    .sortable-list::-webkit-scrollbar {
        width: 6px;
    }

    .sortable-list::-webkit-scrollbar-track {
        background: #121212;
    }

    .sortable-list::-webkit-scrollbar-thumb {
        background-color: #444;
        border-radius: 10px;
    }

.sortable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #121212;
    border: 1px solid #333;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: border-color 0.2s, background-color 0.2s;
}

    .sortable-item:hover {
        border-color: #555;
        background-color: #161616;
    }

.item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
}

.tiny-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #333;
}

/* --- Reorder Buttons --- */
.item-controls {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #aaa;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

    .btn-icon:hover {
        background: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }

/* =========================================
   13. ADMIN DASHBOARD PAGE
   ========================================= */

/* --- Stat Cards --- */
.admin-stat-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    height: 100%;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .admin-stat-card:hover {
        transform: translateY(-3px);
        border-color: #444;
    }

.stat-icon-wrapper {
    background: #121212;
    width: 64px;
    height: 64px;
    min-width: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #333;
}

.stat-icon {
    font-size: 1.75rem;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* --- Action Cards --- */
.admin-action-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

    /* Premium sliding accent border */
    .admin-action-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background-color: #0d6efd;
        transform: scaleY(0);
        transition: transform 0.3s ease;
        transform-origin: bottom;
    }

    .admin-action-card:hover {
        background-color: #222;
        border-color: #444;
        transform: translateY(-3px);
        color: #fff;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }

        .admin-action-card:hover::before {
            transform: scaleY(1);
        }

.action-icon-circle {
    background: #121212;
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #333;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.admin-action-card:hover .action-icon-circle {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.action-icon-circle .action-icon {
    font-size: 1.5rem;
    color: #0d6efd;
}

.action-content {
    flex-grow: 1;
}

    .action-content h5 {
        margin: 0 0 0.5rem 0;
        font-weight: 600;
        font-size: 1.25rem;
        color: #fff;
    }

    .action-content p {
        font-size: 0.9rem;
        color: #aaa;
        margin: 0;
        line-height: 1.5;
    }

.action-arrow {
    font-size: 1.5rem;
    color: #555;
    font-weight: 300;
    transition: transform 0.3s ease, color 0.3s ease;
}

.admin-action-card:hover .action-arrow {
    color: #0d6efd;
    transform: translate(4px, -4px); /* Slides diagonally up and right */
}

/* Danger Delete Button Styling */
.btn-danger-icon:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}
