/* ============================================
   OSEAN Gallery - Dashboard Styles
   ============================================ */

:root {
    --primary: #135bec;
    --primary-hover: #1a6bff;
    --primary-glow: rgba(19, 91, 236, 0.25);
    --bg-dark: #111722;
    --surface-dark: #1a2233;
    --surface-dark-2: #1e2a3d;
    --surface-dark-3: #222e42;
    --border-dark: #2a3548;
    --border-dark-2: #334155;
    --text-white: #f1f5f9;
    --text-light: #cbd5e1;
    --text-muted: #64748b;
    --text-dim: #475569;
    --green-badge: #22c55e;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 240px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ============================================
   LAYOUT
   ============================================ */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--surface-dark);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 200;
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.sidebar-top {
    padding: 1.5rem 1rem 1rem;
}

/* --- Logo --- */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem;
    margin-bottom: 2rem;
}

.sidebar-logo-icon {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- Nav Links --- */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-link:hover {
    background-color: var(--surface-dark-3);
    color: var(--text-white);
}

.sidebar-link.active {
    color: var(--primary);
    background-color: rgba(19, 91, 236, 0.1);
}

.sidebar-link .material-symbols-outlined {
    font-size: 22px;
}

/* --- User / Bottom --- */
.sidebar-bottom {
    padding: 1rem;
    border-top: 1px solid var(--border-dark);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: var(--surface-dark-3);
    color: var(--text-muted);
    flex-shrink: 0;
}

.user-avatar .material-symbols-outlined {
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--surface-dark-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    color: var(--text-white);
    background-color: var(--border-dark);
}

.logout-btn .material-symbols-outlined {
    font-size: 18px;
}

/* --- Sidebar Overlay (mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ============================================
   MAIN AREA
   ============================================ */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Top Bar --- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    background-color: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.sidebar-toggle:hover {
    color: var(--text-white);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--text-white);
}

.breadcrumb-sep {
    font-size: 18px;
    color: var(--text-dim);
}

.breadcrumb-current {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-white);
}

/* Notification */
.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.notification-btn:hover {
    color: var(--text-white);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg-dark);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    flex: 1;
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Upload Layout (2 columns) --- */
.upload-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

/* ============================================
   UPLOAD ZONE
   ============================================ */
.upload-zone {
    position: relative;
    background-color: var(--surface-dark);
    border: 2px dashed var(--border-dark-2);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    overflow: hidden;
}

.upload-zone.drag-over {
    border-color: var(--primary);
    background-color: rgba(19, 91, 236, 0.05);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.upload-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.upload-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background-color: var(--surface-dark-3);
    margin-bottom: 1.25rem;
}

.upload-icon {
    font-size: 32px;
    color: var(--text-muted);
}

.upload-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.upload-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.browse-btn {
    padding: 0.625rem 1.5rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px var(--primary-glow);
}

.browse-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Upload Preview */
.upload-preview {
    display: none;
    position: relative;
}

.upload-preview.active {
    display: block;
}

.preview-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    color: white;
    transition: background var(--transition-fast);
}

.remove-preview:hover {
    background: rgba(220, 38, 38, 0.8);
}

.remove-preview .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================
   DETAILS CARD
   ============================================ */
.details-card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.card-heading {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* Form Fields */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background-color: var(--surface-dark-2);
    color: var(--text-white);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 0.6875rem 0.875rem;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-base);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-input.has-icon {
    padding-left: 2.5rem;
}

/* Select */
.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================
   SIDEBAR CARDS (Publishing, EXIF)
   ============================================ */
.upload-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

.sidebar-card .card-heading {
    margin-bottom: 1rem;
}

/* Meta rows */
.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.meta-row+.meta-row {
    border-top: 1px solid var(--border-dark);
}

.meta-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: white;
    background-color: var(--green-badge);
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

/* Publish / Draft buttons */
.publish-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-top: 1.25rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px var(--primary-glow);
}

.publish-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.publish-btn .material-symbols-outlined {
    font-size: 20px;
}

.draft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6875rem 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    margin-top: 0.625rem;
    transition: all var(--transition-fast);
}

.draft-btn:hover {
    background-color: var(--surface-dark-3);
    border-color: var(--border-dark-2);
}

/* EXIF */
.exif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.exif-header .card-heading {
    margin-bottom: 0;
}

.exif-auto {
    font-size: 0.6875rem;
    color: var(--text-dim);
    font-style: italic;
}

.exif-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.exif-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exif-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exif-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
}

.exif-hint {
    font-size: 0.8125rem;
    color: var(--text-dim);
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    animation: fadeUp 0.5s ease both;
}

.stat-card:nth-child(2) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.15s;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-icon .material-symbols-outlined {
    font-size: 26px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.125rem;
}

.storage-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

/* Stats Content Grid */
.stats-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

.stats-content-grid .sidebar-card {
    min-width: 0;
    overflow: hidden;
}

.stats-content-grid .recent-list {
    max-height: 420px;
    overflow-y: auto;
}

/* Category Breakdown */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cat-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: capitalize;
}

.cat-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cat-bar-bg {
    height: 6px;
    background-color: var(--surface-dark-3);
    border-radius: 3px;
    overflow: hidden;
}

.cat-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Recent Uploads List */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.recent-item:hover {
    background-color: var(--surface-dark-2);
}

.recent-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.recent-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.recent-title {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Visibility badges */
.vis-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.175rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: capitalize;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.vis-badge:hover {
    opacity: 0.8;
}

.vis-badge.vis-public {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.vis-badge.vis-draft {
    background-color: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-dark);
    white-space: nowrap;
}

.data-table td {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-dark);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: var(--surface-dark-2);
}

.table-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.table-title {
    font-weight: 600;
    color: var(--text-white);
}

.table-cat {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.table-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.table-size {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .action-btn {
    display: inline-flex;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.action-btn:hover {
    background-color: var(--surface-dark-3);
    color: var(--text-white);
}

.action-btn .material-symbols-outlined {
    font-size: 18px;
}

.action-btn.edit-btn:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.action-btn.delete-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* ============================================
   GALLERY TOOLBAR
   ============================================ */
.gallery-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    flex: 1;
    min-width: 200px;
}

.toolbar-search .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
}

.toolbar-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
}

.toolbar-input::placeholder {
    color: var(--text-dim);
}

.toolbar-select {
    background-color: var(--surface-dark);
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.toolbar-select:focus {
    border-color: var(--primary);
}

/* ============================================
   TABLE PAGINATION
   ============================================ */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.page-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn-sm:hover {
    background-color: var(--surface-dark-3);
    color: var(--text-white);
}

.page-btn-sm.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    animation: modalSlide 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.modal-header h3 {
    font-size: 1.0625rem;
    font-weight: 700;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--surface-dark-3);
    color: var(--text-white);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-dark);
}

.modal-footer .publish-btn,
.modal-footer .draft-btn {
    margin-top: 0;
    flex: 1;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.375rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   SETTINGS LAYOUT
   ============================================ */
.settings-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-header-row .card-heading {
    margin-bottom: 0;
}

/* Settings layout card sizing */
.settings-layout .sidebar-card {
    flex: 1;
}

.settings-layout .sidebar-card:nth-child(2) {
    flex: 2;
}

.settings-msg {
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    min-height: 1.25rem;
}

/* Logo Upload */
.logo-upload-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background-color: var(--surface-dark-2);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-preview .material-symbols-outlined {
    font-size: 28px;
    color: var(--text-dim);
}

.logo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.logo-actions .browse-btn,
.logo-actions .draft-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.logo-actions .draft-btn {
    margin-top: 0;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Topbar action btn */
.topbar-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.topbar-action-btn:hover {
    background-color: var(--primary-hover);
}

.topbar-action-btn .material-symbols-outlined {
    font-size: 18px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Large tablets / small laptops */
@media (max-width: 1024px) {
    .upload-layout {
        grid-template-columns: 1fr 260px;
        gap: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 868px) {
    .upload-layout {
        grid-template-columns: 1fr;
    }

    .upload-sidebar {
        flex-direction: row;
        gap: 1rem;
    }

    .sidebar-card {
        flex: 1;
    }

    .settings-layout {
        flex-direction: column;
    }

    .stats-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile: sidebar becomes off-canvas */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar-overlay.active {
        pointer-events: auto;
    }

    .main-area {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .page-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .upload-sidebar {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .upload-zone-inner {
        padding: 2rem 1.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-toolbar {
        flex-direction: column;
    }

    .toolbar-search {
        width: 100%;
    }

    .topbar-action-btn span:last-child {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .page-content {
        padding: 0.75rem;
    }

    .topbar {
        padding: 0.625rem 0.75rem;
    }

    .details-card {
        padding: 1rem;
    }

    .sidebar-card {
        padding: 1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.upload-zone,
.details-card,
.sidebar-card {
    animation: fadeUp 0.5s ease both;
}

.details-card {
    animation-delay: 0.1s;
}

.sidebar-card:nth-child(1) {
    animation-delay: 0.15s;
}

.sidebar-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* Selection */
::selection {
    background-color: rgba(19, 91, 236, 0.3);
    color: var(--text-white);
}

/* ============================================
   UPLOAD FREEZE OVERLAY
   ============================================ */
.upload-freeze-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(1px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.upload-freeze-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.upload-freeze-content p,
.upload-freeze-content .overlay-progress-text {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.overlay-progress-text {
    font-size: 0.75rem !important;
    color: var(--text-white) !important;
    margin-top: 0.25rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}