/* =========================================
   ADMIN PANEL STYLES (Liquid Glass Mobile-First)
   ========================================= */

.admin-body {
    background-color: var(--bg-primary);
    background-image: url('../assets/pattern-bg-admin.png');
    background-repeat: repeat;
    background-size: auto;
    color: var(--text-primary);
    display: block;
    padding-top: 0;
}

/* Minimalist Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Glassy Admin Login Card */
.admin-login-card {
    width: 90%;
    max-width: 420px;
    margin: 80px auto;
    padding: 50px;
    background: linear-gradient(135deg, #121212 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle glass border */
    border-radius: 20px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
}

.admin-login-card h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Glassy Inputs & Selects */
/* Glassy Inputs & Selects */
.form-control {
    width: 100%;
    height: 56px;
    /* Fixed height for consistency */
    padding: 0 20px;
    /* Adjust padding for fixed height */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    /* Center text vertically */
}

/* Ensure textareas behave normally */
textarea.form-control {
    height: auto;
    padding: 16px 20px;
    display: block;
}

select.form-control {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    /* Liquid Glass Base */
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D4A373%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 50px;
}

/* Style for the options (browser support varies, but this targets most) */
select.form-control option {
    background-color: #1a1a1a;
    color: #fff;
    padding: 15px;
}

/* --- Custom Liquid Glass Dropdown (JS Replacement) --- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 56px;
    /* Fixed height for consistency */
    padding: 0 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    /* Liquid Glass Base */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.custom-select-trigger::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D4A373%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s;
}

.custom-select.open .custom-select-trigger::after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(20, 20, 20, 0.8);
    /* Dark glass for dropdown */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 250px;
    overflow-y: auto;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: block;
    padding: 15px 20px;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover,
.custom-option.selected {
    color: #fff;
    background: rgba(212, 163, 115, 0.15);
    /* Accent highlight */
    padding-left: 25px;
    /* Slight movement effect */
}

.custom-option.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    color: var(--accent-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.1);
}

textarea.form-control {
    resize: vertical;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* --- Admin Layout Structure --- */
.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOP HEADER (Mobile Only) */
.admin-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 500;
}

.admin-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
}

.admin-brand span {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-panel-top {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-panel-top span {
    color: #fff;
    font-weight: 600;
}

.logout-btn,
.logout-btn-desktop {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef5350;
    transition: var(--transition-smooth);
}

.logout-btn:hover,
.logout-btn-desktop:hover {
    background: rgba(239, 83, 80, 0.1);
    color: #ef5350;
}


/* NAVIGATION BAR (Responsive) */
.admin-bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);

    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    border-radius: 40px;
    z-index: 1000;

    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 70px;
    transition: all 0.4s ease;
}

/* Nav Buttons */
.nav-buttons-group {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0 20px;
    height: 100%;
    border-radius: 20px;
}

.nav-btn i {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: var(--transition-smooth);
}

.nav-btn span {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-btn:hover {
    color: #fff;
    /* No background change on hover request */
}

.nav-btn.active {
    background: transparent !important;
    /* Force transparent */
    color: var(--accent-color);
}

.nav-btn.active i {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(212, 163, 115, 0.6);
    /* Glow effect */
    transform: translateY(-2px);
}

/* Desktop Only Elements */
.nav-brand-desktop {
    display: none;
    /* Hidden on mobile */
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    margin-right: auto;
    align-items: center;
    gap: 5px;
}

.nav-brand-desktop span {
    color: var(--accent-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-user-desktop {
    display: none;
    /* Hidden on mobile */
    margin-left: auto;
    align-items: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nav-user-desktop span {
    color: #fff;
    font-weight: 600;
}

/* MAIN CONTENT */
.admin-main-content {
    width: 100%;
    background: transparent;
    min-height: 100vh;
    padding-top: 40px;
    padding-bottom: 120px;
    /* Default for mobile (nav at bottom) */
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

/* Admin Content Cards */
.admin-card {
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Glassy Action Buttons */
.btn {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(212, 163, 115, 0.2);
}

.reorder-handle {
    cursor: grab;
    opacity: 0.4;
    transition: 0.2s;
}

.reorder-handle:hover {
    opacity: 1;
    color: var(--accent-color);
}

.btn-sm-danger {
    padding: 6px 14px;
    background: rgba(220, 53, 69, 0.1);
    color: #ef5350;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-sm-danger:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ffcdd2;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
}

.file-upload-label:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(212, 163, 115, 0.05);
}

.file-input-hidden {
    display: none;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: 0.2s;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.project-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 20px;

    border-radius: 8px;
}

.project-info .badge {
    padding: 0;
    margin-top: 5px;
    background: transparent !important;
    border: none !important;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.badge-graphic {
    background: rgba(26, 58, 90, 0.6);
    color: #90caf9;
    border: 1px solid rgba(144, 202, 249, 0.2);
}

.badge-video {
    background: rgba(74, 26, 26, 0.6);
    color: #f48fb1;
    border: 1px solid rgba(244, 143, 177, 0.2);
}

/* ============================
   RESPONSIVE DESIGN SYSTEM
   ============================ */

/* Mobile (Default / Max 1024px) */
@media (max-width: 1024px) {

    /* Navbar at Bottom */
    .admin-bottom-nav {
        bottom: 30px;
        top: auto;
        width: 90%;
        max-width: 600px;
        justify-content: center;
        /* Center buttons group */
    }

    .nav-buttons-group {
        width: 100%;
        justify-content: space-evenly;
    }

    /* Show Top Header */
    .admin-top-header {
        display: flex;
    }

    /* Hide Desktop Elements in Nav */
    .nav-brand-desktop,
    .nav-user-desktop {
        display: none;
    }

    /* Adjust Content Padding & Width */
    .admin-main-content {
        padding-top: 20px;
        padding-bottom: 110px;
    }

    .content-container {
        width: 90%;
        max-width: 100%;
        margin: 0 auto;
    }

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

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .project-item>div:last-child {
        align-self: flex-end;
    }

    /* Modal Mobile Adjustments */
    .manager-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .manager-tabs button {
        width: 100%;
        margin-bottom: 5px;
    }

    .modal-content {
        width: 95% !important;
        margin: 10px auto;
        padding: 0 !important;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal-header {
        padding: 20px 20px 10px;
        flex-shrink: 0;
    }

    .modal-body {
        padding: 0 20px 20px;
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
    }

    .manager-tabs {
        flex-shrink: 0;
    }

    #tab-project-settings,
    #tab-project-content {
        overflow-y: auto;
        flex-grow: 1;
        height: 100%;
        min-height: 0;
        padding-right: 5px;
    }
}

/* Desktop (Min 1025px) */
@media (min-width: 1025px) {

    /* Hide Top Header */
    .admin-top-header {
        display: none;
    }

    /* Move Nav to Top */
    .admin-bottom-nav {
        top: 20px;
        bottom: auto;
        width: 95%;
        max-width: 1200px;
        justify-content: space-between;
        /* Brand - Buttons - User */
    }

    /* Show Desktop Elements */
    .nav-brand-desktop,
    .nav-user-desktop {
        display: flex;
    }

    .nav-buttons-group {
        width: auto;
        gap: 10px;
    }

    /* Adjust Content Padding */
    .admin-main-content {
        padding-top: 120px;
        /* Space for Top Nav */
        padding-bottom: 40px;
    }
}

/* --- Description Modal (Mobile) --- */
.description-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    /* backdrop-filter: blur(5px); Removed for performance */
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.description-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-header h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.modal-body {
    margin-top: 10px;
    line-height: 1.6;
    color: var(--text-secondary);
}

#tab-project-settings,
#tab-project-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.1);
}

#tab-project-settings::-webkit-scrollbar,
#tab-project-content::-webkit-scrollbar {
    width: 6px;
}

#tab-project-settings::-webkit-scrollbar-track,
#tab-project-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#tab-project-settings::-webkit-scrollbar-thumb,
#tab-project-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

#tab-project-settings::-webkit-scrollbar-thumb:hover,
#tab-project-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* --- Responsive Table (Card View) --- */
.timeline-table,
.timeline-table thead,
.timeline-table tbody,
.timeline-table th,
.timeline-table td,
.timeline-table tr {
    /* Default is table behavior, mobile behavior is in media query */
}

.btn-sm-view-mobile {
    display: none;
}

@media (max-width: 768px) {
    .desc-desktop {
        display: none;
    }

    .desc-cell {
        width: auto !important;
    }

    .btn-sm-view-mobile {
        display: inline-block;
        margin-top: 5px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: var(--accent-color);
        padding: 5px 10px;
        border-radius: 5px;
        cursor: pointer;
    }

    .timeline-table,
    .timeline-table thead,
    .timeline-table tbody,
    .timeline-table th,
    .timeline-table td,
    .timeline-table tr {
        display: block;
    }

    .timeline-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .timeline-table tr {
        margin-bottom: 20px;
        border: 1px solid #333;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        padding: 15px;
        position: relative;
    }

    .timeline-table td {
        border: none !important;
        position: relative;
        padding: 0 !important;
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 8px;
    }

    /* Year */
    .timeline-table td:nth-of-type(1) {
        color: var(--accent-color);
        font-size: 0.85rem;
        letter-spacing: 1px;
        margin-bottom: 5px;
        opacity: 0.8;
    }

    /* Title/Role */
    .timeline-table td:nth-of-type(2) {
        font-size: 1.1rem;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-bottom: 10px !important;
    }

    /* Description */
    .timeline-table td:nth-of-type(3) {
        font-size: 0.95rem;
        color: #999;
        margin-bottom: 15px;
    }

    /* Actions */
    .timeline-table td:nth-of-type(4) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        background: transparent;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

/* --- Content Manager Modal Styles --- */
.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.manager-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    aspect-ratio: 1;
}

.manager-item img,
.manager-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manager-del-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: 0.2s;
    z-index: 10;
}

.manager-del-btn:hover {
    background: #c82333;
}

/* Edit Button Style */
.btn-sm-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 5px;
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: 0.2s;
}

.btn-sm-edit:hover {
    background: #d19b66;
    transform: translateY(-2px);
}

/* Validation Styles */
.input-error {
    border: 2px solid #ff4444 !important;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* --- Content Manager Modal (List View) --- */
.manager-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 5px;
}

.manager-item-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 12px;
    transition: background 0.2s;
}

.manager-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.manager-media {
    flex-shrink: 0;
    width: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.manager-media img,
.manager-media video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Show full image/aspect ratio */
}

.manager-info {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    /* Side by side */
    align-items: flex-start;
    /* Align top */
    gap: 15px;
    min-width: 0;
}

.manager-desc {
    flex-grow: 1;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: pre-wrap;
    margin: 0;
}

.manager-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    /* Align items center relative to themselves */
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0;
}

.manager-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 5px;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.manager-handle:hover {
    color: var(--accent-color);
}

.manager-del-btn-row {
    background: rgba(220, 53, 69, 0.1);
    color: #ef5350;
    border: 1px solid rgba(220, 53, 69, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.manager-del-btn-row:hover {
    background: #c82333;
    color: white;
}

.manager-edit-btn-row {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.manager-edit-btn-row:hover {
    background: #e0a800;
    color: black;
}

/* Mobile Adjustments for Modal */
@media (max-width: 600px) {
    .manager-item-row {
        flex-direction: column;
    }

    .manager-media {
        width: 100%;
        max-height: 200px;
    }

    .manager-media img,
    .manager-media video {
        max-height: 200px;
        object-fit: contain;
        margin: 0 auto;
    }

    .manager-info {
        flex-direction: column;
        gap: 10px;
    }

    .manager-actions {
        width: 100%;
        justify-content: flex-end;
        /* Keep buttons to right or distribute */
        margin-top: 0;
    }
}

/* Sortable Ghost Animation */
.sortable-ghost {
    opacity: 0.4;
    background: var(--accent-color) !important;
    border: 1px dashed #fff !important;
    transform: scale(0.98);
}

/* Custom Checkbox Style for Admin Panel */
.form-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 20px !important;
    height: 20px;
    border-radius: 4px;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    vertical-align: middle;
}

.form-group input[type="checkbox"]::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    transition: 0.1s transform ease-in-out;
    box-shadow: inset 1em 1em var(--accent-color);
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    background-color: var(--accent-color);
    /* Fallback */
}

.form-group input[type="checkbox"]:checked {
    background-color: rgba(212, 163, 115, 0.1);
    border-color: var(--accent-color);
}

.form-group input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.form-group input[type="checkbox"]:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.08);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}