/* ============================================
   Monara - מסע לזוהר הצפוני
   Clean, Light, Simple Design
   ============================================ */

:root {
    /* Colors - Light & Clean */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-soft: #f0efff;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --border: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.08);
    
    /* Aurora Colors */
    --aurora-green: #00d9a5;
    --aurora-purple: #a855f7;
    --aurora-blue: #3b82f6;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Heebo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utilities */
.hidden {
    display: none !important;
}

.screen {
    display: none;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.screen.active {
    display: flex;
}

/* ============================================
   Login Screen
   ============================================ */
#login-screen {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, 
        rgba(0, 217, 165, 0.15) 0%, 
        rgba(168, 85, 247, 0.1) 30%, 
        transparent 70%);
    animation: aurora 15s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10%, 10%) rotate(5deg); }
    50% { transform: translate(-5%, 15%) rotate(-3deg); }
    75% { transform: translate(-10%, 5%) rotate(2deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-xl);
}

.logo {
    margin-bottom: var(--space-xl);
}

.aurora-icon {
    font-size: 64px;
    margin-bottom: var(--space-md);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px var(--aurora-green)); }
    to { filter: drop-shadow(0 0 25px var(--aurora-purple)); }
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    letter-spacing: 4px;
    margin-bottom: var(--space-sm);
}

.logo p {
    color: var(--aurora-green);
    font-size: 1rem;
    font-weight: 300;
}

.pin-input-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 280px;
    margin: 0 auto;
}

#pin-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-size: 1.2rem;
    color: white;
    text-align: center;
    letter-spacing: 4px;
    transition: var(--transition);
}

#pin-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: normal;
}

#pin-input:focus {
    outline: none;
    border-color: var(--aurora-green);
    background: rgba(255, 255, 255, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--aurora-green), var(--aurora-purple));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    min-height: 24px;
}

/* ============================================
   Main App
   ============================================ */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    padding: var(--space-sm) var(--space-lg);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sync-indicator {
    font-size: 1.2rem;
    cursor: help;
    opacity: 0.7;
    transition: var(--transition);
}

.sync-indicator:hover {
    opacity: 1;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--accent-soft);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    box-shadow: 0 -2px 10px var(--shadow);
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--accent);
}

.nav-item:hover {
    background: var(--accent-soft);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Views Container */
.views-container {
    flex: 1;
    padding: var(--space-md);
    padding-bottom: 80px; /* Space for bottom nav */
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

#map-view.active {
    display: block;
}

#map-view {
    height: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.view-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.btn-add {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* ============================================
   Map View
   ============================================ */

/* Phase Pills in Header Bar */
.phases-bar {
    display: none; /* Hidden by default */
    gap: var(--space-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    justify-content: center;
    margin: 0 var(--space-sm);
}

.phases-bar.visible {
    display: flex;
}

.phases-bar::-webkit-scrollbar {
    display: none;
}

.phase-pill {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.phase-pill:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.phase-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

#map-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    height: 500px;
    box-shadow: 0 4px 15px var(--shadow);
    overflow: hidden;
    position: relative;
}

#map {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    z-index: 1;
}

/* Custom Leaflet Markers */
.custom-marker {
    background: var(--accent);
    border: 3px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.custom-marker.outbound { background: #3b82f6; }
.custom-marker.north { background: #fbbf24; }
.custom-marker.china { background: #8b5cf6; }
.custom-marker.return { background: #10b981; }

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md) !important;
    font-family: 'Heebo', sans-serif;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    direction: rtl;
    text-align: right;
}

.spot-popup {
    min-width: 180px;
}

.spot-popup h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.spot-popup p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.spot-popup .tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.spot-popup .tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--accent-soft);
    border-radius: 4px;
}

.spot-popup .nav-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    width: 100%;
    margin-top: 4px;
}

.spot-popup .nav-btn:hover {
    background: var(--accent-light);
}

/* Custom marker container */
.custom-marker-container {
    background: transparent !important;
    border: none !important;
}

.custom-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 3px solid white;
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.2);
}

.custom-marker.outbound { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.custom-marker.north { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.custom-marker.china { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.custom-marker.return { background: linear-gradient(135deg, #10b981, #34d399); }

/* ============================================
   Cards List
   ============================================ */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-content {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.tag {
    background: var(--accent-soft);
    color: var(--accent);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.card-btn {
    flex: 1;
    background: var(--bg-primary);
    border: none;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.card-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.card-btn.navigate {
    background: var(--accent);
    color: white;
}

.card-btn.navigate:hover {
    background: var(--accent-light);
}

/* Filter Tags */
.filter-tags {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.tag-filter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.tag-filter.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tag-filter:hover:not(.active) {
    border-color: var(--accent);
}

/* ============================================
   Documents View
   ============================================ */
.status-legend {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    justify-content: center;
}

.legend-item {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.document-section {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
}

.empty-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--space-md);
}

.doc-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border-right: 4px solid transparent;
    position: relative;
}

.doc-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.doc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-card:hover {
    transform: translateX(-4px);
}

.doc-card.ready {
    border-right-color: var(--success);
}

.doc-card.pending {
    border-right-color: var(--warning);
}

.doc-card.missing {
    border-right-color: var(--danger);
}

.doc-status {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.doc-info {
    flex: 1;
}

.doc-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.doc-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.doc-actions {
    display: flex;
    gap: var(--space-xs);
}

.doc-action-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: var(--transition);
}

.doc-action-btn:hover {
    opacity: 1;
}

/* Status cycle button */
.status-cycle {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.status-btn {
    flex: 1;
    padding: var(--space-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.status-btn:hover {
    border-color: var(--accent);
}

.status-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.status-btn.ready { border-color: var(--success); background: rgba(0, 184, 148, 0.1); }
.status-btn.pending { border-color: var(--warning); background: rgba(253, 203, 110, 0.1); }
.status-btn.missing { border-color: var(--danger); background: rgba(225, 112, 85, 0.1); }

/* ============================================
   Checklist View
   ============================================ */
.checklist-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.checklist-item.checked {
    opacity: 0.6;
}

.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.checklist-checkbox:hover {
    border-color: var(--accent);
}

.checklist-item.checked .checklist-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.checklist-text {
    flex: 1;
    font-size: 0.95rem;
}

.checklist-delete {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.4;
    transition: var(--transition);
}

.checklist-delete:hover {
    opacity: 1;
    color: var(--danger);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

#modal-body {
    padding: var(--space-lg);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.tags-select {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.tag-option {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.tag-option.selected {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.btn-secondary {
    flex: 1;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-save {
    flex: 2;
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    background: var(--accent-light);
}

/* ============================================
   Side Menu
   ============================================ */
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: -5px 0 20px var(--shadow);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: var(--transition);
}

.side-menu:not(.hidden) {
    transform: translateX(0);
}

.menu-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent);
}

.menu-items {
    flex: 1;
    padding: var(--space-md);
}

.menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: var(--space-md);
    text-align: right;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.menu-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.menu-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

.menu-footer p {
    margin: var(--space-xs) 0;
}

.menu-footer .small {
    font-size: 0.85rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.empty-state p {
    margin: var(--space-sm) 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 768px) {
    .views-container {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .phases-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    #map-container {
        height: 400px;
    }
    
    .modal-content {
        max-width: 500px;
        margin: auto;
        border-radius: var(--radius-lg);
    }
}

/* ============================================
   Feeling Cards Special
   ============================================ */
.feeling-card {
    border-right: 4px solid var(--accent);
}

.feeling-card.happy {
    border-color: var(--success);
}

.feeling-card.free {
    border-color: var(--aurora-purple);
}

.feeling-card.thoughtful {
    border-color: var(--aurora-blue);
}

.feeling-card.love {
    border-color: #e91e63;
}

.feeling-mood {
    font-size: 1.5rem;
    margin-left: var(--space-sm);
}

/* ============================================
   Location Button
   ============================================ */
.get-location-btn {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px dashed var(--accent);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.get-location-btn:hover {
    background: var(--accent);
    color: white;
}

/* ============================================
   Print / Export Styles
   ============================================ */
@media print {
    .bottom-nav,
    .app-header,
    .btn-add,
    .card-actions {
        display: none !important;
    }
    
    .views-container {
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

/* ============================================
   Budget Styles
   ============================================ */
.budget-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.budget-summary.three-cards {
    grid-template-columns: 1fr 1fr 1fr;
}

.budget-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.budget-card.budget-total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.budget-card.expenses-total {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.budget-card.remaining {
    background: var(--bg-card);
}

.budget-card.status-good {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.budget-card.status-warning {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #333;
}

.budget-card.status-negative {
    background: linear-gradient(135deg, #cb2d3e, #ef473a);
    color: white;
}

.budget-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: var(--space-xs);
}

.budget-amount {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Expense toggle in spot form */
.expense-toggle-section {
    background: var(--accent-soft);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

#spot-expense-fields {
    background: var(--bg-primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

#spot-expense-fields.hidden {
    display: none;
}

.expense-category-select {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.budget-info {
    background: var(--accent-soft);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.budget-info p {
    margin-bottom: var(--space-xs);
}

.budget-category {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
}

.expense-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.expense-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
}

.expense-details {
    flex: 1;
}

.expense-title {
    font-weight: 500;
    color: var(--text-primary);
}

.expense-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.expense-amount {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}

/* Image Preview */
.image-preview-container {
    margin-top: var(--space-md);
}

.image-preview {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

.image-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-lg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.image-upload-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

/* Currency input */
.currency-input {
    position: relative;
}

.currency-input input {
    padding-right: 40px;
}

.currency-symbol {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
}

/* Image Upload */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.image-preview {
    width: 100%;
    min-height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-primary);
    transition: var(--transition);
    overflow: hidden;
}

.image-preview:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.image-preview span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.image-preview.has-image {
    border-style: solid;
    border-color: var(--success);
    min-height: 0;
}

.image-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.btn-remove-image {
    background: var(--danger);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    align-self: flex-end;
}

.btn-remove-image:hover {
    background: #c54a38;
}

/* Spot card with image */
.spot-card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

/* Multi-Image Gallery */
.multi-image-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: var(--transition);
}

.gallery-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

.add-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.add-image-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

/* Card Images Gallery */
.card-images-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.card-images-gallery img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.spot-card-thumb.more {
    position: relative;
}

.spot-card-thumb.more::after {
    content: attr(data-more);
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Document thumbnail with multiple images indicator */
.doc-thumbnail.multi {
    position: relative;
}

.thumb-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 600;
}
