/* ============================================
   Bell Vault - Dark Premium Dashboard
   ============================================ */

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

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a26;
    --bg-sidebar: #0e0e16;
    --border: #24243a;
    --border-light: #2a2a42;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #5a5a78;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   Login Page
   ============================================ */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #14142a 0%, var(--bg-primary) 60%);
    padding: 20px;
}

.login-container {
    width: 100%; max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

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

.login-logo h1 {
    font-size: 2rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

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

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Layout
   ============================================ */
.app-layout {
    display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex; align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
    font-size: 1.25rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1; overflow-y: auto; padding: 16px 12px;
}

.sidebar-nav .nav-label {
    font-size: 0.7rem; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: 1.5px;
    padding: 12px 12px 6px; font-weight: 600;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 0.875rem;
    font-weight: 500; transition: var(--transition);
    margin: 2px 0;
}

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

.nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item svg, .nav-item .nav-icon {
    width: 20px; height: 20px; flex-shrink: 0;
    opacity: 0.8;
}

.nav-item.active svg, .nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
    padding: 16px; border-top: 1px solid var(--border);
}

.sidebar-footer .user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #fff;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.main-header {
    height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(20px);
}

.main-header h2 {
    font-size: 1.15rem; font-weight: 700;
}

.page-content {
    flex: 1; padding: 28px;
    animation: fadeIn 0.4s ease-out;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none; background: none; border: none;
    color: var(--text-primary); cursor: pointer;
    padding: 8px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

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

.card-header h3 {
    font-size: 1rem; font-weight: 600;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 4px 0 0 4px;
}

.stat-card.accent::before { background: var(--accent); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }

.stat-label {
    font-size: 0.75rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    font-weight: 600; margin-bottom: 6px;
}

.stat-value {
    font-size: 1.75rem; font-weight: 800;
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

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

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

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    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='%238888a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 20px;
    border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.85rem;
    font-weight: 600; cursor: pointer;
    transition: var(--transition);
    outline: none; text-decoration: none;
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

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

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.btn-icon {
    width: 36px; height: 36px; padding: 0;
    border-radius: var(--radius-sm);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================
   Project Cards
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.project-card-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
}

.project-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700;
    color: var(--accent); overflow: hidden;
    flex-shrink: 0;
}

.project-icon img {
    width: 100%; height: 100%; object-fit: cover;
}

.project-name {
    font-size: 1rem; font-weight: 700;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.82rem; color: var(--text-secondary);
    margin-bottom: 14px; line-height: 1.5;
}

.project-links {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 14px;
}

.project-link-btn {
    padding: 5px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    background: var(--accent-glow); color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.2);
    cursor: pointer; transition: var(--transition);
    text-decoration: none; display: inline-flex;
    align-items: center; gap: 4px;
}

.project-link-btn:hover {
    background: var(--accent); color: #fff;
}

.project-tags {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-top: 10px;
}

.tag {
    padding: 3px 10px; border-radius: 12px;
    font-size: 0.7rem; font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent); border: 1px solid rgba(99, 102, 241, 0.15);
}

.category-badge {
    padding: 3px 10px; border-radius: 12px;
    font-size: 0.7rem; font-weight: 600;
    display: inline-block;
}

.project-actions {
    display: flex; gap: 6px; margin-top: 14px;
    padding-top: 14px; border-top: 1px solid var(--border);
}

/* ============================================
   File List
   ============================================ */
.file-list { display: flex; flex-direction: column; gap: 8px; }

.file-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.file-item:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.file-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.file-icon.pdf { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.file-icon.zip { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.file-icon.img { background: rgba(99, 102, 241, 0.15); color: var(--accent); }

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

.file-name {
    font-size: 0.9rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem; color: var(--text-muted);
    display: flex; gap: 12px; margin-top: 2px;
}

.file-actions { display: flex; gap: 6px; }

.file-preview {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    object-fit: cover;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative; aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden; cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

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

.gallery-item .gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.7));
    opacity: 0; transition: var(--transition);
    display: flex; align-items: flex-end;
    padding: 12px;
}

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

.gallery-overlay .gallery-name {
    font-size: 0.78rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Gallery drop zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px; text-align: center;
    transition: var(--transition);
    cursor: pointer; margin-bottom: 20px;
}

.drop-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.drop-zone p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================
   Notes
   ============================================ */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

.note-card:hover {
    border-color: var(--border-light);
}

.note-card.pinned {
    border-color: var(--warning);
    border-left: 3px solid var(--warning);
}

.note-title {
    font-size: 0.95rem; font-weight: 700;
    margin-bottom: 8px;
}

.note-preview {
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.6; max-height: 80px;
    overflow: hidden;
}

.note-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--border);
}

.note-date {
    font-size: 0.72rem; color: var(--text-muted);
}

/* ============================================
   Crypto Dashboard
   ============================================ */
.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px; margin-bottom: 24px;
}

.crypto-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px; transition: var(--transition);
}

.crypto-card:hover { border-color: var(--border-light); }

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

.crypto-name {
    display: flex; align-items: center; gap: 10px;
}

.crypto-symbol {
    font-weight: 800; font-size: 1.1rem;
}

.crypto-fullname {
    font-size: 0.78rem; color: var(--text-muted);
}

.crypto-price {
    font-size: 1.4rem; font-weight: 800;
    margin-bottom: 4px;
}

.crypto-change { font-size: 0.8rem; font-weight: 600; }
.crypto-change.positive { color: var(--success); }
.crypto-change.negative { color: var(--danger); }

.crypto-holdings {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--border);
}

.crypto-amount-input {
    display: flex; gap: 8px; align-items: center;
    margin-top: 8px;
}

.crypto-amount-input input {
    flex: 1; padding: 8px 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: inherit; font-size: 0.85rem;
    outline: none;
}

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

.crypto-total {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px; text-align: center;
    margin-bottom: 24px;
}

.crypto-total-value {
    font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(135deg, var(--success), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crypto-total-label {
    font-size: 0.8rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    margin-top: 4px;
}

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.show { display: flex; }

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

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.05rem; font-weight: 700; }

.modal-close {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 1.5rem; line-height: 1;
    padding: 4px; transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--border);
}

/* Lightbox for gallery */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none; align-items: center; justify-content: center;
    z-index: 1100; padding: 40px; cursor: pointer;
}

.lightbox.show { display: flex; }

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

/* ============================================
   Flash Messages
   ============================================ */
.flash {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 500;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.flash.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.flash.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* ============================================
   Search Bar
   ============================================ */
.search-bar {
    position: relative; margin-bottom: 20px;
}

.search-bar input {
    width: 100%; padding: 10px 14px 10px 40px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: inherit; font-size: 0.9rem;
    outline: none; transition: var(--transition);
}

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

.search-bar svg, .search-bar .search-icon {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    width: 18px; height: 18px;
}

/* ============================================
   Toolbar
   ============================================ */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}

.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 10px; align-items: center; }

/* ============================================
   Settings Page
   ============================================ */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 1rem; font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sessions-list { display: flex; flex-direction: column; gap: 8px; }

.session-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.session-item .session-info { color: var(--text-secondary); }
.session-item .session-ip { font-weight: 600; color: var(--text-primary); }

.categories-list { display: flex; flex-direction: column; gap: 6px; }

.category-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.category-item .cat-color {
    width: 14px; height: 14px; border-radius: 50%;
    margin-right: 8px; display: inline-block;
}

/* ============================================
   Editor toolbar (notes)
   ============================================ */
.editor-toolbar {
    display: flex; gap: 4px; padding: 8px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--bg-input);
}

.editor-toolbar button {
    width: 32px; height: 32px;
    background: transparent; border: none;
    color: var(--text-secondary);
    border-radius: 4px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
    transition: var(--transition);
}

.editor-toolbar button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.note-editor {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    min-height: 200px; padding: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit; font-size: 0.9rem;
    outline: none; line-height: 1.7;
}

.note-editor:focus { border-color: var(--accent); }

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px; height: 64px;
    margin-bottom: 16px; opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.1rem; font-weight: 600;
    margin-bottom: 8px; color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
}

/* ============================================
   Chart container
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

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

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

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }

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

    .menu-toggle { display: block; }

    .page-content { padding: 16px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .notes-grid { grid-template-columns: 1fr; }
    .crypto-grid { grid-template-columns: 1fr; }

    .toolbar {
        flex-direction: column; align-items: stretch;
    }

    .modal { max-width: 100%; margin: 0 10px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.3rem; }
    .crypto-total-value { font-size: 1.8rem; }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.show { display: block; }

/* ============================================
   Loading spinner
   ============================================ */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Utility
   ============================================ */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }
