/* ===========================================
   Drawrix - App Styles
   Modern light theme with vibrant colors
   =========================================== */

:root {
    /* Color palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    --border-focus: rgba(99, 102, 241, 0.5);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    /* Accent colors */
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.1);
    --accent-glow-strong: rgba(99, 102, 241, 0.2);

    /* Secondary accent */
    --coral: #f97316;
    --emerald: #10b981;

    /* Semantic colors */
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #10b981;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--accent-glow);

    /* Spacing */
    --header-height: 60px;
    --sidebar-width: 340px;
    --bottom-bar-height: 80px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Brand system */
    --brand-logo-size-nav: 34px;
    --brand-logo-size-footer: 34px;
    --brand-logo-size-auth: 34px;
    --brand-gap: 0.625rem;
    --brand-wordmark-size: 1.25rem;
    --brand-focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

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

/* Base */
html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

/* ===========================================
   HEADER
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header-nav a:hover {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switcher:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}

.lang-switcher svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.lang-switcher:hover svg {
    opacity: 1;
}

#lang-btn-text {
    min-width: 20px;
    text-align: center;
}

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

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===========================================
   MAIN LAYOUT
   =========================================== */
.main-container {
    display: flex;
    height: 100vh;
    padding-top: var(--header-height);
}

/* ===========================================
   SIDEBAR
   =========================================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Custom scrollbar */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 16px;
}

/* ===========================================
   FORMAT BUTTONS
   =========================================== */
.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.format-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.format-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.format-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.format-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.format-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.format-btn .badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-dim);
    margin-left: auto;
}

/* ===========================================
   OPTIONS (CHECKBOXES)
   =========================================== */
.option-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-item {
    display: flex;
    gap: 14px;
}

.checkbox-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.checkbox-wrapper input:hover + .checkbox-custom {
    border-color: var(--accent);
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    display: block;
}

.option-content {
    flex: 1;
}

.option-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Sub-options */
.sub-options {
    margin-left: 36px;
    margin-top: 14px;
    padding-left: 14px;
    border-left: 2px solid var(--border-color);
    display: none;
    flex-direction: column;
    gap: 10px;
}

.sub-options.visible {
    display: flex;
}

.sub-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.sub-option label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ===========================================
   SELECT & INPUTS
   =========================================== */
.select-wrapper {
    position: relative;
    margin-bottom: 18px;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    transition: border-color var(--transition-fast);
}

.select-wrapper select:hover,
.select-wrapper select:focus {
    border-color: var(--accent);
    outline: none;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    pointer-events: none;
}

/* Input group */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.input-with-unit {
    display: flex;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.input-with-unit:focus-within {
    border-color: var(--accent);
}

.input-with-unit input {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: 'JetBrains Mono', monospace;
}

.input-with-unit input:focus {
    outline: none;
}

.input-with-unit .unit {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ===========================================
   MAP CONTAINER
   =========================================== */
.map-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

#map {
    flex: 1;
    background: var(--bg-tertiary);
}

/* Search bar */
.search-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 500;
}

.search-input-wrapper {
    position: relative;
    width: 360px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 18px 14px 50px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-glow);
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-input-wrapper svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* Map instructions */
.map-instructions {
    position: absolute;
    bottom: calc(var(--bottom-bar-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.92rem;
    color: var(--text-secondary);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
}

.map-instructions kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.map-instructions.hidden {
    display: none;
}

/* ===========================================
   BOTTOM BAR
   =========================================== */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-bar-height);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 500;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.area-display {
    display: flex;
    align-items: center;
    gap: 30px;
}

.area-info {
    display: flex;
    flex-direction: column;
}

.area-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.area-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.area-value .unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2px;
}

/* Progress bar */
.progress-container {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-label.free {
    color: var(--emerald);
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.progress-fill.paid {
    background: linear-gradient(90deg, var(--coral), #f59e0b);
}

.progress-marker {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--text-muted);
    border-radius: 1px;
}

/* Price */
.price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 24px;
}

.price-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald);
}

.price-value.paid {
    color: var(--coral);
}

/* Select Area button (map overlay) */
.map-select-btn {
    position: absolute;
    top: 80px;
    right: 12px;
    z-index: 500;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.map-select-btn:hover {
    background: var(--bg-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.map-select-btn.active {
    background: var(--emerald);
    border-color: var(--emerald);
    color: white;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.4);
}

/* Clear selection button */
.clear-btn {
    padding: 12px 20px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.06);
}

/* Create button */
.create-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.create-btn svg {
    width: 20px;
    height: 20px;
}

.create-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.create-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-dim);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===========================================
   LEAFLET CUSTOMIZATION
   =========================================== */
.leaflet-container {
    background: var(--bg-tertiary);
    font-family: inherit;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 20px !important;
    transition: all var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-tertiary) !important;
}

.leaflet-control-zoom-in {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    border-top: none !important;
}

/* Selection rectangle */
.leaflet-interactive.selection-rectangle {
    fill: var(--accent);
    fill-opacity: 0.15;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-dasharray: 10 5;
}

/* ===========================================
   MODALS
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    padding: 32px;
    animation: modalSlideIn 0.25s ease-out;
    box-shadow: var(--shadow-lg);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Processing modal */
.processing-content {
    text-align: center;
    padding: 20px 0;
}

.processing-spinner {
    width: 64px;
    height: 64px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 28px;
}

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

.processing-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.processing-status {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.processing-progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.processing-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Auth modal */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 13px 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

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

.auth-submit {
    margin-top: 8px;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-submit:hover {
    background: var(--accent-dark);
}

/* User menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.user-credits {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-email {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-plan {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.dropdown-logout {
    color: #ef4444;
}

.dropdown-logout:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: calc(var(--sidebar-width) * -1);
        top: var(--header-height);
        bottom: 0;
        z-index: 900;
        transition: left var(--transition-normal);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 899;
        display: none;
    }

    .sidebar-backdrop.visible {
        display: block;
    }

    .search-input-wrapper {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .bottom-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .area-display {
        flex: 1;
    }

    .progress-container {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .price-display {
        margin-right: 0;
    }

    .create-btn {
        width: 100%;
        order: 4;
        justify-content: center;
    }

    .search-input-wrapper {
        width: 100%;
        max-width: 300px;
    }
}

/* ===========================================
   Toast Notifications
   =========================================== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.toast.visible {
    transform: translateX(0);
}
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
.toast-warning { background: #f59e0b; }
.toast-info { background: #3b82f6; }
