/* ============ DESIGN TOKENS ============ */
:root {
    /* Colors - Dark Theme with purple accent */
    --bg-base: #09090b;
    --bg-elevated: #18181b;
    --bg-surface: #27272a;
    --bg-hover: #3f3f46;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent: #8b5cf6;
    --accent-dim: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.15);

    --border: #27272a;
    --border-subtle: #3f3f46;

    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Mode Theme */
.light-mode {
    --bg-base: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-hover: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border: #e2e8f0;
    --border-subtle: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes backdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============ RESET ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============ LAYOUT ============ */
.app {
    display: flex;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 260px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Search */
.search-container {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.search-field {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
}

.search-btn:hover {
    background: var(--accent-dim);
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Categories */
.categories-section {
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.btn-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

.categories-list {
    list-style: none;
}

.category-empty {
    padding: var(--space-3);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    font-style: italic;
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
    margin-bottom: 2px;
}

.category-item:hover {
    background: var(--bg-surface);
}

.category-item.active {
    background: var(--accent-glow);
}

.category-item.active .category-name {
    color: var(--accent);
}

.category-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.category-count {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.category-actions {
    display: flex;
    gap: var(--space-1);
    opacity: 0;
    transition: var(--transition-fast);
}

.category-item:hover .category-actions {
    opacity: 1;
}

.category-edit,
.category-delete {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.category-edit {
    color: var(--text-muted);
}

.category-edit:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.category-delete {
    color: var(--danger);
}

.category-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Settings Button */
.settings-section {
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    margin-top: var(--space-5);
}

.settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-base);
}

.settings-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: var(--space-8);
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.entry-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 16px;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

/* Search Info */
.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    border: 1px solid var(--border);
    animation: fadeInUp var(--transition-smooth) forwards;
}

.search-info-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.search-info-left span {
    font-size: 13px;
    color: var(--text-secondary);
}

.search-latency {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px !important;
    padding: 2px 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

/* ============ ENTRIES GRID ============ */
.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
    transition: opacity 200ms ease, transform 200ms ease;
}

.entry-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
    display: flex;
    flex-direction: column;
}

.entry-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-glow);
}

.entry-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.entry-category-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.entry-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.entry-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: var(--space-4);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-4);
}

.entry-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-weight: 500;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.entry-date {
    font-family: 'JetBrains Mono', monospace;
}

.entry-score {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-illustration {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ============ MODAL ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    opacity: 0;
    transition: opacity 250ms ease, background 250ms ease, backdrop-filter 250ms ease;
}

.modal.active {
    display: flex;
}

.modal.active.visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 250ms ease, transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active.visible .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-content.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Form Styles */
form {
    padding: var(--space-6);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-base);
}

/* Custom Select/Dropdown Styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 10px;
}

.form-group select:hover {
    border-color: var(--border-subtle);
}

/* Custom Validation Styles */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not([value=""]),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    animation: shake 0.4s ease-in-out;
}

.form-error {
    display: none;
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--danger);
}

.form-error svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: middle;
}

.form-group.has-error .form-error {
    display: flex;
    align-items: center;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-4px);
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: var(--space-2);
    font-size: 12px;
    color: var(--text-muted);
}

.form-group small a {
    color: var(--accent);
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

/* Custom Color Picker */
.color-picker-container {
    position: relative;
}

/* Trigger Button */
.color-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-primary);
}

.color-trigger:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.color-trigger-swatch {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.color-trigger-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.color-trigger-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.color-trigger-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.color-trigger svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.color-picker-container.open .color-trigger svg {
    transform: rotate(180deg);
}

/* Color Panel Dropdown */
.color-panel {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: var(--space-4);
}

.color-picker-container.open .color-panel {
    display: flex;
}

/* 2D Color Canvas */
.color-canvas-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.color-canvas {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    background: linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, transparent);
    cursor: crosshair;
    overflow: hidden;
    border: 1px solid var(--border);
}

.color-canvas-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.4);
    transition: none;
}

/* Hue Slider */
.hue-slider-wrapper {
    position: relative;
    width: 100%;
    height: 16px;
}

.hue-slider {
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right,
            #ff0000 0%,
            #ffff00 17%,
            #00ff00 33%,
            #00ffff 50%,
            #0000ff 67%,
            #ff00ff 83%,
            #ff0000 100%);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    border: 1px solid var(--border);
}

.hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.hue-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* Color Info Section */
.color-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.color-preview-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.hex-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 var(--space-3);
    transition: var(--transition-base);
    outline: none;
}

.hex-input-wrapper:focus-within {
    border-color: var(--accent);
    outline: none;
}

.hex-hash {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 600;
}

.hex-input-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-3) 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    outline: none !important;
    box-shadow: none !important;
}

.hex-input-field:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.hex-input-field::placeholder {
    color: var(--text-muted);
}

/* Panel Sections */
.panel-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Quick Swatches Grid */
.color-presets {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: var(--space-2);
}

.color-preset {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    background: none;
    padding: 0;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.color-preset.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent);
    transform: scale(1.05);
}

/* ============ CUSTOM SELECT DROPDOWN ============ */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: left;
}

.custom-select-trigger:hover {
    border-color: var(--border-subtle);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-select-trigger svg {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-select.open .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-value.placeholder {
    color: var(--text-muted);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    max-height: 240px;
    overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-options {
    padding: var(--space-2);
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-primary);
}

.custom-select-option:hover {
    background: var(--bg-hover);
}

.custom-select-option.selected {
    background: var(--accent-glow);
    color: var(--accent);
}

.custom-select-option-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.custom-select-option-text {
    flex: 1;
    font-size: 14px;
}

.custom-select-empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ TAG MANAGER (for Collections) ============ */
.tag-manager {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.tag-manager-input-row {
    display: flex;
    gap: var(--space-2);
}

.tag-manager-input-row .tag-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-base);
}

.tag-manager-input-row .tag-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.tag-add-btn {
    background: var(--accent) !important;
    color: white !important;
}

.tag-add-btn:hover {
    background: var(--accent-dim) !important;
}

.tag-manager-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 32px;
}

.tag-manager-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
}

.tag-manager-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tag-manager-item-delete:hover {
    background: var(--danger);
    color: white;
}

/* ============ TAG SELECTOR (for Entries) ============ */
.tag-selector {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-height: 80px;
}

.tag-selector-selected {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag-selector-selected:empty::before {
    content: 'No tags selected';
    color: var(--text-muted);
    font-size: 12px;
}

.tag-selector-selected .tag-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--accent);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tag-selector-selected .tag-item:hover {
    background: var(--danger);
}

.tag-selector-selected .tag-item svg {
    width: 12px;
    height: 12px;
}

.tag-selector-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-1) 0;
}

.tag-selector-available {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag-selector-hint {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.tag-selector-available .tag-item {
    padding: var(--space-1) var(--space-2);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tag-selector-available .tag-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============ URL VALIDATION ============ */
.form-group.url-invalid input {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group .url-error {
    display: none;
}

.form-group.url-invalid .url-error {
    display: flex;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* Input with status */
.input-with-status {
    position: relative;
}

.input-with-status input {
    padding-right: 40px;
}

.status-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    display: block;
}

.status-indicator.connected .status-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-indicator.disconnected .status-dot {
    background: var(--warning);
}

/* Settings Content */
.settings-content {
    padding: var(--space-6);
}

.settings-section-block {
    margin-bottom: var(--space-8);
}

.settings-section-block:last-child {
    margin-bottom: 0;
}

.settings-section-block h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.settings-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* Model List */
.model-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.model-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 250ms ease;
}

.model-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.model-item.active {
    border-color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 0 1px var(--accent-glow), inset 0 0 20px var(--accent-glow);
}

.model-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 250ms ease;
}

.model-item.active .model-radio {
    border-color: var(--accent);
}

.model-item.active .model-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: radioPopIn 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes radioPopIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.model-info {
    flex: 1;
}

.model-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.model-provider {
    font-size: 11px;
    color: var(--text-muted);
}

.model-latency {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.latency-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.latency-dot.fast {
    background: var(--success);
}

.latency-dot.medium {
    background: var(--warning);
}

.latency-dot.slow {
    background: var(--danger);
}

.latency-value {
    color: var(--text-muted);
}

/* View Content */
.view-content {
    padding: var(--space-6);
}

.view-category {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: var(--space-5);
}

.view-body {
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: var(--space-5);
}

.view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.view-tag {
    font-size: 12px;
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.view-source {
    margin-bottom: var(--space-3);
}

.view-source a {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.view-source a:hover {
    text-decoration: underline;
}

.view-date {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* View Modal Actions - Fixed positioning */
#viewModal .form-actions {
    padding: var(--space-5) var(--space-6);
    margin: 0;
    border-top: 1px solid var(--border);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ============ ANIMATIONS ============ */
.loading {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse animation for latency testing */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.testing .latency-dot {
    animation: pulse 1s ease-in-out infinite;
}

/* ============ FOOTER ============ */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: var(--space-3) var(--space-6);
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-divider {
    color: var(--text-muted);
    opacity: 0.5;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-5);
    }

    .app {
        flex-direction: column;
    }

    .entries-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .site-footer {
        left: 0;
        position: relative;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }
}

/* ============ SKELETON LOADING STATES ============ */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-surface) 25%,
            var(--bg-hover) 50%,
            var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    animation: fadeIn var(--transition-smooth) forwards;
}

.skeleton-card .skeleton-category {
    width: 80px;
    height: 12px;
    margin-bottom: var(--space-3);
}

.skeleton-card .skeleton-title {
    width: 70%;
    height: 20px;
    margin-bottom: var(--space-2);
}

.skeleton-card .skeleton-content {
    width: 100%;
    height: 48px;
    margin-bottom: var(--space-4);
}

.skeleton-card .skeleton-footer {
    width: 100px;
    height: 12px;
}

.skeleton-category-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    margin-bottom: 2px;
}

.skeleton-category-item .skeleton-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.skeleton-category-item .skeleton-name {
    flex: 1;
    height: 14px;
    max-width: 120px;
}

.skeleton-category-item .skeleton-count {
    width: 20px;
    height: 14px;
}

/* ============ PAGE TRANSITIONS ============ */
.main-content {
    margin-left: 260px;
    padding: var(--space-6);
    min-height: 100vh;
    animation: fadeIn var(--transition-smooth) forwards;
}

/* Loading state indicator */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 3px;
    background: var(--bg-surface);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.loading-overlay.active {
    opacity: 1;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: var(--accent);
    animation: loadingBar 1s ease-in-out infinite;
}

@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(200%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* Smooth content transitions */
/* Empty state animation */
.empty-state {
    animation: fadeInUp var(--transition-smooth) 200ms forwards;
    opacity: 0;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 300ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.visible {
    opacity: 1;
    transform: translateX(0);
}

.toast.hiding {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-icon.info {
    color: var(--accent);
}

.toast-icon.success {
    color: var(--success);
}

.toast-icon.warning {
    color: var(--warning);
}

.toast-icon.error {
    color: var(--danger);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 150ms ease, color 150ms ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.toast-action {
    margin-top: var(--space-3);
}

.toast-action button {
    padding: var(--space-2) var(--space-3);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 150ms ease;
}

.toast-action button:hover {
    background: var(--accent-dim);
}

/* ============ CONFIRM DIALOG ============ */
.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.confirm-dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-dialog-overlay.visible .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    color: var(--warning);
}

.confirm-dialog-icon svg {
    width: 100%;
    height: 100%;
}

.confirm-dialog h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.confirm-dialog p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.confirm-dialog-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.confirm-dialog-actions button {
    min-width: 100px;
}

/* ============ ACCOUNT MANAGEMENT ============ */

.danger-zone {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-zone h4 {
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.warning-text {
    color: var(--danger);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.delete-step {
    padding: var(--space-5);
}

.delete-step p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.delete-step strong {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.logout-btn {
    margin-top: var(--space-2);
}

/* ============ SETTINGS TABS ============ */

.settings-tabs-container {
    background: transparent;
    padding: var(--space-5) var(--space-5) 0 var(--space-5);
    border-bottom: none;
}

.settings-tabs {
    display: flex;
    gap: 0;
    position: relative;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 4px;
}

.settings-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(33.333% - 2.67px);
    height: calc(100% - 8px);
    background: var(--accent);
    border-radius: var(--radius-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.settings-tabs.tab-konto::before {
    transform: translateX(100%);
}

.settings-tabs.tab-interface::before {
    transform: translateX(200%);
}

.settings-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
    border-radius: var(--radius-sm);
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    color: white;
}

.settings-tab svg {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.settings-tab.active svg {
    opacity: 1;
}

.settings-tab-content {
    display: none;
    padding: var(--space-5);
}

.settings-tab-content.active {
    display: block;
}

.modal-wide {
    max-width: 640px;
}

/* ============ TOGGLE GROUP ============ */

.toggle-group {
    display: flex;
    gap: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 4px;
    position: relative;
}

.toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.toggle-option:hover {
    color: var(--text-primary);
}

.toggle-option.active {
    background: var(--accent);
    color: white;
}

.toggle-option svg {
    opacity: 0.7;
}

.toggle-option.active svg {
    opacity: 1;
}

/* ============ DELETE MODAL ============ */

.modal-delete {
    max-width: 480px;
}

.delete-warning-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: var(--space-4);
}

.delete-info {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
}

.delete-input-wrapper {
    margin-bottom: var(--space-5);
}

.delete-confirm-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 2px solid var(--danger);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    letter-spacing: 2px;
}

.delete-confirm-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.delete-confirm-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 2px;
}

.delete-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    padding-top: var(--space-4);
}

.btn-wide {
    min-width: 140px;
    justify-content: center;
}

/* ============ SETTINGS DROPDOWNS ============ */

.settings-dropdown {
    max-width: 280px;
}

.settings-dropdown .custom-select-trigger {
    padding: var(--space-3) var(--space-4);
}

.settings-dropdown .custom-select-option {
    padding: var(--space-3) var(--space-4);
}

.settings-dropdown .custom-select-option.selected {
    background: var(--accent-glow);
}

.settings-dropdown .custom-select-option.selected::after {
    content: '✓';
    margin-left: auto;
    color: var(--accent);
    font-weight: 600;
}

/* ============ EMAIL VERIFICATION BANNER ============ */

.verification-banner {
    position: fixed;
    bottom: 44px;
    /* Footer height */
    left: 260px;
    /* Sidebar width */
    right: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 10px 20px;
    z-index: 99;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.verification-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #18181b;
    font-size: 14px;
    font-weight: 500;
}

.verification-banner svg {
    flex-shrink: 0;
    color: #18181b;
}

.verification-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.verification-banner-link {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    color: #18181b;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.verification-banner-link:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Responsive: Banner full width on mobile */
@media (max-width: 768px) {
    .verification-banner {
        left: 0;
        bottom: auto;
        position: relative;
    }
}

/* Settings verification status */
.verification-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.verification-status.verified {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.verification-status.unverified {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.verification-status svg {
    flex-shrink: 0;
}

.user-badge-unsicher {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 8px;
}