/**
 * ═══════════════════════════════════════════════════════════════════════════
 * NOTES APP - PREMIUM CLAYMORPHISM iOS STYLE CSS
 * Complete claymorphic redesign with 3D molded aesthetics
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES - CLAYMORPHISM DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Background Colors - Warm Cream Palette */
    --bg-primary: #FAF8F5;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F5F2EE;
    --bg-card: #FFFFFF;
    
    /* Claymorphism Shadows - Light Theme */
    --clay-outer: 15px 15px 40px rgba(0, 0, 0, 0.08),
                  -10px -10px 30px rgba(255, 255, 255, 0.9),
                  0 0 0 1px rgba(255, 255, 255, 0.5);
    --clay-inner: inset 6px 6px 12px rgba(0, 0, 0, 0.06),
                  inset -6px -6px 12px rgba(255, 255, 255, 0.8);
    --clay-outer-sm: 8px 8px 20px rgba(0, 0, 0, 0.06),
                     -6px -6px 15px rgba(255, 255, 255, 0.9),
                     0 0 0 1px rgba(255, 255, 255, 0.4);
    --clay-inner-sm: inset 3px 3px 6px rgba(0, 0, 0, 0.05),
                     inset -3px -3px 6px rgba(255, 255, 255, 0.8);
    
    /* Accent Colors - Gold Theme */
    --accent-primary: #FFB703;
    --accent-secondary: #FB8500;
    --accent-gradient: linear-gradient(135deg, #FFB703 0%, #FB8500 100%);
    --accent-glow: rgba(255, 183, 3, 0.4);
    
    /* Folder Colors */
    --folder-gurbani: #8B5CF6;
    --folder-personal: #EC4899;
    --folder-all: #3B82F6;
    
    /* Semantic Colors */
    --color-danger: #FF453A;
    --color-success: #34C759;
    --color-info: #007AFF;
    
    /* Text Colors */
    --text-primary: #1A1D26;
    --text-secondary: #5A5F72;
    --text-tertiary: #9CA3B8;
    --text-muted: rgba(90, 95, 114, 0.5);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 28px;
    --space-xxl: 40px;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Safe Areas */
    --safe-area-top: env(safe-area-inset-top, 20px);
    --safe-area-bottom: env(safe-area-inset-bottom, 34px);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Header Height */
    --header-height: 56px;
}

/* Dark Theme - Support both [data-theme="dark"] and data-theme */
[data-theme="dark"],
html[data-theme="dark"],
[data-theme="dark"] {
    --bg-primary: #1C1C1F;
    --bg-secondary: #2C2C2E;
    --bg-tertiary: #3A3A3C;
    --bg-card: #2C2C2E;
    
    /* Claymorphism Shadows - Dark Theme */
    --clay-outer: 15px 15px 40px rgba(0, 0, 0, 0.4),
                  -10px -10px 30px rgba(255, 255, 255, 0.03),
                  0 0 0 1px rgba(255, 255, 255, 0.05);
    --clay-inner: inset 6px 6px 12px rgba(0, 0, 0, 0.4),
                  inset -6px -6px 12px rgba(255, 255, 255, 0.03);
    --clay-outer-sm: 8px 8px 20px rgba(0, 0, 0, 0.3),
                     -6px -6px 15px rgba(255, 255, 255, 0.02),
                     0 0 0 1px rgba(255, 255, 255, 0.05);
    --clay-inner-sm: inset 3px 3px 6px rgba(0, 0, 0, 0.3),
                     inset -3px -3px 6px rgba(255, 255, 255, 0.02);
    
    /* Text Colors - Dark */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   NOTES APP CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.notes-app {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at top, rgba(247, 198, 52, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.notes-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: var(--safe-area-top);
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .notes-header {
    background: rgba(28, 28, 31, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--space-md);
}

.header-left {
    flex-shrink: 0;
    width: 90px;
}

.header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: calc(100% - 200px);
}

.header-title h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-count {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
    width: 90px;
    justify-content: flex-end;
}

/* Claymorphic Header Buttons */
.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    color: var(--text-primary);
    font-size: 15px;
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.08),
        8px 8px 20px rgba(0, 0, 0, 0.04),
        -10px -10px 30px rgba(255, 255, 255, 0.95),
        0 0 0 2px rgba(255, 255, 255, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .header-btn {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    color: var(--text-primary);
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.4),
        8px 8px 20px rgba(0, 0, 0, 0.2),
        -10px -10px 30px rgba(255, 255, 255, 0.03),
        0 0 0 2px rgba(255, 255, 255, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.05),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.header-btn:active {
    transform: scale(0.94);
    box-shadow:
        inset 10px 10px 30px rgba(0, 0, 0, 0.06),
        inset -6px -6px 20px rgba(255, 255, 255, 0.8),
        0 0 0 2px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .header-btn:active {
    box-shadow:
        inset 10px 10px 30px rgba(0, 0, 0, 0.4),
        inset -6px -6px 20px rgba(255, 255, 255, 0.03),
        0 0 0 2px rgba(255, 255, 255, 0.05);
}

.header-btn.back-btn {
    gap: var(--space-xs);
    width: auto;
    padding: 0 var(--space-md);
    border-radius: var(--radius-full);
}

.back-btn span {
    font-size: 14px;
    font-weight: 600;
    display: none;
}

@media (min-width: 480px) {
    .back-btn span {
        display: inline;
    }
}

/* Search Bar */
.search-bar {
    position: relative;
    padding: 0 var(--space-md) var(--space-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.search-bar.active {
    max-height: 70px;
    opacity: 1;
    padding-top: var(--space-sm);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.04),
        inset 0 -2px 4px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .search-input-wrapper {
    background: var(--bg-tertiary);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 4px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.search-icon {
    position: absolute;
    left: var(--space-md);
    color: var(--text-tertiary);
    font-size: 14px;
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: var(--space-md);
    padding-left: 44px;
    padding-right: 44px;
    font-size: 16px;
    color: var(--text-primary);
    background: transparent;
}

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

.search-clear {
    position: absolute;
    right: var(--space-sm);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    background: rgba(0, 0, 0, 0.04);
    opacity: 0;
    transition: var(--transition-fast);
}

.search-clear.visible {
    opacity: 1;
}

.search-clear:active {
    transform: scale(0.9);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.notes-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    padding-bottom: calc(var(--safe-area-bottom) + 100px);
}

/* Folder Tabs */
.folder-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-lg);
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8EC 100%);
    padding: 5px;
    border-radius: 20px;
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.08),
        8px 8px 20px rgba(0, 0, 0, 0.04),
        -8px -8px 25px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(255, 255, 255, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.4);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

[data-theme="dark"] .folder-tabs {
    background: linear-gradient(145deg, #2C2C2E 0%, #1C1C1F 100%);
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.3),
        8px 8px 20px rgba(0, 0, 0, 0.15),
        -8px -8px 25px rgba(255, 255, 255, 0.02),
        0 0 0 2px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.08);
}

.folder-tabs::-webkit-scrollbar {
    display: none;
}

.folder-tab {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
}

.folder-tab i {
    font-size: 12px;
    flex-shrink: 0;
}

.folder-tab:active {
    transform: scale(0.95);
}

.folder-tab.active {
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    color: #007AFF;
    box-shadow:
        8px 8px 25px rgba(0, 122, 255, 0.15),
        4px 4px 12px rgba(0, 0, 0, 0.08),
        -4px -4px 15px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .folder-tab.active {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    color: #60A5FA;
    box-shadow:
        8px 8px 25px rgba(0, 122, 255, 0.2),
        4px 4px 12px rgba(0, 0, 0, 0.3),
        -4px -4px 15px rgba(255, 255, 255, 0.02),
        0 0 0 2px rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.03),
        inset 0 -2px 4px rgba(0, 122, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.08);
}

.folder-tab[data-folder="gurbani"].active {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: #fff;
    box-shadow:
        8px 8px 25px rgba(139, 92, 246, 0.3),
        4px 4px 12px rgba(0, 0, 0, 0.1),
        -4px -4px 15px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.folder-tab[data-folder="personal"].active {
    background: linear-gradient(135deg, #EC4899, #DB2777);
    color: #fff;
    box-shadow:
        8px 8px 25px rgba(236, 72, 153, 0.3),
        4px 4px 12px rgba(0, 0, 0, 0.1),
        -4px -4px 15px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* Hide on very narrow screens */
@media (max-width: 360px) {
    .folder-tab {
        padding: 8px 8px;
        font-size: 12px;
        gap: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   NOTES LIST - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Note Card - Claymorphic Design */
.note-card {
    position: relative;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .note-card {
    background: linear-gradient(145deg, #2C2C2E 0%, #1C1C1F 100%);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.03),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.note-card:active {
    transform: scale(0.98);
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .note-card:active {
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Pinned Note - Gold Accent */
.note-card.pinned {
    border-color: rgba(255, 183, 3, 0.3);
    background: linear-gradient(145deg, #FFFBF5 0%, #FFF8EB 100%);
}

[data-theme="dark"] .note-card.pinned {
    background: linear-gradient(145deg, #2A2520 0%, #1F1C18 100%);
    border-color: rgba(255, 183, 3, 0.2);
}

.note-card.pinned::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    width: 4px;
    height: calc(100% - 32px);
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
}

/* Note Card Content */
.note-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    padding-left: 8px;
}

.note-card.pinned .note-header {
    padding-left: 12px;
}

.note-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.note-pin {
    color: var(--accent-primary);
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0;
    transition: var(--transition-fast);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 183, 3, 0.1);
}

.note-card.pinned .note-pin {
    opacity: 1;
}

.note-preview {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
    padding-left: 8px;
}

.note-card.pinned .note-preview {
    padding-left: 12px;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--text-tertiary);
    padding-left: 8px;
}

.note-card.pinned .note-meta {
    padding-left: 12px;
}

.note-meta .folder-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-meta .folder-badge.gurbani {
    background: rgba(139, 92, 246, 0.1);
    color: var(--folder-gurbani);
}

.note-meta .folder-badge.personal {
    background: rgba(236, 72, 153, 0.1);
    color: var(--folder-personal);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl);
    width: 100%;
}

.empty-state.visible {
    display: flex;
}

.empty-illustration {
    position: relative;
    margin-bottom: var(--space-xl);
}

.empty-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    border-radius: 36px;
    font-size: 48px;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.08),
        10px 10px 30px rgba(0, 0, 0, 0.04),
        -15px -15px 40px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .empty-icon {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.3),
        10px 10px 30px rgba(0, 0, 0, 0.15),
        -15px -15px 40px rgba(255, 255, 255, 0.02),
        0 0 0 2px rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.03),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.08);
}

.empty-glow {
    position: absolute;
    inset: -20px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.5;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.empty-state h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    max-width: 200px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.empty-state p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 280px;
    margin-bottom: var(--space-xxl);
    line-height: 1.6;
}

.empty-cta {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.fab {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 30px);
    right: var(--space-lg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 90;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-glow {
    position: absolute;
    inset: -15px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

.fab-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 50%;
    font-size: 24px;
    color: #000;
    box-shadow:
        15px 15px 40px rgba(255, 183, 3, 0.35),
        8px 8px 20px rgba(0, 0, 0, 0.15),
        -10px -10px 30px rgba(255, 255, 255, 0.8),
        0 0 0 3px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab:hover {
    transform: scale(1.08);
}

.fab:hover .fab-glow {
    opacity: 0.7;
    inset: -20px;
    filter: blur(30px);
}

.fab:active {
    transform: scale(0.94);
}

.fab:active .fab-icon {
    box-shadow:
        inset 8px 8px 20px rgba(0, 0, 0, 0.15),
        inset -4px -4px 12px rgba(255, 255, 255, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   EDITOR OVERLAY - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-primary);
    transform: translateX(100%);
    transition: transform var(--transition-spring);
}

.editor-overlay.active {
    transform: translateX(0);
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: var(--safe-area-top);
}

/* Editor Header */
.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--space-md);
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .editor-header {
    background: rgba(28, 28, 31, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.editor-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.editor-btn.back {
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    box-shadow:
        8px 8px 20px rgba(0, 0, 0, 0.06),
        4px 4px 10px rgba(0, 0, 0, 0.03),
        -6px -6px 15px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .editor-btn.back {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        8px 8px 20px rgba(0, 0, 0, 0.3),
        4px 4px 10px rgba(0, 0, 0, 0.15),
        -6px -6px 15px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.editor-btn.back:active {
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.06),
        inset -2px -2px 6px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .editor-btn.back:active {
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.3),
        inset -2px -2px 6px rgba(255, 255, 255, 0.02);
}

.editor-btn.delete {
    color: var(--color-danger);
}

.editor-btn.pinned {
    color: var(--accent-primary);
}

.editor-btn.pinned i {
    transform: rotate(-45deg);
}

.editor-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Editor Body */
.editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    overflow-y: auto;
}

.editor-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    background: transparent;
}

.editor-title::placeholder {
    color: var(--text-muted);
}

.editor-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .editor-meta {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.editor-content {
    flex: 1;
    font-size: 17px;
    line-height: 1.7;
    resize: none;
    min-height: 200px;
    color: var(--text-primary);
    background: transparent;
}

.editor-content::placeholder {
    color: var(--text-muted);
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8EC 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: calc(var(--space-md) + var(--safe-area-bottom));
    box-shadow:
        0 -4px 20px rgba(0, 0, 0, 0.04),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .editor-toolbar {
    background: linear-gradient(145deg, #2C2C2E 0%, #1C1C1F 100%);
    border-top-color: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 -4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

.toolbar-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 16px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.06),
        3px 3px 8px rgba(0, 0, 0, 0.03),
        -4px -4px 12px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .toolbar-btn {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.3),
        3px 3px 8px rgba(0, 0, 0, 0.15),
        -4px -4px 12px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.toolbar-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.toolbar-btn:active {
    transform: scale(0.92);
    box-shadow:
        inset 3px 3px 8px rgba(0, 0, 0, 0.06),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .toolbar-btn:active {
    box-shadow:
        inset 3px 3px 8px rgba(0, 0, 0, 0.3),
        inset -2px -2px 5px rgba(255, 255, 255, 0.02);
}

.toolbar-btn .gurmukhi-icon {
    font-family: 'Noto Sans Gurmukhi', sans-serif;
    font-size: 20px;
    color: var(--accent-primary);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0 var(--space-sm);
}

[data-theme="dark"] .toolbar-divider {
    background: rgba(255, 255, 255, 0.08);
}

/* Folder Picker */
.folder-picker {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90%;
    max-width: 300px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: background-color var(--transition-spring), color var(--transition-spring), transform var(--transition-spring);
    z-index: 10;
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.12),
        10px 10px 30px rgba(0, 0, 0, 0.06),
        -15px -15px 40px rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 1);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .folder-picker {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.4),
        10px 10px 30px rgba(0, 0, 0, 0.2),
        -15px -15px 40px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.folder-picker.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.folder-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space-md);
}

[data-theme="dark"] .folder-picker-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.folder-picker-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.close-picker {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8EC 100%);
    color: var(--text-secondary);
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.06),
        -2px -2px 8px rgba(255, 255, 255, 0.9),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.close-picker:active {
    transform: scale(0.92);
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.06),
        inset -1px -1px 4px rgba(255, 255, 255, 0.8);
}

.folder-picker-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.folder-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-align: left;
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8EC 100%);
    box-shadow:
        4px 4px 12px rgba(0, 0, 0, 0.04),
        -2px -2px 8px rgba(255, 255, 255, 0.9),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .folder-option {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        4px 4px 12px rgba(0, 0, 0, 0.2),
        -2px -2px 8px rgba(255, 255, 255, 0.02),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.folder-option:active {
    transform: scale(0.98);
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.06),
        inset -1px -1px 4px rgba(255, 255, 255, 0.8);
}

.folder-option.active {
    background: var(--accent-gradient);
    color: #000;
    box-shadow:
        6px 6px 15px rgba(255, 183, 3, 0.2),
        -2px -2px 8px rgba(255, 255, 255, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.folder-option i {
    width: 24px;
    text-align: center;
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   MENU OVERLAY - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.menu-sheet {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #FAF8F5 0%, #F5F2EE 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-md);
    padding-bottom: calc(var(--space-xl) + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform var(--transition-spring);
    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .menu-sheet {
    background: linear-gradient(180deg, #2C2C2E 0%, #1C1C1F 100%);
    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

.menu-overlay.active .menu-sheet {
    transform: translateY(0);
}

.menu-handle {
    width: 36px;
    height: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

[data-theme="dark"] .menu-handle {
    background: rgba(255, 255, 255, 0.2);
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.menu-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    box-shadow:
        8px 8px 25px rgba(0, 0, 0, 0.06),
        4px 4px 12px rgba(0, 0, 0, 0.03),
        -4px -4px 15px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .menu-option {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        8px 8px 25px rgba(0, 0, 0, 0.3),
        4px 4px 12px rgba(0, 0, 0, 0.15),
        -4px -4px 15px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.menu-option:active {
    transform: scale(0.98);
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.06),
        inset -2px -2px 6px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .menu-option:active {
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.3),
        inset -2px -2px 6px rgba(255, 255, 255, 0.02);
}

.menu-option i {
    width: 24px;
    color: var(--accent-primary);
    text-align: center;
    font-size: 18px;
}

.menu-option i:last-child {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 14px;
}

.menu-option.danger {
    color: var(--color-danger);
}

.menu-option.danger i {
    color: var(--color-danger);
}

.menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: var(--space-sm) 0;
}

[data-theme="dark"] .menu-divider {
    background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   SORT SHEET - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.sort-sheet {
    position: fixed;
    inset: 0;
    z-index: 310;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.sort-sheet.active {
    opacity: 1;
    visibility: visible;
}

.sort-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.sort-content {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #FAF8F5 0%, #F5F2EE 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-md);
    padding-bottom: calc(var(--space-xl) + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform var(--transition-spring);
    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .sort-content {
    background: linear-gradient(180deg, #2C2C2E 0%, #1C1C1F 100%);
    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

.sort-sheet.active .sort-content {
    transform: translateY(0);
}

.sort-handle {
    width: 36px;
    height: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

[data-theme="dark"] .sort-handle {
    background: rgba(255, 255, 255, 0.2);
}

.sort-content h3 {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.sort-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sort-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    box-shadow:
        8px 8px 25px rgba(0, 0, 0, 0.06),
        4px 4px 12px rgba(0, 0, 0, 0.03),
        -4px -4px 15px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .sort-option {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        8px 8px 25px rgba(0, 0, 0, 0.3),
        4px 4px 12px rgba(0, 0, 0, 0.15),
        -4px -4px 15px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.sort-option:active {
    transform: scale(0.98);
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.06),
        inset -2px -2px 6px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .sort-option:active {
    box-shadow:
        inset 4px 4px 10px rgba(0, 0, 0, 0.3),
        inset -2px -2px 6px rgba(255, 255, 255, 0.02);
}

.sort-option i {
    width: 24px;
    color: var(--accent-primary);
    text-align: center;
    font-size: 18px;
}

.sort-option .check-icon {
    margin-left: auto;
    opacity: 0;
    color: var(--color-success);
}

.sort-option.active .check-icon {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CONFIRM MODAL - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.confirm-modal.active {
    opacity: 1;
    visibility: visible;
}

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.confirm-dialog {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-spring);
    box-shadow:
        25px 25px 80px rgba(0, 0, 0, 0.15),
        15px 15px 40px rgba(0, 0, 0, 0.08),
        -20px -20px 60px rgba(255, 255, 255, 0.8),
        0 0 0 2px rgba(255, 255, 255, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 1);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .confirm-dialog {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        25px 25px 80px rgba(0, 0, 0, 0.4),
        15px 15px 40px rgba(0, 0, 0, 0.2),
        -20px -20px 60px rgba(255, 255, 255, 0.02),
        0 0 0 2px rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.confirm-modal.active .confirm-dialog {
    transform: scale(1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(145deg, #FFF5F5 0%, #FFEBEB 100%);
    border-radius: 50%;
    font-size: 28px;
    color: var(--color-danger);
    box-shadow:
        8px 8px 25px rgba(255, 69, 58, 0.2),
        4px 4px 12px rgba(0, 0, 0, 0.05),
        -4px -4px 15px rgba(255, 255, 255, 0.9),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .confirm-icon {
    background: linear-gradient(145deg, #3A2525 0%, #2C1F1F 100%);
    box-shadow:
        8px 8px 25px rgba(255, 69, 58, 0.15),
        4px 4px 12px rgba(0, 0, 0, 0.2),
        -4px -4px 15px rgba(255, 255, 255, 0.02),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

.confirm-dialog h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.confirm-dialog p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: var(--space-md);
}

.confirm-btn {
    flex: 1;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-btn.cancel {
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8EC 100%);
    color: var(--text-primary);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.06),
        3px 3px 8px rgba(0, 0, 0, 0.03),
        -4px -4px 12px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .confirm-btn.cancel {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.3),
        3px 3px 8px rgba(0, 0, 0, 0.15),
        -4px -4px 12px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

.confirm-btn.danger {
    background: linear-gradient(135deg, #FF453A 0%, #FF6B6B 100%);
    color: #fff;
    box-shadow:
        6px 6px 20px rgba(255, 69, 58, 0.3),
        3px 3px 10px rgba(0, 0, 0, 0.1),
        -4px -4px 12px rgba(255, 255, 255, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.confirm-btn:active {
    transform: scale(0.96);
}

.confirm-btn.cancel:active {
    box-shadow:
        inset 3px 3px 8px rgba(0, 0, 0, 0.06),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION - CLAYMORPHISM REDESIGN
   ═══════════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 100px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 24px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F8F8FA 100%);
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: background-color var(--transition-spring), color var(--transition-spring), transform var(--transition-spring);
    z-index: 500;
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.12),
        8px 8px 20px rgba(0, 0, 0, 0.06),
        -10px -10px 30px rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .toast {
    background: linear-gradient(145deg, #3A3A3C 0%, #2C2C2E 100%);
    box-shadow:
        15px 15px 40px rgba(0, 0, 0, 0.4),
        8px 8px 20px rgba(0, 0, 0, 0.2),
        -10px -10px 30px rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    color: var(--color-success);
    font-size: 20px;
}

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

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE STYLES
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .notes-main {
        max-width: 800px;
        margin: 0 auto;
        padding: var(--space-xl);
    }

    .notes-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .fab {
        right: calc(50% - 400px + 30px);
    }
}

@media (min-width: 1024px) {
    .notes-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .notes-main {
        max-width: 1200px;
    }

    .fab {
        right: calc(50% - 600px + 30px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

.note-card {
    animation: slideUp 0.4s ease backwards;
}

.note-card:nth-child(1) {
    animation-delay: 0.05s;
}

.note-card:nth-child(2) {
    animation-delay: 0.1s;
}

.note-card:nth-child(3) {
    animation-delay: 0.15s;
}

.note-card:nth-child(4) {
    animation-delay: 0.2s;
}

.note-card:nth-child(5) {
    animation-delay: 0.25s;
}

.note-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   SELECTION STYLING
   ═══════════════════════════════════════════════════════════════ */

::selection {
    background: var(--accent-primary);
    color: #000;
}

/* ═══════════════════════════════════════════════════════════════
   FOCUS STATES
   ═══════════════════════════════════════════════════════════════ */

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}