@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FEFEFE;
    --border-light: #E2E8F0;
    --border-subtle: #F1F5F9;

    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --text-inverse: #FFFFFF;

    --accent-rose: #F43F5E;
    --accent-violet: #8B5CF6;
    --accent-blue: #3B82F6;
    --accent-emerald: #10B981;
    --accent-amber: #F59E0B;
    --accent-orange: #F97316;
    --accent-cyan: #06B6D4;
    --accent-pink: #EC4899;

    --gradient-accent: linear-gradient(135deg, var(--accent-rose), var(--accent-violet));
    --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(244, 63, 94, 0.06), transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.06), transparent 50%),
                   radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.04), transparent 50%),
                   radial-gradient(ellipse at 60% 40%, rgba(253, 186, 116, 0.03), transparent 40%);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 24px rgba(236, 72, 153, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --nav-height: 64px;
    --mobile-nav-height: 64px;
    --sidebar-width: 240px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100dvh;
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--gradient-bg);
    pointer-events: none;
    z-index: 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ---- Typography ---- */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ---- Layout ---- */
.app-shell {
    display: flex;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 8px;
}

.sidebar-brand h1 {
    font-size: 1.25rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand .subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 8px 12px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
}

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

.nav-item.active {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08), rgba(139, 92, 246, 0.08));
    color: var(--accent-rose);
}

.nav-item .icon { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: 100dvh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

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

.stat-card {
    text-align: center;
    padding: 24px 20px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ---- Grid ---- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

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

.btn-secondary:hover { background: var(--border-subtle); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

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

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ---- Form Elements ---- */
.input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    background: var(--bg-card);
    color: var(--text-primary);
    min-height: 44px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

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

select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

textarea.input { min-height: 80px; resize: vertical; }

label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 6px; }

.form-group { margin-bottom: 16px; }

/* ---- Upload Zone ---- */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
    padding: 56px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.02), rgba(167, 139, 250, 0.03), rgba(236, 72, 153, 0.02));
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-rose);
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.05), rgba(139, 92, 246, 0.05));
    box-shadow: var(--shadow-glow);
}

.upload-zone .upload-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.upload-zone .upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-zone .upload-hint {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ---- Item Grid ---- */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.item-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--border-subtle);
    transition: all 0.25s ease;
}

.item-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.item-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-card .item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-end;
    padding: 10px;
}

.item-card:hover .item-overlay { opacity: 1; }

.item-card .item-overlay .item-title {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card .item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.item-card .badge {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    backdrop-filter: blur(8px);
}

.doc-card {
    aspect-ratio: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-card .doc-icon { font-size: 2rem; }

.doc-card .doc-info { flex: 1; min-width: 0; }

.doc-card .doc-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card .doc-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ---- Category Cards ---- */
.category-card {
    padding: 24px;
    text-align: center;
    cursor: pointer;
}

.category-card .cat-icon { font-size: 2.5rem; margin-bottom: 10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08)); }
.category-card .cat-name { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; }
.category-card .cat-count { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 4px; }

/* ---- Timeline ---- */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-accent);
    border-radius: 1px;
}

.timeline-group { margin-bottom: 32px; }

.timeline-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-base);
    padding: 8px 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.timeline-header::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--gradient-accent);
    box-shadow: 0 0 0 4px var(--bg-base);
}

.timeline-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.timeline-strip::-webkit-scrollbar { display: none; }

.timeline-thumb {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.timeline-thumb:hover { transform: scale(1.05); }
.timeline-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

.lightbox-meta .meta-title { font-size: 1.1rem; font-weight: 600; }
.lightbox-meta .meta-detail { font-size: 0.8rem; opacity: 0.7; margin-top: 4px; }

.lightbox-actions {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
}

.lightbox-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-action:hover { background: rgba(255,255,255,0.2); }
.lightbox-action.active { background: var(--accent-rose); }

/* ---- Search ---- */
.search-bar {
    position: relative;
    max-width: 480px;
}

.search-bar input {
    padding-left: 44px;
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

/* ---- Progress Bar ---- */
.progress-bar {
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ---- Upload Preview ---- */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.upload-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--border-subtle);
}

.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }

.upload-thumb .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.upload-thumb .upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--accent-emerald); }
.toast.error { border-left: 3px solid var(--accent-rose); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state .empty-text { color: var(--text-secondary); }

/* ---- Folders ---- */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s;
}

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

.folder-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.folder-name {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 4px;
}

.folder-meta {
    text-align: center;
    font-size: 0.8rem;
}

.shared-badge {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumbs a:hover, .breadcrumbs a.active {
    color: var(--accent-rose);
}

.breadcrumb-sep {
    margin: 0 4px;
    color: var(--text-tertiary);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    backdrop-filter: blur(4px);
}

/* ---- Login ---- */
.login-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 6px;
    font-size: 1.5rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
}

.login-card .login-error {
    background: rgba(244, 63, 94, 0.08);
    color: var(--accent-rose);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ---- Settings ---- */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.storage-bar {
    height: 8px;
    background: var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.storage-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 4px;
}

/* ---- Mobile ---- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    z-index: 100;
    padding: 0 8px;
}

.mobile-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-weight: 500;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    transition: color 0.2s;
}

.mobile-nav-item .nav-icon { font-size: 1.3rem; }

.mobile-nav-item.active {
    color: var(--accent-rose);
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 90;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header h1 {
    font-size: 1.1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }

    .mobile-nav { display: block; }
    .mobile-header { display: flex; }

    .main-content {
        margin-left: 0;
        padding: 80px 16px 80px;
    }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .item-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }

    .upload-zone { padding: 32px 16px; }
    .upload-zone .upload-icon { font-size: 2rem; }

    .lightbox-meta { padding: 16px; }

    .timeline-thumb { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
    .item-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ---- Utilities ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
