/* Dr. Alok Aggarwal - Premium Admin Panel Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #0f172a;       /* Slate 900 */
    --primary-light: #1e293b; /* Slate 800 */
    --primary-muted: #334155; /* Slate 700 */
    --accent: #6366f1;        /* Indigo 500 */
    --accent-hover: #4f46e5;  /* Indigo 600 */
    --accent-light: rgba(99, 102, 241, 0.1);
    --bg-main: #f8fafc;       /* Slate 50 */
    --bg-card: #ffffff;
    --text-color: #334155;    /* Slate 700 */
    --text-dark: #0f172a;     /* Slate 900 */
    --text-muted: #64748b;    /* Slate 500 */
    --border: #e2e8f0;        /* Slate 200 */
    --white: #ffffff;
    --danger: #f43f5e;        /* Rose 500 */
    --danger-hover: #e11d48;
    --success: #10b981;       /* Emerald 500 */
    --success-light: rgba(16, 185, 129, 0.12);
    
    /* Layout & Shadow constants */
    --sidebar-width: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.03), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Sidebar Navigation
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, #090d16 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand i {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* Sidebar Profile Box */
.sidebar-profile {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.sidebar-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.sidebar-role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-role-badge.role-admin {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.sidebar-role-badge.role-manager {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.sidebar-role-badge.role-editor {
    background: rgba(20, 184, 166, 0.15);
    color: #99f6e4;
    border: 1px solid rgba(20, 184, 166, 0.3);
}
.sidebar-role-badge.role-user {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 0.35rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-item a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-item a:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-item.active a {
    color: var(--white);
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar-item.active a i {
    color: var(--white);
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: var(--transition);
}

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

/* ============================================================
   Main Content Area
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    width: calc(100% - var(--sidebar-width));
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.admin-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    background: var(--bg-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.admin-user i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ============================================================
   Dashboard Statistics Cards
   ============================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.dash-card {
    background-color: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.dash-card-info h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.75px;
    margin-bottom: 0.5rem;
}

.dash-card-info p {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.dash-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

/* ============================================================
   Forms & Cards
   ============================================================ */
.admin-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.admin-card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

/* Input Fields */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #f8fafc;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1em;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-color);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.btn-danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.25);
    transform: translateY(-1px);
}

/* ============================================================
   Tables System
   ============================================================ */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    text-align: left;
}

.admin-table th {
    background-color: #f8fafc;
    padding: 1.1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--primary-muted);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    color: var(--text-color);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Avatar badge inside user list */
.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ============================================================
   Badges & Pills
   ============================================================ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: capitalize;
}

.role-badge.badge-admin {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.15);
}
.role-badge.badge-manager {
    background-color: rgba(168, 85, 247, 0.1);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.role-badge.badge-editor {
    background-color: rgba(13, 148, 136, 0.1);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.15);
}
.role-badge.badge-user {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.15);
}

/* Permission Pills */
.permission-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 4px;
}

.permission-pill.pill-all {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
    font-weight: 600;
}

.permission-pill.pill-none {
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.15);
    font-weight: 600;
}

.permission-pill.pill-active {
    background-color: #f1f5f9;
    color: var(--text-color);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.permission-pill.pill-active i {
    color: var(--accent);
    font-size: 0.7rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-new {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.badge-read {
    background-color: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ============================================================
   Custom Permission Widget Card Checks
   ============================================================ */
.permission-item-card {
    display: block;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.permission-item-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.permission-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    transition: var(--transition);
}

.permission-item-card:hover .permission-item-content {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.permission-item-card input[type="checkbox"]:checked + .permission-item-content {
    border-color: var(--accent);
    background-color: rgba(99, 102, 241, 0.03);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.04);
}

.permission-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: #e2e8f0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.permission-item-card input[type="checkbox"]:checked + .permission-item-content .permission-icon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.permission-text h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.permission-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* ============================================================
   Alert Notifications
   ============================================================ */
.alert {
    padding: 1.1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert-danger {
    background-color: rgba(244, 63, 94, 0.08);
    color: #9f1239;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

/* ============================================================
   Login Page Upgrade
   ============================================================ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #080c14 100%);
    position: relative;
    overflow: hidden;
}

/* Adding subtle background lighting circles */
.login-body::before, .login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.25;
}

.login-body::before {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: -10%;
    left: -10%;
}

.login-body::after {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -10%;
    right: -10%;
}

.login-card {
    background-color: var(--white);
    padding: 3.5rem 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 440px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============================================================
   Admin Table — Global Alignment
   ============================================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead tr {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border);
}

.admin-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-dark);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.03);
}

.admin-table .actions-cell {
    white-space: nowrap;
}

/* ============================================================
   Common Media Gallery Styles
   ============================================================ */

/* Drag & Drop Upload container */
.upload-drop-container {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background-color: #f8fafc;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-drop-container:hover, .upload-drop-container.dragover {
    border-color: var(--accent);
    background-color: rgba(99, 102, 241, 0.03);
}

.upload-drop-container h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-muted);
}

/* Upload Progress Items */
.upload-progress-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

/* Gallery Grid */
.gallery-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-grid-container.modal-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    max-height: 480px;
    overflow-y: auto;
    padding: 0.25rem;
}

.gallery-item-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background-color: #f8fafc;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.gallery-item-wrapper:hover {
    transform: scale(1.02);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.gallery-item-wrapper.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
}

.gallery-item-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery Sidebar details */
.gallery-details-panel, .modal-gallery-sidebar {
    background: #ffffff;
    border-radius: var(--radius-md);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Popup Window Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
    from { background: rgba(15, 23, 42, 0); }
    to { background: rgba(15, 23, 42, 0.4); }
}

.gallery-modal-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    width: 92%;
    max-width: 980px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    animation: scaleInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleInModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: var(--accent);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

.gallery-modal-body {
    padding: 1.5rem 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Modal Tabs */
.modal-gallery-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.25rem;
    gap: 1.5rem;
}

.modal-gallery-tabs .tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.25rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: -2px;
    transition: var(--transition);
}

.modal-gallery-tabs .tab-btn:hover {
    color: var(--primary);
}

.modal-gallery-tabs .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Tab panes */
.tab-content-pane {
    display: none;
    flex-grow: 1;
    flex-direction: column;
}

.tab-content-pane.active {
    display: flex;
}

/* Split layout inside Browse */
.gallery-modal-split-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 1.75rem;
    flex-grow: 1;
    overflow: hidden;
}

.modal-gallery-sidebar {
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
    overflow-y: auto;
    max-height: 480px;
}

.detail-preview-container.mini {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.detail-preview-container.mini img {
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
    border-radius: 4px;
}
