/* ============================================
   GOURMET CMS - ADMIN PANEL STYLES v2.0
   Mimar: Umitcan Cinar
   ============================================ */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #20243a;
    --bg-card-hover: #252942;
    --border: #2e3350;
    --text-primary: #e8eaf6;
    --text-secondary: #8890bb;
    --text-muted: #555e8a;
    --accent: #c9a84c;
    --accent-hover: #e0bc60;
    --accent-dark: #7a6020;
    --success: #2ecc71;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --blue: #3498db;
    --purple: #9b59b6;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
}

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

body.admin-body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   LOGIN
   ============================================ */
.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0c14 0%, #1a1d27 50%, #0f1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.login-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-overlay.hidden {
    display: none;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px 40px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

@keyframes shake {

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

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

.login-box.shake {
    animation: shake 0.4s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 36px;
    color: var(--accent);
}

.login-logo h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 8px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.login-form .input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    margin-bottom: 14px;
    transition: border-color var(--transition);
}

.login-form .input-group:focus-within {
    border-color: var(--accent);
}

.login-form .input-group i {
    color: var(--text-muted);
    font-size: 15px;
    flex-shrink: 0;
}

.login-form .input-group input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    padding: 14px 0;
    width: 100%;
}

.login-form .input-group input::placeholder {
    color: var(--text-muted);
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #000;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    margin-top: 6px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.4);
}

.login-error-msg {
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.admin-dashboard.hidden {
    display: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand i {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.sidebar-brand .brand-name {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 2px;
    white-space: nowrap;
}

.sidebar-brand .brand-sub {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    letter-spacing: 1px;
}

.sidebar-collapse-btn {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all var(--transition);
}

.sidebar-collapse-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar.collapsed .nav-group-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    transition: opacity var(--transition);
    white-space: nowrap;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.sidebar.collapsed .nav-badge {
    display: none;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.view-site-btn,
.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.view-site-btn {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: none;
}

.view-site-btn:hover {
    color: var(--accent);
    border-color: var(--accent-dark);
}

.logout-btn {
    color: var(--danger);
    border: 1px solid transparent;
    background: none;
    border-color: rgba(231, 76, 60, 0.3);
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.sidebar.collapsed .view-site-btn span,
.sidebar.collapsed .logout-btn span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .view-site-btn i,
.sidebar.collapsed .logout-btn i {
    margin: 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

/* TOPBAR */
.admin-topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-sidebar-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.breadcrumb {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reset-site-btn {
    background: none;
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--danger);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.reset-site-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 15px;
}

/* ============================================
   PANELS
   ============================================ */
.panels-container {
    flex: 1;
    padding: 32px 28px;
}

.panel {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.panel.active {
    opacity: 1;
    transform: translateY(0);
}

.panel.hidden {
    display: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.panel-header h1 {
    font-size: 22px;
    font-weight: 700;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================
   STATS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
}

.stat-card.accent-gold::after {
    background: var(--accent);
}

.stat-card.accent-green::after {
    background: var(--success);
}

.stat-card.accent-blue::after {
    background: var(--blue);
}

.stat-card.accent-purple::after {
    background: var(--purple);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card.accent-gold .stat-icon {
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
}

.stat-card.accent-green .stat-icon {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success);
}

.stat-card.accent-blue .stat-icon {
    background: rgba(52, 152, 219, 0.15);
    color: var(--blue);
}

.stat-card.accent-purple .stat-icon {
    background: rgba(155, 89, 182, 0.15);
    color: var(--purple);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-body h2 {
    font-size: 28px;
    font-weight: 800;
}

/* ============================================
   OVERVIEW
   ============================================ */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.overview-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.overview-card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.overview-card-header h3 i {
    color: var(--accent);
    margin-right: 8px;
}

.view-all-link {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--transition);
}

.view-all-link:hover {
    opacity: 0.7;
}

.recent-res-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.recent-res-item:last-child {
    border-bottom: none;
}

.recent-res-info strong {
    display: block;
    font-size: 14px;
}

.recent-res-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.quick-action-btn i {
    color: var(--accent);
}

.quick-action-btn:hover {
    border-color: var(--accent-dark);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

/* ============================================
   TWO-COL LAYOUT
   ============================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-width: 0;
}

/* ============================================
   EDIT CARDS
   ============================================ */
.edit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    min-width: 0;
    overflow: hidden;
}

.edit-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-card h3 i {
    color: var(--accent);
}

.edit-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 12px;
    color: var(--text-secondary);
}

.edit-card.max-w-lg {
    max-width: 620px;
}

/* FORM ELEMENTS */
.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition);
    outline: none;
}

.field-input:focus {
    border-color: var(--accent);
}

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

.field-textarea {
    resize: vertical;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row.flex-3-1 {
    grid-template-columns: 3fr 1fr;
}

.flex-3 {
    flex: 3;
}

.flex-1 {
    flex: 1;
}

.flex-0 {
    flex: 0;
}

.form-field.flex-3,
.form-field.flex-1,
.form-field.flex-0 {
    flex: inherit;
}

.field-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* IMAGE PREVIEW */
.img-preview-box {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    margin-top: 10px;
    overflow: hidden;
}

.img-preview-box i {
    font-size: 32px;
}

.img-preview-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.img-preview-box p {
    font-size: 12px;
}

.img-preview-sm {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    max-height: 130px;
}

.img-preview-sm img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

/* BUTTONS */
.btn-primary,
.btn-save,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.4);
}

.btn-save {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.25);
}

.w-full {
    width: 100%;
    justify-content: center;
}

.mt-1 {
    margin-top: 12px;
}

/* ICON BUTTONS */
.btn-icon-edit,
.btn-icon-danger {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
}

.btn-icon-edit {
    background: rgba(52, 152, 219, 0.15);
    color: var(--blue);
}

.btn-icon-edit:hover {
    background: rgba(52, 152, 219, 0.3);
}

.btn-icon-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.btn-icon-danger:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* ============================================
   TABLE
   ============================================ */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    white-space: nowrap;
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================
   SORTABLE LIST
   ============================================ */
.sortable-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.sortable-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: grab;
    transition: all var(--transition);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.sortable-item:hover {
    border-color: var(--accent-dark);
}

.sortable-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.sortable-item.drag-over {
    border-color: var(--accent);
    background: rgba(201, 168, 76, 0.08);
}

.drag-handle {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}

/* Nav link rows: text wrapper takes all space, actions stay right */
.item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.item-label {
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-sub {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.item-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Menu rows use item-info instead of item-text */
.menu-item-row .item-info {
    flex: 1;
    min-width: 0;
}

.item-info .item-label {
    max-width: 100%;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.item-info .item-sub {
    flex: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.menu-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================
   GALLERY ADMIN GRID
   ============================================ */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.gallery-admin-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: all var(--transition);
}

.gallery-admin-item:hover {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.gallery-item-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-admin-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-label {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   TOAST
   ============================================ */
.admin-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.admin-toast.success i {
    color: var(--success);
}

.admin-toast.error i {
    color: var(--danger);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-box.modal-sm {
    max-width: 400px;
}

.modal-box h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

/* ============================================
   HELP TEXT & MISC
   ============================================ */
.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state {
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .mobile-sidebar-btn {
        display: flex;
    }

    .panels-container {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-admin-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 32px 24px;
        width: calc(100% - 32px);
    }
}

/* ========================================
   DRAG-DROP UPLOAD AREA
   ======================================== */
/* DRAG-DROP IMAGE UPLOAD (REMOVED) */
.drag-drop-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.img-preview-sm {
    margin-top: 8px;
    max-height: 120px;
    overflow: hidden;
    border-radius: 8px;
}

.img-preview-sm img {
    max-height: 120px;
    max-width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

/* ========================================
   LOGS PANEL STYLES
   ======================================== */
.logs-table-wrapper {
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
    border-radius: 10px;
}

.logs-table-wrapper::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.logs-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 4px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.logs-table th {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.logs-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    vertical-align: middle;
}

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

.logs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}