/* =============================================
   Hamba - Main Stylesheet
   ============================================= */

/* -----------------------------------------
   Base Styles
   ----------------------------------------- */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #374151;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif', serif;
    color: #1f2937;
}

/* -----------------------------------------
   Global Navigation
   ----------------------------------------- */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #f3f4f6;
    z-index: 50;
    height: 60px;
}

.global-nav-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.global-nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.global-nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.global-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.global-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.global-nav-link:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.global-nav-link.active {
    color: #0d9488;
    background: #ccfbf1;
}

.global-nav-right {
    display: flex;
    align-items: center;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-dropdown-trigger:hover {
    background: #f3f4f6;
}

.profile-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

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

.profile-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.profile-dropdown-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.profile-dropdown-email {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

.profile-dropdown-divider {
    height: 1px;
    background: #f3f4f6;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s;
}

.profile-dropdown-item:hover {
    background: #f9fafb;
}

.profile-dropdown-item-danger {
    color: #dc2626;
}

.profile-dropdown-item-danger:hover {
    background: #fef2f2;
}

/* Trip Selector on Timeline */
.trip-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.trip-selector-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.trip-selector-dropdown {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    background: transparent;
    border: none;
    cursor: pointer;
    padding-right: 1.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

.trip-selector-dropdown:focus {
    outline: none;
}

/* Mobile Navigation */
@media (max-width: 640px) {
    .global-nav-container {
        padding: 0 1rem;
    }
    
    .global-nav-left {
        gap: 1rem;
    }
    
    .global-nav-links {
        gap: 0.25rem;
    }
    
    .global-nav-link {
        padding: 0.5rem;
    }
    
    .global-nav-link span {
        display: none;
    }
    
    .global-nav-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .profile-dropdown-trigger svg:last-child {
        display: none;
    }
    
    .trip-selector {
        flex-direction: column;
        gap: 0.375rem;
        padding: 0.75rem 1rem;
    }
    
    .trip-selector-label {
        font-size: 0.75rem;
    }
}

/* -----------------------------------------
   Form Elements (Shared across all pages)
   ----------------------------------------- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

.form-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-select:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #0d9488;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #0f766e;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Alert/Message boxes */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* -----------------------------------------
   Card Styles
   ----------------------------------------- */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 2rem;
}

/* -----------------------------------------
   Map Styles (Leaflet)
   ----------------------------------------- */
#map {
    height: 400px;
    border-radius: 1rem;
}

/* Flight mini-maps in timeline */
[id^="map-"] {
    z-index: 1 !important;
    position: relative;
}

[id^="map-"] .leaflet-pane,
[id^="map-"] .leaflet-control-container {
    z-index: 1 !important;
}

[id^="map-"] .leaflet-tile-pane {
    z-index: 1 !important;
}

[id^="map-"] .leaflet-overlay-pane {
    z-index: 2 !important;
}

[id^="map-"] .leaflet-marker-pane {
    z-index: 3 !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 0.75rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* -----------------------------------------
   Action Buttons (Share, Delete) Styles
   ----------------------------------------- */

/* Subtle action buttons */
.delete-btn {
    opacity: 0;
    padding: 0.25rem;
    color: #9ca3af;
    border-radius: 0.25rem;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
}

.trip-header:hover .delete-btn,
.timeline-item:hover .delete-btn,
.delete-btn:focus {
    opacity: 1;
}

.delete-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Move button */
.move-btn {
    opacity: 0;
    padding: 0.25rem;
    color: #9ca3af;
    border-radius: 0.25rem;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
}

.timeline-item:hover .move-btn,
.move-btn:focus {
    opacity: 1;
}

.move-btn:hover {
    color: #0d9488;
    background-color: #f0fdfa;
}

/* Always visible share button */
.share-btn-visible {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0d9488;
    background-color: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn-visible svg {
    width: 0.875rem;
    height: 0.875rem;
}

.share-btn-visible:hover {
    background-color: #ccfbf1;
    border-color: #5eead4;
}

/* Share overlay */
.share-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-overlay.hidden {
    display: none;
}

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

.share-overlay-content {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.share-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.share-overlay-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.share-overlay-close {
    padding: 0.25rem;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.share-overlay-close:hover {
    color: #4b5563;
}

.share-overlay-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.share-overlay-text span {
    font-weight: 500;
    color: #374151;
}

.share-overlay-url-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.share-overlay-url {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    outline: none;
}

.share-overlay-url:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

.share-overlay-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    background: #0d9488;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.share-overlay-copy:hover {
    background: #0f766e;
}

.share-overlay-copied {
    font-size: 0.8125rem;
    color: #059669;
    font-weight: 500;
    text-align: center;
}

.share-overlay-copied.hidden {
    display: none;
}

/* Share sections */
.share-section {
    margin-bottom: 1rem;
}

.share-section-email {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.share-section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.share-email-box {
    display: flex;
    gap: 0.5rem;
}

.share-email-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.share-email-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.share-email-input::placeholder {
    color: #9ca3af;
}

.share-email-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, opacity 0.2s;
}

.share-email-btn:hover:not(:disabled) {
    background: #0f766e;
}

.share-email-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.share-email-status {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.share-email-status.hidden {
    display: none;
}

.share-email-success {
    color: #059669;
}

.share-email-error {
    color: #dc2626;
}

/* Move modal */
.move-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.move-modal.hidden {
    display: none;
}

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

.move-modal-content {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 24rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.move-modal-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #f0fdfa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.move-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.move-modal-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.move-modal-text span {
    font-weight: 500;
    color: #374151;
}

.move-modal-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.move-modal-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

.move-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.move-modal-cancel {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.move-modal-cancel:hover {
    background: #f9fafb;
}

.move-modal-confirm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background: #0d9488;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.move-modal-confirm:hover {
    background: #0f766e;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Delete confirmation modal */
.delete-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-modal.hidden {
    display: none;
}

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

.delete-modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.delete-modal-icon {
    width: 3rem;
    height: 3rem;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.delete-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.delete-modal-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.delete-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.delete-modal-cancel {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-modal-cancel:hover {
    background: #f3f4f6;
}

.delete-modal-confirm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background: #ef4444;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-modal-confirm:hover {
    background: #dc2626;
}

.delete-modal-confirm:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Inline trip name editing */
.trip-name-input {
    font-family: 'Noto Serif', serif;
    min-width: 150px;
    max-width: 400px;
}

.trip-name-display:hover::after {
    content: ' ✏️';
    font-size: 0.75rem;
    opacity: 0.5;
}

/* -----------------------------------------
   Timeline Styles
   ----------------------------------------- */

/* Trip section container */
.trip-section {
    position: relative;
}

/* Trip header with green dot */
.trip-header {
    display: flex;
    align-items: center;
    padding-left: 8rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.trip-header-dot {
    position: absolute;
    left: calc(8rem - 2rem);
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #10b981;
    transform: translateX(-50%);
    margin-left: 4px;
    z-index: 3;
}

/* Line connecting trip header dot to first item */
.trip-header::after {
    content: '';
    position: absolute;
    left: calc(8rem - 2rem);
    top: 0.75rem;
    bottom: -1.5rem;
    width: 2px;
    background: #d1d5db;
    margin-left: 3px;
}

.timeline {
    position: relative;
    padding-left: 8rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-of-type {
    padding-bottom: 0;
}

/* Timeline line - drawn per item */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    bottom: -2.5rem;
    width: 2px;
    background: #d1d5db;
    margin-left: 3px;
}

/* Last item connects to end dot */
.timeline-item.last-item::before {
    bottom: -1rem;
}

/* Green dot at end of trip */
.trip-end-dot {
    position: relative;

    
    height: 0.75rem;
    margin-top: 0.625rem;
}

.trip-end-dot::before {
    content: '';
    position: absolute;
    left: calc(-2rem);
    top: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #10b981;
    transform: translateX(-50%);
    margin-left: 4px;
    z-index: 3;
}

.timeline-date {
    position: absolute;
    left: -8rem;
    top: 0;
    width: 5.5rem;
    text-align: right;
    padding-right: 1.5rem;
    line-height: 1.3;
}

.timeline-date .weekday {
    font-size: 0.75rem;
    color: #6b7280;
}

.timeline-date .day-month {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Mobile date - hidden by default, shown on small screens */
.timeline-date-mobile {
    display: none;
}

/* Weather days container */
.weather-days-container {
    display: inline-block;
}

.weather-days-scroll {
    display: flex;
    gap: 1rem;
}

/* Icon on the timeline */
.timeline-icon {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transform: translateX(-50%);
    margin-left: 4px;
    background: white;
    color: #6b7280;
}

.timeline-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Flight timeline within a card */
.flight-timeline {
    position: relative;
    padding-left: 2.5rem;
    margin: 1rem 0;
}

.flight-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d1d5db;
}

/* New flight timeline v2 - time on left, info on right */
.flight-timeline-v2 {
    display: flex;
    flex-direction: column;
}

.flight-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding-top: 0.5rem;
}

.flight-row:last-child {
    align-items: flex-end;
}

.flight-row-middle {
    align-items: center;
    padding-top: 0;
}

.flight-time {
    width: 4.5rem;
    text-align: right;
    padding-right: 1rem;
    padding-top: 0.25rem;
    padding-bottom: 0.5rem;
    flex-shrink: 0;
}

.flight-row-middle .flight-time {
    padding-top: 0;
    padding-bottom: 0;
}

.flight-timeline-v2 {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Line connecting the dots - centered under the dots */
.flight-timeline-v2::before {
    content: '';
    position: absolute;
    /* 4.5rem (time width) + half of 1.25rem (dot column) - 1px (half line width) */
    left: calc(4.5rem + 0.625rem - 1px);
    /* Start from center of first dot, end at center of last dot */
    top: calc(0.5rem + 0.25rem + 0.25rem);
    bottom: calc(0.5rem + 0.25rem);
    width: 2px;
    background: #d1d5db;
}

.flight-line-dot {
    position: relative;
    width: 1.25rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.25rem;
}

.flight-row:last-child .flight-line-dot {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 0.25rem;
}

.flight-line-dot::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
    z-index: 1;
}

.flight-line {
    position: relative;
    width: 1.25rem;
    flex-shrink: 0;
}

.flight-info {
    flex: 1;
    padding: 0.25rem 0 0.5rem 0.75rem;
}

.flight-stop {
    position: relative;
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.flight-stop::before {
    content: '';
    position: absolute;
    left: calc(-2rem + 1px);
    top: 0.75rem;
    transform: translateX(-50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #9ca3af;
}

.flight-duration {
    position: relative;
    padding: 0.5rem 0;
    padding-left: 3.5rem;
    display: flex;
    align-items: center;
}

/* -----------------------------------------
   Chat/Manager Styles
   ----------------------------------------- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    max-width: 800px;
    margin: 0 auto;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
}

.message-user {
    align-self: flex-end;
    background: #0d9488;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-assistant {
    align-self: flex-start;
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
}

.message-system {
    align-self: center;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-content pre {
    background: rgba(0,0,0,0.1);
    padding: 0.5rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.message-assistant .message-content pre {
    background: rgba(0,0,0,0.05);
}

.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.message-images img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-images img:hover {
    transform: scale(1.02);
}

.input-area {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    background: white;
}

.input-container {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#chat-input {
    width: 100%;
    min-height: 44px;
    max-height: 200px;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    resize: none;
    font-size: 0.9375rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#chat-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

#chat-input::placeholder {
    color: #9ca3af;
}

.image-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 100px;
    max-height: 80px;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.image-preview .remove-image {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.send-button {
    padding: 0.75rem 1.25rem;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.send-button:hover {
    background: #0f766e;
}

.send-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 1rem;
    border-bottom-left-radius: 0.25rem;
}

.typing-indicator.show {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.function-call {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.function-call code {
    background: rgba(0,0,0,0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Image modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-modal.show {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Attachment button */
.attach-button {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.375rem;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: color 0.2s, background 0.2s;
}

.attach-button:hover {
    color: #0d9488;
    background: #f3f4f6;
}

/* -----------------------------------------
   Profile Page Styles
   ----------------------------------------- */
.profile-avatar {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(to bottom right, #0d9488, #0f766e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Profile Photo Upload */
.profile-photo-container {
    position: relative;
    display: inline-block;
}

.profile-photo-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-photo-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.profile-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
}

.profile-photo-delete {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-photo-delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
    transform: scale(1.1);
}

/* Photo Crop Modal */
.photo-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.photo-crop-modal.hidden {
    display: none;
}

.photo-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.photo-crop-container {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.photo-crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.photo-crop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #f9fafb;
}

.photo-crop-area canvas {
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.photo-crop-area canvas:active {
    cursor: grabbing;
}

.crop-circle-overlay {
    position: absolute;
    pointer-events: none;
}

.photo-crop-controls {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.zoom-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #0d9488;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.4);
    transition: transform 0.15s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #0d9488;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.4);
}

.photo-crop-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.photo-crop-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Profile Tab Navigation */
.profile-tabs {
    display: flex;
    gap: 0.25rem;
    background: white;
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.profile-tab:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.profile-tab.active {
    color: #0d9488;
    background: #ccfbf1;
}

.profile-tab svg {
    flex-shrink: 0;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.profile-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

/* Profile Location Map */
.profile-location-map {
    width: 100%;
    height: 300px;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.home-marker {
    background: white;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-marker svg {
    width: 20px;
    height: 20px;
}

.home-marker-icon {
    background: transparent;
    border: none;
}

/* -----------------------------------------
   Login Page Specific Styles
   ----------------------------------------- */
.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

.login-icon {
    width: 4rem;
    height: 4rem;
    background: #ccfbf1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-icon svg {
    width: 2rem;
    height: 2rem;
    color: #0d9488;
}

/* Code input special styling */
.code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.25em;
}

/* -----------------------------------------
   Navigation Styles
   ----------------------------------------- */
.nav-link {
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #0d9488;
}

.nav-link-danger:hover {
    color: #dc2626;
}

/* -----------------------------------------
   Utility Classes
   ----------------------------------------- */
.text-muted {
    color: #6b7280;
}

.text-small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* -----------------------------------------
   Wizard Styles
   ----------------------------------------- */
.wizard-step {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wizard-step.active {
    background: #0d9488;
}

.wizard-step.completed {
    background: #0d9488;
}

.wizard-step-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
}

.wizard-step.active .wizard-step-number,
.wizard-step.completed .wizard-step-number {
    color: white;
}

.wizard-step-line {
    width: 3rem;
    height: 2px;
    background: #e5e7eb;
}

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================================
   Mobile Responsive Styles
   =========================================== */

/* Small screens (phones) */
@media (max-width: 640px) {
    /* Header adjustments */
    header .max-w-6xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    header .flex.items-center.gap-4 {
        gap: 0.5rem;
    }
    
    header .flex.items-center.gap-4 a span,
    header .flex.items-center.gap-4 a:not(:last-child) {
        display: none;
    }
    
    /* Hide timezone selector on mobile */
    #timezone-select {
        display: none;
    }
    
    /* Main content padding */
    main.max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1.5rem;
    }
    
    /* Page titles */
    main .text-3xl {
        font-size: 1.5rem;
    }
    
    /* Trip header */
    .trip-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .trip-header .text-sm.text-gray-500 {
        display: none;
    }
    
    .trip-header .ml-auto {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.25rem;
    }
    
    /* Timeline - move to left edge on mobile */
    .timeline {
        padding-left: 2rem;
    }
    
    .timeline-item {
        padding-left: 0;
        flex-wrap: wrap;
    }
    
    .timeline-item::before {
        left: -1.5rem;
    }
    
    .timeline-icon {
        left: -1.5rem;
    }
    
    /* Hide the left date column on mobile */
    .timeline-date {
        display: none;
    }
    
    /* Show mobile date above content */
    .timeline-date-mobile {
        display: flex;
        width: 100%;
        order: -1;
        margin-bottom: 0.5rem;
        padding-left: 0;
    }
    
    .timeline-date-mobile .weekday {
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #9ca3af;
        margin-right: 0.5rem;
    }
    
    .timeline-date-mobile .day-month {
        font-size: 0.75rem;
        font-weight: 600;
        color: #374151;
    }
    
    /* Trip header adjustments for mobile */
    .trip-header {
        padding-left: 2rem;
    }
    
    .trip-header-dot {
        left: 0.5rem;
        margin-left: 0;
        transform: translateX(-50%);
    }
    
    .trip-header::after {
        left: 0.5rem;
        margin-left: 0;
        transform: translateX(-50%);
    }
    
    .trip-end-dot {
        margin-left: 2rem;
    }
    
    .trip-end-dot::before {
        left: -1.5rem;
        margin-left: 0;
        transform: translateX(-50%);
    }
    
    .timeline-item::before {
        left: -1.5rem;
        margin-left: 0;
        transform: translateX(-50%);
    }
    
    .timeline-icon {
        left: calc(-1.5rem - 0.75rem + 8px);
    }
    
    .timeline-content {
        padding: 0.75rem;
    }
    
    /* Weather days scrollable on mobile */
    .weather-days-container {
        max-width: 100%;
        overflow: hidden;
    }
    
    .weather-days-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }
    
    .weather-days-scroll::-webkit-scrollbar {
        display: none;
    }
    
    /* Flight card - stack vertically on mobile */
    .flight-timeline-v2 + div[id^="map-"] {
        display: none;
    }
    
    .flight-timeline-v2::before {
        left: calc(3.5rem + 0.625rem - 1px);
    }
    
    .flight-time {
        width: 3.5rem;
        padding-right: 0.5rem;
    }
    
    .flight-time .text-base {
        font-size: 0.875rem;
    }
    
    .flight-info {
        padding-left: 0.5rem;
    }
    
    .flight-info .font-medium {
        font-size: 0.875rem;
    }
    
    .flight-row-middle .flight-info {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .flight-row-middle .flight-info span {
        margin-left: 0 !important;
    }
    
    /* Hotel card */
    .hotel-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Share overlay */
    .share-overlay-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .share-overlay-url-box {
        flex-direction: column;
    }
    
    .share-overlay-url {
        width: 100%;
    }
    
    .share-overlay-copy {
        width: 100%;
        justify-content: center;
    }
    
    /* Share button */
    .share-btn-visible span {
        display: none;
    }
    
    .share-btn-visible {
        padding: 0.375rem;
    }
    
    /* Delete modal */
    .delete-modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    /* Move modal */
    .move-modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    /* Chat/Manager */
    .chat-container {
        height: calc(100vh - 120px);
    }
    
    .messages-area {
        padding: 1rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .chat-input-area {
        padding: 0.75rem;
    }
    
    .chat-input-area textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Profile page */
    .profile-card {
        padding: 1.5rem;
    }
    
    /* Profile tabs on mobile */
    .profile-tabs {
        padding: 0.375rem;
        gap: 0.125rem;
    }
    
    .profile-tab {
        flex-direction: column;
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .profile-tab svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    /* Weather badges */
    .weather-badge {
        font-size: 0.75rem;
    }
}

/* Medium screens (tablets) */
@media (max-width: 768px) {
    /* Flight map - hide on tablets too for cleaner layout */
    .bg-gray-50.rounded-xl .flex.gap-4 > div[id^="map-"] {
        width: 8rem;
        height: 8rem;
    }
    
    /* Trip section spacing */
    .trip-section.mt-16 {
        margin-top: 3rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Make buttons easier to tap */
    .delete-btn,
    .move-btn,
    .share-btn-visible {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Show delete and move buttons always on touch devices */
    .delete-btn,
    .move-btn {
        opacity: 1;
    }
    
    /* Larger touch targets for timeline items */
    .timeline-item {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* Landscape phone */
@media (max-width: 640px) and (orientation: landscape) {
    main.max-w-4xl {
        padding-top: 1rem;
    }
    
    .chat-container {
        height: calc(100vh - 100px);
    }
}

/* -----------------------------------------
   Agenda Calendar Styles
   ----------------------------------------- */

.agenda-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.month-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
}

.month-header {
    text-align: center;
    margin-bottom: 1rem;
}

.month-name {
    font-family: 'Noto Serif', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.weekday-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    padding: 0.5rem 0;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 0.5rem;
    cursor: default;
    min-height: 40px;
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    z-index: 2;
    position: relative;
}

.day-cell.other-month .day-number {
    color: #d1d5db;
}

.day-cell.today {
    background: #0d9488;
    border-radius: 50%;
}

.day-cell.today .day-number {
    color: white;
    font-weight: 600;
}

.day-cell.weekend .day-number {
    color: #9ca3af;
}

.day-cell.other-month.weekend .day-number {
    color: #e5e7eb;
}

/* Trip indicators container */
.trip-indicators {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    height: 10px;
    z-index: 1;
}

/* Trip dot - green start/end */
.trip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

/* Trip line - gray connector */
.trip-line {
    height: 3px;
    background: #9ca3af;
    flex: 1;
    max-width: 100%;
    border-radius: 2px;
}

/* Single day trip - split dot */
.trip-dot.single-day {
    position: relative;
    overflow: hidden;
}

.trip-dot.single-day::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
}

/* Day with trip - hoverable */
.day-cell.has-trip {
    cursor: pointer;
}

.day-cell.has-trip:hover {
    background: #f0fdfa;
}

/* Trip tooltip */
.trip-tooltip {
    position: fixed;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    max-width: 300px;
    min-width: 250px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.trip-tooltip.visible {
    opacity: 1;
}

.trip-tooltip-header {
    font-family: 'Noto Serif', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.trip-tooltip-timeline {
    font-size: 0.8125rem;
    color: #4b5563;
}

.trip-tooltip-flight {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.trip-tooltip-flight:last-child {
    margin-bottom: 0;
}

.trip-tooltip-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #6b7280;
    margin-top: 0.125rem;
}

.trip-tooltip-icon-return {
    transform: scaleX(-1);
}

.trip-tooltip-flight-info {
    flex: 1;
}

.trip-tooltip-route {
    font-weight: 500;
    color: #374151;
}

.trip-tooltip-time {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Multiple trips tooltip styling */
.trip-tooltip-multi-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.trip-tooltip-multi-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trip-tooltip-multi-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

/* Year navigation */
.year-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.year-nav-btn {
    padding: 0.5rem;
    color: #6b7280;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.year-nav-btn:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.year-display {
    font-family: 'Noto Serif', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

/* Month range selector */
.month-range-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.month-range-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.month-range-btn:hover {
    border-color: #0d9488;
    color: #0d9488;
}

.month-range-btn.active {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

/* Agenda Legend */
.agenda-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.agenda-legend-title {
    font-weight: 600;
    color: #374151;
}

.agenda-legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Important Date Markers */
.important-date-markers {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 3;
}

.important-date-marker {
    font-size: 0.625rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

/* Day cell with important date */
.day-cell.has-important-date {
    background: linear-gradient(135deg, #fef3c7 0%, transparent 50%);
    cursor: pointer;
}

.day-cell.has-important-date:hover {
    background: linear-gradient(135deg, #fde68a 0%, #f0fdfa 50%);
}

.day-cell.has-important-date.today {
    background: #0d9488;
}

/* Important Date Tooltip */
.important-date-tooltip {
    position: fixed;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #fde68a;
    z-index: 1001;
    max-width: 280px;
    min-width: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.important-date-tooltip.visible {
    opacity: 1;
}

.important-date-tooltip-header {
    font-family: 'Noto Serif', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #fde68a;
}

.important-date-tooltip-content {
    font-size: 0.8125rem;
    color: #4b5563;
}

.important-date-type {
    font-size: 0.75rem;
    color: #d97706;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.important-date-notes {
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

.important-date-recurring {
    font-size: 0.75rem;
    color: #0d9488;
    margin-top: 0.5rem;
}

.important-date-multi-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.important-date-multi-item:last-child {
    border-bottom: none;
}

/* Combined tooltip styles */
.combined-tooltip-section {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.combined-tooltip-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.trip-multi-item {
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

/* Agenda responsive adjustments */
@media (max-width: 640px) {
    .agenda-calendar {
        grid-template-columns: 1fr;
    }
    
    .day-cell {
        min-height: 36px;
    }
    
    .day-number {
        font-size: 0.8125rem;
    }
    
    .trip-dot {
        width: 6px;
        height: 6px;
    }
    
    .trip-line {
        height: 2px;
    }
    
    .year-nav {
        gap: 1rem;
    }
    
    .year-display {
        font-size: 1.25rem;
    }
    
    .month-range-selector {
        gap: 0.375rem;
    }
    
    .month-range-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* -----------------------------------------
   Family Dashboard Styles
   ----------------------------------------- */

.dashboard-status-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
}

/* Dashboard Hero Section - Fancy Design */
.dashboard-hero {
    background: transparent;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-map-container {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.hero-map-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e5e7eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.hero-map {
    width: 100%;
    height: 100%;
}

.hero-status-overlay {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.hero-status-badge.status-home {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.hero-status-badge.status-flying {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.hero-status-badge.status-destination {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.hero-info {
    width: 100%;
}

.hero-name {
    font-family: 'Noto Serif', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.hero-trip-info {
    margin-top: 0.5rem;
}

.hero-trip-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.hero-trip-name {
    font-family: 'Noto Serif', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0d9488;
    margin-bottom: 0.25rem;
}

.hero-trip-date {
    font-size: 1rem;
    color: #4b5563;
}

.hero-no-trips {
    color: #9ca3af;
    font-style: italic;
}

.hero-flight-info {
    margin-top: 0.5rem;
}

.hero-flight-number {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.hero-flight-route {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.hero-arrival {
    font-size: 0.9375rem;
    color: #4b5563;
}

.hero-arrival .arrival-time {
    font-weight: 600;
    color: #0d9488;
}

.hero-destination-info {
    margin-top: 0.5rem;
}

.hero-local-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.hero-time-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.hero-time-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.hero-weather {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.hero-weather-day {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-weather-day .weather-icon {
    font-size: 2rem;
}

.hero-weather-day .weather-temp {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.hero-weather-day .weather-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.hero-hotel {
    font-size: 0.875rem;
    color: #6b7280;
}

.hero-return {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #4b5563;
}

/* Hero map plane icon for flying status */
.hero-plane-icon {
    background: transparent;
    border: none;
}

.hero-plane-icon svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.dashboard-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.dashboard-status-badge.status-home {
    background: #f0fdf4;
    color: #166534;
}

.dashboard-status-badge.status-flying {
    background: #eff6ff;
    color: #1e40af;
}

.dashboard-status-badge.status-destination {
    background: #fef3c7;
    color: #92400e;
}

.dashboard-map-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
}

.dashboard-map {
    height: 300px;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.dashboard-timeline-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
}

.activity-item {
    display: flex;
    gap: 1rem;
    position: relative;
}

.activity-item:not(:last-child) {
    padding-bottom: 1.5rem;
}

.activity-dot-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 1rem;
    flex-shrink: 0;
}

.activity-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 2;
}

.activity-dot.dot-flight {
    background: #3b82f6;
}

.activity-dot.dot-hotel {
    background: #8b5cf6;
}

.activity-dot.dot-event {
    background: #0d9488;
}

.activity-line {
    position: absolute;
    top: 0.75rem;
    bottom: -1.5rem;
    left: 50%;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.activity-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 0;
}

.activity-time {
    min-width: 5rem;
    flex-shrink: 0;
}

.activity-date {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.activity-time-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #1f2937;
}

.activity-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.activity-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 0.5rem;
}

/* Plane marker on map */
.plane-marker {
    background: transparent;
    border: none;
}

.plane-marker svg {
    color: #0d9488;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Local time display */
.local-time {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Dashboard responsive */
@media (max-width: 640px) {
    .dashboard-avatar {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .dashboard-status-badge {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .dashboard-map {
        height: 200px;
    }
    
    .activity-content {
        flex-wrap: wrap;
    }
    
    .activity-time {
        min-width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .activity-icon {
        position: absolute;
        right: 0;
        top: 0;
    }
}
