/* ============================================
   Components - Hawaiian Tropical Theme
   ============================================ */

/* ============================================
   Category Dropdown
   ============================================ */

.category-dropdown-container {
    position: relative;
    padding: 0 16px 12px;
    background: var(--bg-elevated);
}

.category-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    font-family: 'DM Sans', sans-serif;
}

.category-dropdown-btn:hover {
    border-color: var(--ocean-light);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
}

.category-dropdown-btn.active {
    border-color: var(--ocean-light);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

.dropdown-icon {
    font-size: 1.5rem;
}

.dropdown-label {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s var(--ease-smooth);
}

.category-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-smooth);
    max-height: 50vh;
    overflow-y: auto;
}

.category-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
}

.category-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--sand-light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.category-item:hover {
    background: var(--sand);
}

.category-item.active {
    background: linear-gradient(135deg, var(--ocean-light), var(--lagoon));
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.category-item.clear-all {
    background: var(--bg-elevated);
    border: 2px dashed var(--sand-dark);
    justify-content: center;
    margin-bottom: 6px;
}

.category-item.clear-all:hover {
    border-color: var(--ocean-light);
    background: var(--sand-light);
}

.category-item.clear-all.active {
    border-style: solid;
    background: linear-gradient(135deg, var(--ocean-light), var(--lagoon));
}

/* Checkbox indicator for multi-select */
.category-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--sand-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    color: transparent;
    transition: all 0.2s var(--ease-smooth);
    background: white;
}

.category-item.active .category-checkbox {
    background: white;
    border-color: white;
    color: var(--ocean);
}

.category-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-name {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
}

.category-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ============================================
   Resize Handle (Mobile - hidden)
   ============================================ */

.resize-handle {
    display: none;
}

/* Desktop category dropdown - keep single column, limit width */
@media (min-width: 1024px) {
    .category-dropdown {
        left: 16px;
        right: auto;
        width: 280px;
        max-height: 60vh;
    }
}

/* ============================================
   Location Cards
   ============================================ */

.location-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

/* Decorative gradient overlay on hover */
.location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ocean-light), var(--lagoon), var(--seafoam));
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(14, 165, 233, 0.2);
}

.location-card:hover::before {
    opacity: 1;
}

.location-card:active {
    transform: scale(0.98);
}

/* Category color accents - left border */
.location-card.snorkeling { border-left: 4px solid #0ea5e9; }
.location-card.spearfishing { border-left: 4px solid #14b8a6; }
.location-card.scuba { border-left: 4px solid #06b6d4; }
.location-card.boat_dives { border-left: 4px solid #3b82f6; }
.location-card.surfing { border-left: 4px solid #8b5cf6; }
.location-card.hikes { border-left: 4px solid #22c55e; }
.location-card.restaurants { border-left: 4px solid #f97316; }
.location-card.beaches { border-left: 4px solid #fbbf24; }
.location-card.events { border-left: 4px solid #ec4899; }
.location-card.hana { border-left: 4px solid #84cc16; }
.location-card.family { border-left: 4px solid #a855f7; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    flex: 1;
}

.card-favorite {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sand);
    border: none;
    border-radius: var(--radius);
    font-size: 1.375rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-bounce);
}

.card-favorite:hover {
    background: var(--sand-dark);
    transform: scale(1.1);
}

.card-favorite:active {
    transform: scale(0.9);
}

.card-favorite.active {
    background: linear-gradient(135deg, #fecdd3, #fda4af);
    animation: heartBeat 0.6s ease-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--sand);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.card-badge.kid-friendly {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.card-badge.senior-ok {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

/* Card Tags (Group Tags) */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-badge.tag-mustDo {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.tag-badge.tag-rainyDay {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.tag-badge.tag-maybe {
    background: rgba(139, 92, 246, 0.15);
    color: #6d28d9;
}

.tag-badge.tag-skip {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
}

/* Tag Selector (in Detail Modal) */
.tag-selector {
    background: var(--sand-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
}

.tag-selector-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--tag-color, #6b7280);
    background: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tag-color, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-btn:hover {
    background: var(--tag-bg, rgba(107, 114, 128, 0.1));
    transform: translateY(-1px);
}

.tag-btn.active {
    background: var(--tag-color, #6b7280);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-btn .tag-emoji {
    font-size: 1rem;
}

.tag-btn .tag-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    min-width: 18px;
    text-align: center;
}

.tag-btn.active .tag-count {
    background: rgba(255, 255, 255, 0.4);
}

.tag-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tag-who {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-area {
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-description {
    margin-top: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-map-btn {
    margin-top: 12px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-map-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.card-map-btn:active {
    transform: translateY(0);
}

/* ============================================
   Photo Gallery
   ============================================ */

.photo-gallery {
    margin: -24px -24px 20px -24px;
    position: relative;
}

.main-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.main-photo:hover {
    opacity: 0.9;
}

.photo-gallery::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
}

.photo-thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.photo-thumb {
    width: 50px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.6;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.photo-thumb:hover {
    opacity: 0.9;
}

.photo-thumb.active {
    opacity: 1;
    border-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Photo Editor (Location Editor) */
.photo-editor-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 60px;
}

.photo-editor-preview .no-photos {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.photo-editor-item {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--sand-dark);
}

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

.photo-editor-item .photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.photo-editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-editor-actions .action-btn {
    flex: 1;
    min-width: 120px;
}

.photo-url-input {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.photo-url-input input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid var(--sand-dark);
    border-radius: 8px;
    font-size: 0.9rem;
}

.photo-url-input .action-btn.small {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Photo Upload */
.upload-btn {
    cursor: pointer;
    background: var(--ocean) !important;
    color: white !important;
}

.upload-btn:hover {
    background: var(--ocean-dark) !important;
}

.photo-upload-progress {
    margin-top: 12px;
    padding: 12px;
    background: var(--sand-light);
    border-radius: 8px;
}

.progress-bar {
    height: 8px;
    background: var(--sand-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--ocean);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.photo-editor-item.uploading {
    opacity: 0.6;
}

.photo-editor-item .upload-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Custom Tags Editor
   ============================================ */

.section-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.custom-tags-container {
    margin-bottom: 12px;
}

.existing-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--sand-light);
    border: 2px solid var(--sand-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    border-color: var(--ocean-light);
    background: rgba(14, 165, 233, 0.1);
}

.tag-chip.selected {
    background: var(--ocean);
    border-color: var(--ocean);
    color: white;
}

.tag-chip .tag-emoji {
    font-size: 1rem;
}

.tag-chip .tag-remove {
    margin-left: 4px;
    font-size: 1rem;
    opacity: 0.7;
    cursor: pointer;
}

.tag-chip .tag-remove:hover {
    opacity: 1;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-tags .tag-chip {
    background: var(--ocean);
    border-color: var(--ocean);
    color: white;
}

.add-tag-input {
    position: relative;
}

.add-tag-input input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--sand-dark);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg-card);
}

.add-tag-input input:focus {
    border-color: var(--ocean-light);
    outline: none;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.tag-suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tag-suggestion-item:hover {
    background: var(--sand-light);
}

.tag-suggestion-item.create-new {
    border-top: 1px solid var(--sand-dark);
    color: var(--ocean);
    font-weight: 600;
}

.tag-suggestion-item .tag-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--sand-light);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Audit Info Display */
.audit-info {
    margin-top: 16px;
    padding: 12px;
    background: var(--sand-light);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.audit-info .audit-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.audit-info .audit-line:last-child {
    margin-bottom: 0;
}

.audit-info .audit-icon {
    font-size: 0.9rem;
}

.audit-info .audit-user {
    font-weight: 600;
    color: var(--text-primary);
}

.audit-info .audit-date {
    margin-left: auto;
    color: var(--text-muted);
}

/* Custom Tags in Filter Bar */
.custom-tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
}

.filter-chip.custom-tag {
    background: var(--sand-light);
    border: 1px solid var(--sand-dark);
}

.filter-chip.custom-tag.active {
    background: var(--ocean);
    border-color: var(--ocean);
    color: white;
}

/* ============================================
   Photo Lightbox (Fullscreen Viewer)
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox.active {
    display: flex;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.lightbox-counter {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    cursor: grab;
}

.lightbox-image.dragging {
    cursor: grabbing;
    transition: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
    z-index: 10;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.lightbox-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 50px;
    transition: background 0.2s;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-controls {
        padding: 10px;
        gap: 6px;
    }

    .lightbox-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   Modal
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 74, 110, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 9000;
    padding: 0;
}

.modal.active {
    display: flex;
    animation: fadeInOverlay 0.3s var(--ease-smooth);
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(180deg, var(--coconut) 0%, var(--sand-light) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s var(--ease-bounce);
    box-shadow: 0 -16px 64px rgba(12, 74, 110, 0.25);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s var(--ease-smooth);
}

.modal-close:hover {
    background: var(--sand);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-header {
    padding: 24px 24px 32px;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean), var(--lagoon));
    position: relative;
    overflow: visible;
}

/* Wave decoration on modal header */
.wave-decoration {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 20px;
    color: var(--sand-light);
    pointer-events: none;
    z-index: 1;
}

.wave-decoration svg {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    padding-right: 50px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sand-dark);
}

.detail-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.detail-value a {
    color: var(--ocean);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.detail-value a:hover {
    color: var(--ocean-deep);
    text-decoration: underline;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--sand);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-badge.positive {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.detail-badge.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    padding-bottom: calc(16px + var(--safe-bottom));
    background: var(--bg-elevated);
    border-top: 1px solid var(--sand-dark);
}

.action-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    background: var(--sand);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.action-btn:hover {
    background: var(--sand-dark);
    transform: translateY(-2px);
}

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

.action-btn .icon {
    font-size: 1.25rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--ocean-light), var(--lagoon));
    color: white;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
}

/* ============================================
   Hana Route Items
   ============================================ */

.hana-stop {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--sand-dark);
    transition: background 0.2s;
}

.hana-stop:hover {
    background: rgba(255, 255, 255, 0.5);
    margin: 0 -16px;
    padding: 16px;
    border-radius: var(--radius);
}

.hana-stop:last-child {
    border-bottom: none;
}

.hana-marker {
    flex-shrink: 0;
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hana-mm {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--palm);
    background: var(--fern);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.hana-line {
    flex: 1;
    width: 3px;
    background: linear-gradient(180deg, var(--jungle), var(--fern));
    margin-top: 8px;
    border-radius: var(--radius-full);
}

.hana-content {
    flex: 1;
    cursor: pointer;
}

.hana-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hana-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.hana-duration {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hana-check {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--sand-dark);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: transparent;
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s var(--ease-bounce);
}

.hana-check:hover {
    border-color: var(--jungle);
    transform: scale(1.05);
}

.hana-check.checked {
    background: linear-gradient(135deg, var(--palm), var(--jungle));
    border-color: var(--palm);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ============================================
   Loading State
   ============================================ */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--sand-dark);
    border-top-color: var(--ocean-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sand);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ocean-light), var(--lagoon));
    border-radius: var(--radius-full);
}

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

/* ============================================
   Copy to Clipboard
   ============================================ */

.copyable-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copyable-content {
    flex: 1;
}

.copy-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sand);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s var(--ease-smooth);
}

.copy-btn:hover {
    opacity: 1;
    background: var(--sand-dark);
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    opacity: 1;
}

/* ============================================
   Desktop Enhancements
   ============================================ */

@media (min-width: 768px) {
    .location-card {
        padding: 22px;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .card-badge {
        padding: 6px 14px;
        font-size: 0.875rem;
    }

    .modal-content {
        border-radius: var(--radius-xl);
        margin-bottom: 24px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .location-card {
        padding: 24px;
    }

    .location-card:hover {
        transform: translateY(-6px) scale(1.01);
    }

    .card-favorite {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .modal {
        align-items: center;
    }

    .modal-content {
        margin: 0;
        border-radius: var(--radius-xl);
        max-width: 560px;
    }

    .action-btn {
        padding: 16px 20px;
    }

    .hana-stop {
        padding: 20px 0;
    }

    .hana-title {
        font-size: 1.125rem;
    }
}

/* ============================================
   User Location Marker
   ============================================ */

.user-location-container {
    background: transparent !important;
    border: none !important;
}

.user-location-marker {
    position: relative;
    width: 24px;
    height: 24px;
}

.user-location-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    z-index: 2;
}

.user-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   Sort Controls
   ============================================ */

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--sand-dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sort-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sort-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-card);
    border: 1.5px solid var(--sand-dark);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.sort-btn:hover:not(:disabled) {
    border-color: var(--ocean-light);
    color: var(--ocean);
}

.sort-btn.active {
    background: linear-gradient(135deg, var(--ocean-light), var(--ocean));
    border-color: var(--ocean);
    color: white;
}

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

/* ============================================
   Card Distance & Rating
   ============================================ */

.card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-distance {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ocean);
    background: rgba(14, 165, 233, 0.1);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.card-rating {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
    padding: 3px 8px;
    border-radius: 999px;
}

/* ============================================
   Sun Widget
   ============================================ */

.sun-widget {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
    padding: 16px 20px;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.25);
}

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

.sun-title {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.daylight-hours {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sunset-coral);
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.sun-times {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sun-time {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sun-time.sunrise {
    justify-content: flex-start;
}

.sun-time.sunset {
    justify-content: flex-end;
    text-align: right;
}

.sun-time.sunset .sun-info {
    align-items: flex-end;
}

.sun-emoji {
    font-size: 1.5rem;
}

.sun-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sun-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.sun-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
}

.sun-arc-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sunArcCanvas {
    display: block;
}

/* ============================================
   Weather Widget
   ============================================ */

.weather-widget {
    background: linear-gradient(135deg, var(--ocean-light), var(--ocean));
    color: white;
    padding: 16px 20px;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.weather-condition {
    font-size: 0.9rem;
    opacity: 0.9;
}

.weather-details {
    text-align: right;
    font-size: 0.8rem;
    opacity: 0.85;
}

.weather-detail-row {
    margin-bottom: 2px;
}

.weather-sun {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
}

.sun-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-forecast {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    overflow-x: auto;
}

.forecast-day {
    flex: 0 0 auto;
    text-align: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    min-width: 70px;
}

.forecast-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.forecast-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.forecast-temps {
    font-size: 0.75rem;
}

.forecast-high {
    font-weight: 700;
}

.forecast-low {
    opacity: 0.7;
}

/* ============================================
   Tide Widget
   ============================================ */

.tide-widget {
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    padding: 16px 20px;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
}

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

.tide-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.tide-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tide-chart {
    position: relative;
    height: 80px;
    margin-bottom: 12px;
}

.tide-canvas {
    width: 100%;
    height: 100%;
}

.tide-times {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
}

.tide-time {
    text-align: center;
}

.tide-type {
    font-weight: 600;
    margin-bottom: 2px;
}

.tide-type.high {
    color: var(--ocean);
}

.tide-type.low {
    color: var(--sunset-dark);
}

.tide-value {
    color: var(--text-secondary);
}

/* Collapsible info panel */
.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-elevated);
    z-index: 10000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-smooth), visibility 0.3s;
}

.info-panel.open {
    opacity: 1;
    visibility: visible;
}

.info-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--sand-dark);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    max-width: 900px;
    margin: 0 auto;
}

.info-panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.info-panel-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sand);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s;
}

.info-panel-close:hover {
    background: var(--sand-dark);
    transform: scale(1.05);
}

.info-panel-content {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

/* Desktop: stacked layout with larger charts */
@media (min-width: 768px) {
    .info-panel-content {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .sun-widget,
    .weather-widget,
    .tide-widget {
        margin: 0;
    }

    .tide-canvas-large {
        height: 220px;
    }
}

/* Info button in header */
.info-toggle-btn {
    position: fixed;
    top: 70px;
    right: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
}

.info-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.6);
}

/* Loading states */
.weather-loading,
.tide-loading {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.tide-loading {
    color: var(--text-secondary);
}

/* Expand hint */
.expand-hint {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.7;
    padding-top: 8px;
    cursor: pointer;
}

.tide-expand-hint {
    color: var(--text-secondary);
    border-top: 1px solid var(--sand-dark);
    margin-top: 12px;
    padding-top: 12px;
}

/* Weather feels like */
.weather-feels {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Expanded sections */
.weather-expanded,
.tide-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.weather-expanded.open,
.tide-expanded.open {
    max-height: 1000px;
}

.expanded-section {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 12px;
}

.tide-expanded .expanded-section {
    border-top-color: var(--sand-dark);
}

.expanded-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    opacity: 0.9;
}

.tide-expanded .expanded-title {
    color: var(--text-primary);
}

/* Hourly forecast */
.hourly-forecast {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.hourly-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    min-width: 56px;
}

.hourly-time {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.hourly-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.hourly-temp {
    font-size: 0.85rem;
    font-weight: 700;
}

.hourly-details {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Weekly forecast */
.weekly-forecast {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekly-day {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 12px;
}

.weekly-day-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.weekly-day-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.weekly-day-date {
    font-size: 0.75rem;
    opacity: 0.7;
}

.weekly-day-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.weekly-icon {
    font-size: 1.25rem;
}

.weekly-temps {
    font-size: 0.9rem;
}

.weekly-high {
    font-weight: 700;
}

.weekly-low {
    opacity: 0.7;
    margin-left: 4px;
}

.weekly-condition {
    flex: 1;
    font-size: 0.8rem;
    opacity: 0.9;
}

.weekly-day-details {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Weekly tides */
.weekly-tides {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tide-day {
    background: var(--sand);
    border-radius: 10px;
    padding: 12px;
}

.tide-day-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sand-dark);
}

.tide-day-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tide-day-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tide-day-times {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.tide-day-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.tide-day-item.high {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.tide-day-item.low {
    background: rgba(249, 115, 22, 0.1);
    color: #c2410c;
}

.tide-arrow {
    font-size: 0.7rem;
}

.tide-item-time {
    font-weight: 600;
}

.tide-item-height {
    opacity: 0.8;
    margin-left: auto;
}

/* Widget click area styling */
.weather-summary,
.tide-summary {
    cursor: pointer;
}

.weather-widget.expanded .expand-hint,
.tide-widget.expanded .expand-hint {
    display: none;
}

/* Large 7-Day Tide Chart */
.tide-chart-large {
    margin: 16px 0;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.tide-canvas-large {
    width: 100%;
    height: 180px;
    display: block;
}

.tide-source {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    opacity: 0.7;
}

.tide-source a {
    color: var(--ocean-medium);
    text-decoration: none;
}

.tide-source a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .info-panel-content {
        padding: 16px;
    }

    .info-panel-header {
        padding: 16px;
    }

    .sun-widget {
        margin: 0 0 12px;
    }

    .sun-times {
        flex-wrap: nowrap;
    }

    .sun-emoji {
        font-size: 1.25rem;
    }

    .sun-value {
        font-size: 1rem;
    }

    #sunArcCanvas {
        width: 100px;
        height: 50px;
    }

    .weather-widget {
        margin: 0 0 16px;
    }

    .tide-widget {
        margin: 0;
    }

    .tide-canvas-large {
        height: 140px;
    }
}

/* ============================================
   Login Screen
   ============================================ */

.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean) 50%, var(--lagoon) 100%);
    z-index: 99999;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.login-logo {
    font-size: 4rem;
    margin-bottom: 8px;
    animation: floatHibiscus 3s ease-in-out infinite;
}

@keyframes floatHibiscus {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.login-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ocean-deep);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.login-dates {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 32px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    margin-bottom: 20px;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #4285F4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
    transform: translateY(-2px);
}

.google-btn:active {
    transform: translateY(0);
}

.google-icon {
    flex-shrink: 0;
}

.login-error {
    display: none;
    color: #dc2626;
    font-size: 0.875rem;
    padding: 12px;
    background: #fef2f2;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

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

.login-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
    z-index: 1;
}

.login-waves svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   User Profile (Header)
   ============================================ */

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.header-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 480px) {
    .header-title {
        gap: 12px;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .header-actions {
        gap: 12px;
    }
}

/* Header Action Buttons */
.header-action-btn,
.header-weather-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.header-action-btn:hover,
.header-weather-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.header-action-btn:active,
.header-weather-btn:active {
    transform: scale(0.95);
}

.header-weather-btn .weather-icon {
    font-size: 1.1rem;
}

@media (min-width: 480px) {
    .header-weather-btn {
        width: 38px;
        height: 38px;
    }

    .header-weather-btn .weather-icon {
        font-size: 1.2rem;
    }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .user-profile {
        gap: 8px;
        padding: 6px 10px;
    }
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .user-avatar {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 768px) {
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-out-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    flex-shrink: 0;
}

.sign-out-btn svg {
    width: 14px;
    height: 14px;
}

@media (min-width: 480px) {
    .sign-out-btn {
        width: 28px;
        height: 28px;
    }

    .sign-out-btn svg {
        width: 15px;
        height: 15px;
    }
}

@media (min-width: 768px) {
    .sign-out-btn {
        width: 32px;
        height: 32px;
    }

    .sign-out-btn svg {
        width: 16px;
        height: 16px;
    }
}

.sign-out-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sign-out-btn:active {
    transform: scale(0.95);
}

/* Mobile adjustments for user profile */
@media (max-width: 480px) {
    .user-profile {
        padding: 6px 10px;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .sign-out-btn {
        width: 28px;
        height: 28px;
    }
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .login-card {
        padding: 56px 48px;
    }

    .login-logo {
        font-size: 5rem;
    }

    .login-title {
        font-size: 2.5rem;
    }

    .user-profile {
        padding: 8px 16px;
    }

    .user-name {
        max-width: 150px;
    }
}

/* ============================================
   COMMENTS SYSTEM
   ============================================ */

/* Comments Section Container */
.comments-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.comments-header .comment-icon {
    font-size: 1.2rem;
}

.comments-count {
    font-weight: 400;
    color: var(--text-secondary, #666);
    font-size: 0.95rem;
}

/* Comment Form */
.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-light, #7dd3fc);
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    background: var(--bg-secondary, #f8fafc);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary, #0ea5e9);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    background: #fff;
}

.comment-input::placeholder {
    color: var(--text-tertiary, #999);
}

.comment-submit-btn {
    align-self: flex-end;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary, #0ea5e9), var(--primary-dark, #0284c7));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Reply Form (nested) */
.reply-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-left: 48px;
    align-items: flex-start;
}

.reply-form .comment-form-avatar {
    width: 28px;
    height: 28px;
}

.reply-form .comment-input {
    padding: 10px 14px;
    font-size: 0.9rem;
    min-height: 38px;
}

.reply-form .comment-submit-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.reply-form-cancel {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: background 0.2s;
}

.reply-form-cancel:hover {
    background: var(--bg-secondary, #f1f5f9);
}

/* Comment Thread */
.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-thread-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary, #999);
    font-size: 0.95rem;
}

/* Individual Comment */
.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-light, #bae6fd);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-content {
    background: var(--bg-secondary, #f1f5f9);
    padding: 10px 14px;
    border-radius: 16px;
    border-top-left-radius: 4px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary, #1a1a2e);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-tertiary, #999);
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary, #333);
    word-wrap: break-word;
}

/* Deleted Comment */
.comment-deleted .comment-content {
    background: var(--bg-tertiary, #e2e8f0);
}

.comment-deleted-text {
    font-style: italic;
    color: var(--text-tertiary, #999);
}

/* Comment Actions */
.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    margin-left: 4px;
}

.comment-action-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.comment-action-btn:hover {
    color: var(--primary, #0ea5e9);
    background: rgba(14, 165, 233, 0.1);
}

.comment-action-btn.delete:hover {
    color: var(--danger, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

/* Comment Replies (Threaded) */
.comment-replies {
    margin-top: 12px;
    margin-left: 48px;
    padding-left: 16px;
    border-left: 2px solid var(--border-color, rgba(0, 0, 0, 0.08));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-replies .comment-avatar {
    width: 28px;
    height: 28px;
}

.comment-replies .comment-content {
    padding: 8px 12px;
}

.comment-replies .comment-author {
    font-size: 0.85rem;
}

.comment-replies .comment-text {
    font-size: 0.9rem;
}

/* Comment Photo Upload */
.comment-photo-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--sand-dark);
}

.comment-photo-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--sand-light);
    border: 1px dashed var(--sand-dark);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-photo-btn:hover {
    background: var(--ocean-light);
    border-color: var(--ocean);
    color: var(--ocean-deep);
}

.comment-photo-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-photo-preview-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--sand-dark);
}

.comment-photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-photo-preview-item .remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-photo-preview-item .remove-photo:hover {
    background: var(--sunset-red);
}

.comment-photo-preview-item.uploading {
    opacity: 0.6;
}

.comment-photo-preview-item.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Comment Photos Display */
.comment-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.comment-photo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.comment-photo:hover {
    transform: scale(1.05);
}

.comment-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Comment Photo Lightbox */
.comment-photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comment-photo-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.comment-photo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.comment-photo-lightbox .close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-photo-lightbox .close-lightbox:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Card Comment Badge */
.card-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-tertiary, #999);
    padding: 2px 6px;
    border-radius: 10px;
    transition: color 0.2s;
}

.card-comments.has-comments {
    color: var(--primary, #0ea5e9);
    background: rgba(14, 165, 233, 0.1);
    font-weight: 500;
}

/* Map Popup Comment Line */
.popup-comments {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.popup-comments.has-comments {
    color: var(--primary, #0ea5e9);
    font-weight: 500;
}

/* Comments Loading State */
.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-tertiary, #999);
}

.comments-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-top-color: var(--primary, #0ea5e9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Mobile Adjustments for Comments */
@media (max-width: 480px) {
    .comments-section {
        margin-top: 20px;
        padding-top: 20px;
    }

    .comment-form {
        gap: 10px;
    }

    .comment-form-avatar {
        width: 32px;
        height: 32px;
    }

    .comment-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
    }

    .comment-replies {
        margin-left: 40px;
        padding-left: 12px;
    }

    .reply-form {
        margin-left: 40px;
    }
}

/* ============================================
   LOCATION EDITOR
   ============================================ */

/* FAB Button */
.add-location-fab {
    position: fixed;
    bottom: calc(var(--nav-height, 60px) + 80px);
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.add-location-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}

.add-location-fab:active {
    transform: scale(0.95);
}

/* Editor Modal */
.editor-modal .modal-content {
    max-width: 560px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.editor-modal-content {
    display: flex;
    flex-direction: column;
}

.editor-header {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    flex-shrink: 0;
}

.editor-header h2 {
    color: white;
}

.editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.editor-form {
    padding: 0;
}

/* Form Sections */
.editor-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.editor-section-search {
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.editor-section-search h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #166534;
    font-weight: 600;
}

.section-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.section-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

.section-toggle h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-muted, #999);
    transition: transform 0.3s ease;
}

.editor-section.collapsed .section-content {
    display: none;
}

.editor-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 0 20px 20px;
}

/* Places Search */
.places-search-container {
    position: relative;
    margin-bottom: 16px;
}

.places-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.places-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Google Places Autocomplete Dropdown - must be above modal */
.pac-container {
    z-index: 10000 !important;
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pac-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: background 0.15s;
}

.pac-item:hover {
    background: #f0fdf4;
}

.pac-item-selected {
    background: #dcfce7;
}

.pac-icon {
    margin-right: 12px;
}

.pac-item-query {
    font-weight: 600;
    color: #1a1a2e;
}

.pac-matched {
    font-weight: 700;
}

.location-actions {
    display: flex;
    gap: 12px;
}

.location-action-btn {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.location-action-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.location-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.location-action-btn .icon {
    font-size: 1.1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.custom-text-input {
    margin-top: 8px;
    display: none;
}

.custom-text-input.visible {
    display: block;
}

/* Editor Actions */
.editor-actions {
    padding: 16px 20px;
    background: var(--bg-elevated, #f8fafc);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.editor-actions .action-btn {
    flex: 1;
}

.editor-actions .action-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.editor-actions .action-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Map Picker Modal */
.map-picker-modal .modal-content {
    max-width: 90vw;
    max-height: 85vh;
    width: 600px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.map-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.map-picker-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.map-picker-header .modal-close {
    position: static;
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.map-picker-instructions {
    padding: 12px 20px;
    background: #f0f9ff;
    font-size: 0.9rem;
    color: #0369a1;
    text-align: center;
}

.map-picker-map {
    height: 350px;
    flex: 1;
}

.map-picker-coords {
    padding: 12px 20px;
    background: #f1f5f9;
    font-family: monospace;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary, #666);
}

.map-picker-actions {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.map-picker-actions .action-btn {
    flex: 1;
}

.map-picker-actions .action-btn.primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

/* Context Menu */
.map-context-menu {
    position: fixed;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 180px;
    z-index: 10000;
    animation: contextMenuFadeIn 0.15s ease;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #f0fdf4;
}

.context-menu-item .icon {
    font-size: 1.1rem;
}

/* Preview Marker */
.preview-marker-container {
    background: transparent !important;
    border: none !important;
}

.preview-marker {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    animation: previewBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes previewBounce {
    0% {
        transform: rotate(-45deg) translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: rotate(-45deg) translateY(0);
        opacity: 1;
    }
}

/* Edit Indicator in Detail Modal */
.edit-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #92400e;
    margin-left: 8px;
}

.edit-indicator.custom {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #15803d;
}

/* Custom Location Badge in Cards */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.location-badge.custom {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.location-badge.edited {
    background: rgba(251, 191, 36, 0.15);
    color: #92400e;
}

/* Edit Button in Modal Actions */
.action-btn.edit-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.action-btn.edit-btn:hover {
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .add-location-fab {
        bottom: calc(var(--nav-height, 60px) + 70px);
        right: 12px;
        width: 50px;
        height: 50px;
    }

    .location-actions {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group.half {
        flex: none;
    }

    .map-picker-map {
        height: 280px;
    }

    .editor-modal .modal-content {
        max-height: 95vh;
    }
}

/* ============================================
   Activity Log
   ============================================ */

#activityView {
    background: var(--bg-elevated);
}

.activity-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-elevated);
    padding: 16px 20px;
    border-bottom: 1px solid var(--sand-dark);
}

.activity-header h2 {
    margin: 0 0 12px 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.activity-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.activity-filter-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-filter-select:focus {
    outline: none;
    border-color: var(--ocean);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.activity-list {
    padding: 0 20px 20px;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}

.activity-loading,
.activity-empty,
.activity-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.activity-error {
    color: var(--sunset-red);
}

.activity-date-header {
    padding: 16px 0 8px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sand-light);
    margin-bottom: 8px;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--sand-light);
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: var(--sand-light);
    margin: 0 -20px;
    padding: 14px 20px;
}

.activity-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ocean-light), var(--ocean));
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-item .activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 0;
    border: none;
    background: none;
    position: static;
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.activity-action {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.activity-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-item.clickable {
    cursor: pointer;
}

.activity-item.clickable:hover {
    background: var(--ocean-light);
}

.activity-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--ocean);
    padding: 4px 10px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 6px;
}

.activity-item.clickable:hover .activity-location-badge {
    background: rgba(14, 165, 233, 0.25);
    color: var(--ocean-deep);
}

.activity-load-more {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: var(--sand-light);
    border: 1px dashed var(--sand-dark);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-load-more:hover {
    background: var(--ocean-light);
    border-color: var(--ocean);
    color: var(--ocean-deep);
}

/* Activity Log Mobile Adjustments */
@media (max-width: 480px) {
    .activity-header {
        padding: 12px 16px;
    }

    .activity-header h2 {
        font-size: 1.3rem;
    }

    .activity-filters {
        flex-direction: column;
        gap: 8px;
    }

    .activity-filter-select {
        min-width: 100%;
    }

    .activity-list {
        padding: 0 16px 16px;
    }

    .activity-avatar {
        width: 36px;
        height: 36px;
    }

    .activity-item:hover {
        margin: 0 -16px;
        padding: 14px 16px;
    }
}


/* ============================================
   Itinerary View - Hawaiian Timeline
   ============================================ */

.itinerary-container {
    padding: 20px;
    padding-bottom: 100px;
    max-width: 800px;
    margin: 0 auto;
    overflow-y: auto;
    height: 100%;
}

/* Travelers Section */
.itinerary-travelers {
    background: linear-gradient(135deg, var(--ocean) 0%, var(--ocean-deep) 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.25);
}

.itinerary-travelers h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.traveler-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.traveler {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Timeline */
.itinerary-timeline {
    position: relative;
    padding-left: 24px;
}

.itinerary-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom,
        var(--ocean-light) 0%,
        var(--ocean) 30%,
        var(--sunset-orange) 70%,
        var(--sunset-pink) 100%
    );
    border-radius: 2px;
}

/* Day Entry */
.itinerary-day {
    position: relative;
    margin-bottom: 24px;
}

.day-marker {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ocean);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    z-index: 1;
}

.day-marker.pre-trip {
    background: var(--text-muted);
}

.day-marker.highlight {
    background: linear-gradient(135deg, var(--sunset-orange), var(--sunset-pink));
    width: 20px;
    height: 20px;
    left: -22px;
    top: 2px;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.4);
}

.day-marker.condo {
    background: var(--palm);
}

.day-marker.cabin {
    background: var(--volcano);
}

/* Day Content */
.day-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--sand-dark);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day-content:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-elevated);
}

.day-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ocean);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.day-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Events */
.itinerary-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.itinerary-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--sand-dark);
}

.itinerary-event.flight {
    border-left-color: var(--ocean);
    background: rgba(14, 165, 233, 0.05);
}

.itinerary-event.car {
    border-left-color: var(--sunset-orange);
    background: rgba(249, 115, 22, 0.05);
}

.itinerary-event.accommodation {
    border-left-color: var(--palm);
    background: rgba(34, 197, 94, 0.05);
}

.itinerary-event.activity {
    border-left-color: var(--sunset-pink);
    background: rgba(236, 72, 153, 0.05);
}

.itinerary-event.cabin {
    border-left-color: var(--volcano);
    background: rgba(185, 28, 28, 0.05);
}

.event-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.event-info {
    flex: 1;
}

.event-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.event-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Trip Stats */
.itinerary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed var(--sand-dark);
}

.stat-card {
    text-align: center;
    padding: 16px 8px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--sand-dark);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card.flights {
    border-top: 3px solid var(--ocean);
}

.stat-card.car {
    border-top: 3px solid var(--sunset-orange);
}

.stat-card.condo {
    border-top: 3px solid var(--palm);
}

.stat-card.cabin {
    border-top: 3px solid var(--volcano);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive - Itinerary */
@media (max-width: 600px) {
    .itinerary-container {
        padding: 16px;
    }

    .itinerary-travelers {
        padding: 20px;
    }

    .itinerary-travelers h2 {
        font-size: 1.3rem;
    }

    .traveler {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .itinerary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-number {
        font-size: 1.75rem;
    }
}

@media (max-width: 400px) {
    .itinerary-timeline {
        padding-left: 20px;
    }

    .day-marker {
        left: -16px;
        width: 14px;
        height: 14px;
    }

    .day-marker.highlight {
        width: 18px;
        height: 18px;
        left: -18px;
    }

    .day-content {
        padding: 14px 16px;
    }

    .day-title {
        font-size: 1.05rem;
    }

    .itinerary-event {
        padding: 10px;
        gap: 10px;
    }

    .event-icon {
        font-size: 1.1rem;
    }

    .event-name {
        font-size: 0.9rem;
    }
}

/* ============================================
   Expense Splitting - Amber/Gold Theme
   ============================================ */

/* Expense Theme Colors */
:root {
    --expense-primary: #f59e0b;
    --expense-dark: #d97706;
    --expense-light: #fbbf24;
    --expense-bg: rgba(245, 158, 11, 0.1);
    --expense-border: rgba(245, 158, 11, 0.3);
}

/* ============================================
   Expenses View
   ============================================ */

#expensesView {
    padding-bottom: 100px;
}

.expenses-header {
    padding: 20px;
    background: linear-gradient(180deg, var(--bg-elevated) 0%, transparent 100%);
}

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

.expenses-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expenses-header-title h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.expenses-header-actions {
    display: flex;
    gap: 8px;
}

.export-btn {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--expense-bg);
    border-color: var(--expense-primary);
    color: var(--expense-dark);
}

/* Travelers Row */
.expenses-travelers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.traveler-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--traveler-color) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--traveler-color) 30%, transparent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.traveler-chip:hover {
    background: color-mix(in srgb, var(--traveler-color) 25%, transparent);
    transform: translateY(-1px);
}

.traveler-chip .traveler-emoji {
    font-size: 1rem;
}

.traveler-chip .traveler-name {
    color: var(--text-primary);
}

.add-traveler-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px dashed var(--sand-dark);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-traveler-btn:hover {
    border-color: var(--expense-primary);
    color: var(--expense-primary);
    background: var(--expense-bg);
}

/* Summary Cards */
.expenses-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-lg);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.summary-card:hover {
    border-color: var(--expense-primary);
    box-shadow: 0 4px 16px var(--expense-bg);
}

.summary-card.total {
    border-top: 3px solid var(--expense-primary);
}

.summary-card.owe {
    border-top: 3px solid var(--volcano);
}

.summary-card.owed {
    border-top: 3px solid var(--palm);
}

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

.summary-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Filters */
.expenses-filters {
    display: flex;
    gap: 10px;
    padding: 0 20px 16px;
}

.expense-filter-select {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.expense-filter-select:focus {
    outline: none;
    border-color: var(--expense-primary);
    box-shadow: 0 0 0 3px var(--expense-bg);
}

/* Expenses List */
.expenses-list {
    padding: 0 20px;
}

.expense-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.expense-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.expense-empty p {
    margin: 0 0 8px;
}

.expense-empty-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Date Headers */
.expense-date-header {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 0 8px;
    border-bottom: 1px solid var(--sand-light);
    margin-bottom: 12px;
}

/* Expense Card */
.expense-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-light);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expense-card:hover {
    border-color: var(--expense-primary);
    box-shadow: 0 4px 16px var(--expense-bg);
    transform: translateY(-1px);
}

.expense-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    flex-shrink: 0;
}

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

.expense-description {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expense-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.expense-payer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.expense-split {
    opacity: 0.8;
}

.expense-amount {
    text-align: right;
    flex-shrink: 0;
}

.expense-amount .amount-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--expense-dark);
    display: block;
}

.expense-amount .amount-currency {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   Expense Modal
   ============================================ */

.expense-modal .modal-header {
    background: linear-gradient(135deg, var(--expense-primary) 0%, var(--expense-dark) 100%);
}

.expense-form {
    padding: 0;
}

/* Collapsible Sections */
.collapsible-section {
    border-bottom: 1px solid var(--sand-light);
}

.collapsible-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.section-header:hover {
    background: var(--sand-light);
}

.section-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h3::before {
    content: '▸';
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.collapsible-section.expanded .section-header h3::before {
    transform: rotate(90deg);
}

.section-header .required-badge {
    font-size: 0.7rem;
    color: var(--volcano);
    font-weight: 500;
}

.collapsible-section .section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-section.expanded .section-content {
    max-height: 500px;
}

.section-content-inner {
    padding: 0 20px 20px;
}

/* Form Groups */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row > * {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--expense-primary);
    box-shadow: 0 0 0 3px var(--expense-bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Amount Input */
.amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-input-wrapper input {
    flex: 1;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.amount-input-wrapper select {
    width: 80px;
    flex-shrink: 0;
}

/* Location Type Toggle */
.location-type-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.location-type-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.location-type-toggle input[type="radio"] {
    width: auto;
    accent-color: var(--expense-primary);
}

/* Split Type Buttons */
.split-type-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.split-type-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.split-type-btn:hover {
    border-color: var(--expense-primary);
}

.split-type-btn.active {
    background: var(--expense-bg);
    border-color: var(--expense-primary);
    color: var(--expense-dark);
}

/* Participant Checkboxes */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--traveler-color, #6b7280) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--traveler-color, #6b7280) 20%, transparent);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.participant-checkbox:hover {
    background: color-mix(in srgb, var(--traveler-color, #6b7280) 20%, transparent);
}

.participant-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--traveler-color, var(--expense-primary));
    cursor: pointer;
}

.participant-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-emoji {
    font-size: 1.2rem;
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
}

.participant-amount {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--expense-dark);
}

/* Split Validation */
#splitValidation {
    margin-top: 12px;
    font-size: 0.85rem;
    text-align: center;
}

.validation-ok {
    color: var(--palm);
}

.validation-error {
    color: var(--volcano);
}

/* Receipt Upload */
.receipt-upload {
    margin-top: 16px;
}

.receipt-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: var(--sand-light);
    border: 2px dashed var(--sand-dark);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
}

.receipt-upload-label:hover {
    border-color: var(--expense-primary);
    background: var(--expense-bg);
    color: var(--expense-dark);
}

.receipt-upload input[type="file"] {
    display: none;
}

.receipt-preview-container {
    position: relative;
    margin-top: 12px;
}

.receipt-preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.receipt-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--sand-light);
    background: var(--bg-elevated);
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--expense-primary), var(--expense-dark));
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--expense-bg);
}

.action-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn.danger {
    background: transparent;
    color: var(--volcano);
    border: 1px solid var(--volcano);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   Balance Modal
   ============================================ */

.balance-modal .modal-header {
    background: linear-gradient(135deg, var(--palm) 0%, #16a34a 100%);
}

.balance-list {
    padding: 16px 20px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.balance-item.balance-positive {
    border-left: 3px solid var(--palm);
}

.balance-item.balance-negative {
    border-left: 3px solid var(--volcano);
}

.balance-traveler {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-traveler .traveler-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.balance-traveler .traveler-name {
    font-weight: 600;
    color: var(--text-primary);
}

.balance-amount {
    text-align: right;
}

.balance-status {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.balance-positive .balance-value {
    color: var(--palm);
}

.balance-negative .balance-value {
    color: var(--volcano);
}

/* Settlement Suggestions */
.settlement-suggestions-section,
.settlement-history-section {
    padding: 16px 20px;
    border-top: 1px solid var(--sand-light);
}

.settlement-suggestions-section h3,
.settlement-history-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}

.settlement-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--expense-bg);
    border: 1px solid var(--expense-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.settlement-suggestion .settlement-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.settlement-suggestion .arrow {
    color: var(--text-muted);
}

.settlement-suggestion .settlement-amount {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--expense-dark);
}

.settle-btn {
    padding: 6px 12px;
    background: var(--expense-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settle-btn:hover {
    background: var(--expense-dark);
}

.no-settlements {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* Settlement History */
.settlement-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--sand-light);
}

.settlement-history-item:last-child {
    border-bottom: none;
}

.settlement-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.settlement-meta {
    text-align: right;
}

.settlement-meta .settlement-amount {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--palm);
    display: block;
}

.settlement-meta .settlement-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Settlement Modal
   ============================================ */

.settlement-modal .modal-header {
    background: linear-gradient(135deg, var(--expense-primary) 0%, var(--expense-dark) 100%);
}

.settlement-form {
    padding: 20px;
}

/* ============================================
   Traveler Modal
   ============================================ */

.traveler-modal .modal-header {
    background: linear-gradient(135deg, var(--ocean) 0%, #0284c7 100%);
}

.traveler-form {
    padding: 20px;
}

/* Emoji Picker */
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.emoji-option {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-option:hover {
    border-color: var(--ocean);
    background: rgba(14, 165, 233, 0.1);
}

.emoji-option.selected {
    border-color: var(--ocean);
    background: rgba(14, 165, 233, 0.2);
    box-shadow: 0 0 0 2px var(--ocean-light);
}

/* Color Picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.color-option {
    width: 36px;
    height: 36px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

/* ============================================
   Add Expense FAB
   ============================================ */

.add-expense-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--expense-primary), var(--expense-dark));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
}

.add-expense-fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 28px rgba(245, 158, 11, 0.5);
}

.add-expense-fab:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   Responsive - Expenses
   ============================================ */

@media (max-width: 600px) {
    .expenses-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .summary-card {
        padding: 10px;
    }

    .summary-value {
        font-size: 1.1rem;
    }

    .summary-label {
        font-size: 0.65rem;
    }

    .expenses-filters {
        flex-direction: column;
        gap: 8px;
    }

    .expense-card {
        padding: 12px;
    }

    .expense-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .expense-description {
        font-size: 0.9rem;
    }

    .expense-amount .amount-value {
        font-size: 1rem;
    }

    .add-expense-fab {
        bottom: 80px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-actions .action-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .expenses-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .expenses-header-actions {
        width: 100%;
    }

    .export-btn {
        flex: 1;
    }

    .traveler-chip .traveler-name {
        display: none;
    }

    .split-type-buttons {
        flex-wrap: wrap;
    }

    .split-type-btn {
        min-width: calc(50% - 4px);
    }
}

/* ============================================
   Expense Sections (Accordion Style)
   ============================================ */

.expense-section {
    border-bottom: 1px solid var(--sand-light);
}

.expense-section:last-child {
    border-bottom: none;
}

.section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.section-toggle:hover {
    background: var(--sand-light);
}

.section-toggle h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.toggle-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

/* Expense Section - Expanded by default */
.expense-section .section-content {
    display: block;
    padding: 0 20px 20px;
}

/* Only hide when explicitly collapsed */
.expense-section.collapsed .section-content {
    display: none;
}

.expense-section:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.expense-section.collapsed .toggle-icon {
    transform: rotate(0deg);
}

/* Split Type Tabs */
.split-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.split-type-btn {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.split-type-btn:hover {
    border-color: var(--expense-primary);
}

.split-type-btn.active {
    background: var(--expense-bg);
    border-color: var(--expense-primary);
    color: var(--expense-dark);
}

/* Split Type Pills - New v2 Design */
.split-type-pills {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--sand-light);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.split-type-pill {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.split-type-pill:hover:not(.active) {
    color: var(--expense-dark);
    background: rgba(245, 158, 11, 0.1);
}

.split-type-pill.active {
    background: var(--expense-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* Participant List */
.participant-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

/* Split Validation */
.split-validation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 14px;
    background: var(--sand-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.split-validation.valid {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--palm);
}

.split-validation.invalid {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--hibiscus);
}

.validation-ok {
    color: var(--palm);
    font-weight: 600;
}

.validation-error {
    color: var(--hibiscus);
    font-weight: 600;
}

.split-total {
    color: var(--text-secondary);
}

.split-total strong {
    color: var(--expense-dark);
    font-family: var(--font-display);
}

.split-status {
    color: var(--palm);
    font-weight: bold;
}

/* Participant Checkbox - Enhanced v2 */
.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.participant-checkbox:hover {
    border-color: var(--expense-light);
}

.participant-checkbox:has(input:checked) {
    border-color: var(--expense-primary);
    background: var(--expense-bg);
}

.participant-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--expense-primary);
    flex-shrink: 0;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.participant-emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-weight {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--sand);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
}

.participant-split {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.participant-amount {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--expense-dark);
    font-family: var(--font-display);
}

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

/* Custom Split Input (for percentage/exact modes) */
.split-custom-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: right;
    font-family: var(--font-display);
}

.split-custom-input:focus {
    outline: none;
    border-color: var(--expense-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Hide split values when custom mode and unchecked */
.participant-checkbox:not(:has(input:checked)) .participant-amount,
.participant-checkbox:not(:has(input:checked)) .participant-percent {
    opacity: 0.3;
}

/* Radio Labels */
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.radio-label input[type="radio"] {
    accent-color: var(--expense-primary);
}

/* Receipt Preview */
.receipt-preview {
    min-height: 60px;
    background: var(--sand-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.no-receipt {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 20px;
}

.receipt-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.receipt-actions {
    display: flex;
    gap: 10px;
}

.upload-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--sand-light);
    border: 2px dashed var(--sand-dark);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    border-color: var(--expense-primary);
    background: var(--expense-bg);
    color: var(--expense-dark);
}

.upload-btn .icon {
    font-size: 1.1rem;
}

/* Expense Modal Actions */
.expense-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--sand-light);
}

.expense-actions .action-btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: all 0.2s ease;
}

.expense-actions .action-btn:first-child {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--sand-dark);
}

.expense-actions .action-btn:first-child:hover {
    background: var(--sand-light);
}

.expense-actions .action-btn.danger {
    background: transparent;
    color: var(--volcano);
    border: 1px solid var(--volcano);
}

.expense-actions .action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.expense-actions .action-btn.primary {
    background: linear-gradient(135deg, var(--expense-primary), var(--expense-dark));
    color: white;
}

.expense-actions .action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--expense-bg);
}

.expense-actions .action-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Expense Modal Specific */
.expense-modal {
    z-index: 10000;
}

.expense-modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.expense-header {
    background: linear-gradient(135deg, var(--expense-primary) 0%, var(--expense-dark) 100%) !important;
    flex-shrink: 0;
}

.expense-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.expense-form {
    display: block;
}

/* Expense Form Fields */
.expense-form .form-group {
    margin-bottom: 16px;
    display: block;
}

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

.expense-form input[type="text"],
.expense-form input[type="number"],
.expense-form input[type="date"],
.expense-form select,
.expense-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    display: block;
    box-sizing: border-box;
}

.expense-form input:focus,
.expense-form select:focus,
.expense-form textarea:focus {
    outline: none;
    border-color: var(--expense-primary);
    box-shadow: 0 0 0 3px var(--expense-bg);
}

.expense-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.expense-form .form-row .form-group {
    margin-bottom: 0;
}

/* Balance Modal Specific */
.balance-header {
    background: linear-gradient(135deg, var(--palm) 0%, #16a34a 100%) !important;
}

.balance-body {
    padding: 0;
}

/* Settlements Section in Balance Modal */
.settlements-section {
    padding: 16px 20px;
    border-top: 1px solid var(--sand-light);
}

.settlements-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.settlement-history {
    margin-top: 16px;
}

.settlement-history h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
