/* Modern Travel Planner CSS */

/* CSS Variables for consistent theming */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-light: #eff6ff;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Background & Surface Colors */
    --background-color: #f0f4f8;
    --surface-color: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-hover: #f1f5f9;

    /* Header */
    --header-bg: #0f172a;
    --header-text: #ffffff;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #2563eb;

    /* Shadow System — visible but restrained */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 16px -4px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 12px 24px -6px rgba(0, 0, 0, 0.12), 0 6px 10px -4px rgba(0, 0, 0, 0.06);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    /* Colour Bar */
    --color-bar-width: 4px;

    /* Transition System */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.loading-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Authentication Screen */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 20px;
}

.auth-container {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
}

.tab-button:hover:not(.active) {
    background: var(--background-color);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface-color);
    transition: all var(--transition-base);
    font-family: inherit;
}

/* Select-specific styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Textarea-specific */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Placeholder styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
}

/* Hover state */
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-hover);
}

/* Focus state - enhanced */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Disabled state */
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background-color: var(--surface-secondary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Date and time input specific styling */
.form-group input[type="date"],
.form-group input[type="time"] {
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
    transition: filter var(--transition-fast);
}

.form-group input[type="date"]:hover::-webkit-calendar-picker-indicator,
.form-group input[type="time"]:hover::-webkit-calendar-picker-indicator {
    filter: opacity(1);
}

/* Number input refinements */
.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Password Input with Toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 3rem; /* Make room for the toggle button */
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.password-toggle:hover {
    background-color: var(--background-color);
}

.password-icon {
    font-size: 1rem;
    user-select: none;
}

.password-toggle.hidden .password-icon {
    opacity: 0.6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    user-select: none;
    -webkit-user-select: none;
    padding: 0.75rem 0.875rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    transition: background-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.checkbox-label:hover {
    background-color: var(--surface-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.checkbox-label .checkmark {
    display: inline-block;
    margin-left: 0.25rem;
    pointer-events: none;
}

/* Responsive checkbox styling */
@media (max-width: 768px) {
    .checkbox-label {
        padding: 0.75rem 0;
        min-height: 44px;
    }

    .checkbox-label input[type="checkbox"] {
        width: 24px;
        height: 24px;
        margin-right: 1rem;
        min-width: 24px;
        min-height: 24px;
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    width: 100%;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary:disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Pending Users Notification Dot */
.pending-users-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid var(--surface-color);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* App Screen */
.app-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: var(--header-bg);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
}

.header-content > h1 {
    margin: 0 !important;
    margin-right: 1rem !important;
    text-align: left !important;
    flex-shrink: 0;
    order: 1 !important;
}

.header-content > .header-actions {
    order: 2 !important;
    margin-left: auto !important;
}

.header-actions {
    display: flex !important;
    align-items: center !important;
    margin-left: auto !important;
    flex-shrink: 0;
}

.user-menu {
    margin-left: auto !important;
    flex-shrink: 0;
}

.app-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--header-text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions > button:not(.user-button) {
    position: relative;
    width: auto;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-actions > button:not(.user-button):hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.user-menu {
    position: relative;
}

.user-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 200px;
    margin-top: 0.5rem;
}

.user-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.user-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    width: 100%;
    text-align: left;
}

.logout-btn:hover {
    background: var(--background-color);
    border-radius: var(--radius-sm);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Overview Stats */
.trips-overview {
    margin-bottom: 2rem;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.stat-card.active {
    border: 2px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.04);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Trips Section */
.trips-section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

.search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    line-height: 1;
}

.search-clear:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-btn:hover:not(.active) {
    background: var(--background-color);
}

/* Trips Container */
.trips-container {
    display: grid;
    gap: 1.5rem;
}

.trips-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.trips-container.list-view {
    grid-template-columns: 1fr;
}

/* Trip Card */
.trip-card {
    background: var(--surface-color);
    border: none;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.trip-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background: #fafbff;
}

.trip-card::before {
    display: none;
}

.trip-header {
    margin-bottom: 1rem;
}

.trip-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.trip-title-icons {
    display: inline-flex;
    gap: 0.2rem;
    font-size: 1rem;
    line-height: 1;
}

.trip-dates {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.trip-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.trip-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trip-status.upcoming {
    background: rgba(22, 101, 52, 0.1);
    color: var(--success-color);
}

.trip-status.completed {
    background: rgba(107, 114, 128, 0.1);
    color: var(--secondary-color);
}

.trip-status.in-progress {
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
}

.trip-status.past {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.trip-status.ongoing {
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
}

/* Trip Stats */
.trip-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    margin-top: auto; /* Push to bottom */
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Trip Actions */
.trip-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-action {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-open:hover {
    background: var(--primary-hover);
}

.btn-edit {
    background: var(--warning-color);
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    min-height: 44px; /* Match other buttons */
    padding: 0.75rem 1.5rem; /* Match other buttons */
    font-size: 1rem; /* Match other buttons */
}

.btn-delete:hover {
    background: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
}

/* Search Results Modal */
.search-results-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}


.search-results-summary {
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.search-results-summary p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.search-results-summary strong {
    color: var(--primary-color);
    font-weight: 600;
}

.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.search-no-results .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.search-no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-no-results p {
    color: var(--text-secondary);
}

.search-result-trip {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-trip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.search-result-trip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-result-trip-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.search-result-trip-dates {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-result-section {
    margin-bottom: 1.5rem;
}

.search-result-section:last-child {
    margin-bottom: 0;
}

.search-result-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: background-color 0.2s;
    cursor: pointer;
}

.search-result-list li:hover {
    background: rgba(30, 64, 175, 0.05);
}

.search-result-list li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.search-result-date {
    display: inline-block;
    margin-left: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: normal;
}

/* Responsive search */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .search-container {
        max-width: 100%;
        width: 100%;
    }
    
    .view-controls {
        align-self: flex-end;
    }
    
    .search-result-trip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn var(--transition-base);
}

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

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


.modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp var(--transition-slow);
    transform-origin: center;
}

/* Scrollable content area */
.modal form {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    padding-top: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-direction: column;
}

.modal-actions button {
    width: auto;
}

.modal-actions-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

/* Hide actions row (not used in desktop layout) */
#addEntryModal .modal-actions-row,
#addCostModal .modal-actions-row {
    display: none;
}


/* Trip Detail Content */
.trip-detail-content {
    padding: 1.5rem;
}

/* Settings Modal */
#settingsModal .modal-content {
    display: flex;
    flex-direction: column;
}

.settings-content {
    padding: 1.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    padding: 0 1.5rem;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(30, 64, 175, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.settings-section h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Itinerary Import Styles */
.import-target-info {
    padding: 0.75rem 1rem;
    background: var(--surface-hover);
    border-radius: 0.375rem;
    color: var(--text-primary);
}

.import-banner {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.375rem;
    color: #92400e;
    font-weight: 600;
}

.import-preview-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.import-dummy-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0.25rem 0 0.75rem;
}

.import-day-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.import-day-card-header {
    font-weight: 600;
    color: var(--text-primary);
}

.import-day-card-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.import-booking-row {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.import-booking-text {
    font-weight: 500;
    color: var(--text-primary);
}

.import-booking-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.import-booking-existing {
    color: #166534;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.import-booking-missing {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Recycling Bin Styles */
.recycle-type-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recycle-type-btn:hover {
    background: var(--surface-hover);
}

.recycle-type-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.recycled-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recycled-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--surface-secondary);
    transition: all 0.2s ease;
}

.recycled-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

/* Pending Users Section */
.pending-user-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--surface-color);
    gap: 2rem;
}

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

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-details span {
    display: flex;
    align-items: center;
}

.username {
    font-weight: 500;
    color: var(--primary-color);
}

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

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

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 200px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-width: 120px;
    text-align: center;
}

/* Responsive design for pending users */
@media (max-width: 768px) {
    .pending-user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-actions {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
    }
    
    .btn-sm {
        flex: 1;
        min-width: auto;
    }
}

/* User Management Section */
.user-management-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--surface-color);
    gap: 2rem;
}

.user-management-item .user-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.readonly-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive design for user management */
@media (max-width: 768px) {
    .user-management-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-management-item .user-actions {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
    }
    
    .user-management-item .btn-sm {
        flex: 1;
        min-width: auto;
    }
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-item input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.setting-item input[readonly] {
    background-color: var(--background-color);
    color: var(--text-secondary);
}

.setting-item button {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.trip-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.trip-detail-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.trip-detail-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.trip-detail-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Toasts */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.toast-close:hover {
    background: var(--background-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .trips-container.grid-view {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 0;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .trip-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .app-header h1 {
        font-size: 1.25rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .view-controls {
        align-self: flex-end;
    }
}

/* Trip Details Screen Styles */
.trip-details-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%) !important;
    color: white !important;
    border-bottom: none;
    padding: 1.5rem 2rem;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.trip-details-header * {
    color: white !important;
}

.trip-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white !important;
    margin-bottom: 0.375rem;
}

.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.trip-meta span {
    padding: 0.2rem 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white !important;
    font-weight: 500;
}

.trip-details-header p {
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0;
}

#tripTimezoneClocks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

.timezone-coverage-help {
    display: block;
    color: var(--text-secondary, #6b7280);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.tz-clock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8125rem;
    color: white !important;
}

.tz-clock-name {
    font-weight: 500;
    opacity: 0.85;
}

.tz-clock-time {
    font-weight: 700;
}

.trip-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.625rem 2rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.trip-actions-bar .btn-action {
    flex: 0 0 auto;
    height: 2.125rem;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 1.0625rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.trip-actions-bar .btn-action:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.trip-actions-bar .btn-action:active {
    transform: translateY(0);
    box-shadow: none;
}

.trip-options {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trip-search-bar {
    padding: 0.625rem 2rem;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.trip-search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
}

.trip-search-inner:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.trip-search-icon {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.trip-search-inner input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.trip-search-inner input::placeholder {
    color: var(--text-tertiary);
}

.trip-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    padding: 0;
    line-height: 1;
}

.trip-search-clear:hover {
    color: var(--text-primary);
}

.trip-search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.trip-timeline {
    padding: 1.25rem 2rem 2rem;
    background: var(--background-color);
    min-height: 60vh;
}

.timeline-day {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-fast);
}

.timeline-day:hover {
    box-shadow: var(--shadow-sm);
}

.timeline-day:hover {
    box-shadow: var(--shadow-md);
}

.day-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto auto;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.day-car-rental:empty {
    display: none;
}

.day-header:hover {
    background: #f1f5f9;
}

.day-info {
    display: contents;
}

.day-date {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.day-accommodation,
.day-car-rental {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.375rem;
}

.day-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.day-actions .btn-action {
    flex: 0 0 auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    min-height: 0;
    line-height: 1.4;
    white-space: nowrap;
    color: white;
}

.day-actions .btn-collapse {
    background: var(--secondary-color);
}

.day-actions .btn-add-entry {
    background: var(--primary-color);
}

.day-actions .btn-action:hover {
    opacity: 0.85;
}

.day-content {
    padding: 1rem 1.25rem;
    border-top: none;
    background: white;
}

.day-entries {
    display: grid;
    gap: 1rem;
}

/* Entry Item — iOS-style colour bar layout */
.entry-item {
    display: flex;
    align-items: stretch;
    border: none;
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
    gap: 0;
    background: #f8fafc;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.entry-item:hover {
    background: #f1f5f9;
}

.entry-item.unconfirmed {
    background: #fef3c7;
}

.entry-item.confirmed-trip {
    background: #d1fae5;
}

.entry-item.reminder {
    background: #f0f9ff;
}

/* Colour bar — left edge per category */
.entry-color-bar {
    width: var(--color-bar-width);
    flex-shrink: 0;
    border-radius: 4px 0 0 4px;
    background: #6b7280;
}

.entry-color-bar.flight { background: #1e40af; }
.entry-color-bar.ferry { background: #0369a1; }
.entry-color-bar.train { background: #059669; }
.entry-color-bar.mileage { background: #92400E; }
.entry-color-bar.accommodation { background: #7e22ce; }
.entry-color-bar.car-rental { background: #c2410c; }
.entry-color-bar.car-parking { background: #c2410c; }
.entry-color-bar.transport,
.entry-color-bar.transfer { background: #0f766e; }
.entry-color-bar.place-of-interest { background: #166534; }
.entry-color-bar.trip { background: #4338ca; }
.entry-color-bar.miscellaneous { background: #4b5563; }
.entry-color-bar.weather { background: #0e7490; }
.entry-color-bar.cost { background: #166534; }
.entry-color-bar.reminder { background: #0369a1; }
.entry-color-bar.other { background: #4b5563; }

/* Content area */
.entry-content {
    flex: 1;
    padding: 0.5rem 0.75rem;
    min-width: 0;
}

.entry-line-primary {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.entry-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.entry-cost {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--success-color);
    white-space: nowrap;
}

.entry-line-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2px;
}

.entry-time {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Category text — colour only, no background pill */
.entry-category {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
}

.entry-category.flight { color: #1e40af; }
.entry-category.ferry { color: #0369a1; }
.entry-category.train { color: #059669; }
.entry-category.mileage { color: #92400E; }
.entry-category.accommodation { color: #6b21a8; }
.entry-category.car-rental { color: #c2410c; }
.entry-category.car-parking { color: #c2410c; }
.entry-category.transport,
.entry-category.transfer { color: #0f766e; }
.entry-category.place-of-interest { color: #166534; }
.entry-category.trip { color: #4338ca; }
.entry-category.miscellaneous { color: #4b5563; }
.entry-category.weather { color: #0e7490; }
.entry-category.cost { color: #166534; }
.entry-category.reminder { color: #0369a1; }
.entry-category.other { color: #4b5563; }

.entry-line-details {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
}

.entry-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    padding: 0.375rem 0.5rem;
    flex-shrink: 0;
}

.entry-actions:empty {
    display: none;
}

/* Override all base button styles inside entry rows */
.entry-actions .btn-action {
    flex: 0 0 auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    min-height: 0;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    color: white;
}

.entry-actions .btn-edit {
    background: var(--warning-color);
}

.entry-actions .btn-delete {
    background: var(--danger-color);
    padding: 0.2rem 0.5rem;
    min-height: 0;
    font-size: 0.6875rem;
}

.entry-actions .btn-ai {
    background: var(--primary-color);
}

.entry-actions .btn-action:hover {
    opacity: 0.85;
}

.trip-costs-section {
    padding: 2rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.trip-costs-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.cost-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cost-item:hover {
    background: #f1f5f9;
    border-color: var(--border-hover);
}

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

.cost-category {
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-align: center;
}

.cost-amount {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

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

.trip-total {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Timeline Warning Styles */
.timeline-warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px -1px rgba(245, 158, 11, 0.3);
}

.warning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.warning-close-btn {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.warning-close-btn:hover {
    background: #d97706;
    transform: scale(1.1);
}

.timeline-warning h3 {
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.timeline-warning p {
    color: #92400e;
    margin-bottom: 1rem;
}

.timeline-warning ul {
    color: #92400e;
    margin-left: 1rem;
}

.timeline-warning li {
    margin-bottom: 0.25rem;
}

/* Pre-Trip and Post-Trip Styles */
.timeline-day.pre-trip,
.timeline-day.post-trip {
    background: #f0f9ff;
}

.timeline-day.pre-trip .day-header,
.timeline-day.post-trip .day-header {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    color: white;
    border-bottom: none;
}

.timeline-day.pre-trip .day-date,
.timeline-day.post-trip .day-date {
    color: white;
    font-weight: 700;
}

/* Reports Modal Styles */
.reports-modal {
    max-width: 800px;
    padding: 0;
}

.reports-content {
    padding: 2rem;
    display: grid;
    gap: 2rem;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.report-option {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.report-option:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.report-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--color-bar-width);
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px 0 0 4px;
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.report-option h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.report-option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.report-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
}

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

.report-filters {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.filter-group {
    margin-bottom: 1rem;
}

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

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* Date Range Styles */
.report-date-range {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.report-date-range h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.date-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

.date-input-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.date-input {
    padding: 0.75rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: white;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.date-range-help {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
    font-style: italic;
}

/* Responsive date range styles */
@media (max-width: 768px) {
    .date-range-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .report-date-range {
        padding: 1rem;
    }
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Responsive checkbox group styling */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .checkbox-group .checkbox-label {
        background: #f8f9fa;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        border: 1px solid #e2e8f0;
        transition: background-color 0.2s;
    }
    
    .checkbox-group .checkbox-label:active {
        background: #e2e8f0;
    }
}

/* Form Styles for Trip Details */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.conditional-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-secondary);
    border-radius: 0.375rem;
}

.conditional-fields.hidden {
    display: none;
}

/* Sanity Check Modal Styles */
.sanity-check-content {
    padding: 1rem;
}

.sanity-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #cbd5e1;
}

.sanity-summary h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 0.375rem;
    background: white;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

.stat-item.critical {
    border-color: #ef4444;
    background: #fef2f2;
}

.stat-item.warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.stat-item.success {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-item.critical .stat-number {
    color: #ef4444;
}

.stat-item.warning .stat-number {
    color: #f59e0b;
}

.stat-item.success .stat-number {
    color: var(--success-color);
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.sanity-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sanity-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title.has-issues {
    color: #dc2626;
}

.section-title.no-issues {
    color: #166534;
}

.section-description {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-item {
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 4px solid;
}

.issue-item.critical {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.issue-item.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.issue-message {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.issue-item.critical .issue-message {
    color: #dc2626;
}

.issue-item.warning .issue-message {
    color: #d97706;
}

.issue-suggestion {
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
}

.no-issues {
    text-align: center;
    padding: 2rem;
    color: #166534;
    font-weight: 500;
    background: #f0fdf4;
    border-radius: 0.375rem;
    border: 1px solid #bbf7d0;
}

/* Trip Map Modal Styles */
.map-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    height: calc(80vh - 120px);
}

.map-route-info {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
}

.map-route-info h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.route-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.route-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.route-step:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.route-step.airport {
    border-left: 4px solid #ef4444;
}

.route-step.accommodation {
    border-left: 4px solid var(--primary-color);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.route-step.airport .step-number {
    background: #ef4444;
}

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

.step-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.step-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.step-location {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

.map-container {
    background: #f3f4f6;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.map-container #tripMap {
    border-radius: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: calc(80vh - 80px);
    }
    
    .map-route-info {
        max-height: 200px;
    }
    
    .map-container #tripMap {
        height: 300px;
    }
}

/* AI Search Modal Styles */
.ai-search-content {
    padding: 1rem;
    height: calc(85vh - 120px);
    overflow-y: auto;
}

.search-context {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #bae6fd;
}

.search-context h3 {
    margin: 0 0 1rem 0;
    color: #0c4a6e;
    font-size: 1.125rem;
    font-weight: 600;
}

.context-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.context-item {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e0f2fe;
}

.context-item strong {
    color: #0c4a6e;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-category {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-title {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.suggestion-item {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.suggestion-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.suggestion-item.high {
    border-left: 4px solid #ef4444;
}

.suggestion-item.medium {
    border-left: 4px solid #f59e0b;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.suggestion-title {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.priority-badge.high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.priority-badge.medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.suggestion-description {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.suggestion-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-search, .btn-add {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.btn-search:hover {
    background: var(--primary-hover);
}

.btn-add {
    background: var(--success-color);
    color: white;
}

.btn-add:hover {
    background: #047857;
}

/* Responsive adjustments for AI Search */
@media (max-width: 768px) {
    .ai-search-content {
        height: calc(85vh - 100px);
    }
    
    .context-info {
        grid-template-columns: 1fr;
    }
    
    .suggestions-list {
        grid-template-columns: 1fr;
    }
    
    .suggestion-actions {
        flex-direction: column;
    }
    
    .btn-search, .btn-add {
        width: 100%;
        justify-content: center;
    }
}

/* Attachment Management System Styles */
.attachment-manager {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.attachment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.attachment-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.btn-add-attachment {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-attachment:hover {
    background: #1e40af;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.attachment-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.attachment-item.new-attachment {
    border-left: 4px solid var(--success-color);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.attachment-icon {
    font-size: 1rem;
}

.attachment-name {
    font-weight: 500;
    color: #1e293b;
}

.attachment-size {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: 0.5rem;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-remove-attachment {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-remove-attachment:hover {
    background: #dc2626;
}

/* Calendar Styles */
.calendar-modal {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.calendar-content {
    padding: 20px;
}

.calendar-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.calendar-header h3 {
    font-size: 28px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.calendar-trip-info {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

.trip-name {
    font-weight: 500;
    color: #1e40af;
}

.calendar-grid {
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 8px;
}

.weekday {
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border: 1px solid #e5e7eb;
}

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

.calendar-day {
    min-height: 120px;
    border: 1px solid #e5e7eb;
    padding: 6px;
    position: relative;
    background: white;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-day:hover {
    background: #f9fafb;
}

.calendar-day.empty {
    background: #f9fafb;
    opacity: 0.5;
}

.calendar-day.trip-day {
    background: #fef3c7;
    border-color: #f59e0b;
}

.calendar-day.has-entries {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
    flex-shrink: 0;
    text-align: center;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    padding: 2px 4px;
}

.calendar-page .day-entries {
    font-size: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: 90px;
}

.calendar-entry {
    margin-bottom: 3px;
    padding: 3px 5px;
    border-radius: 3px;
    font-size: 9px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-height: 18px;
    line-height: 1.2;
}

.flight-entry {
    background: var(--primary-light);
    color: #1e40af;
    border-left: 3px solid var(--primary-color);
}

.accommodation-entry {
    background: #f3e8ff;
    color: #7c3aed;
    border-left: 3px solid #8b5cf6;
}

.entry-icon {
    margin-right: 4px;
    font-size: 12px;
}

.entry-name {
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    word-break: break-word;
}

.calendar-actions {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.calendar-actions .btn-primary {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-icon {
    margin-right: 8px;
}

/* Responsive calendar sizing */
@media (max-width: 1200px) {
    .calendar-day {
        min-height: 100px;
    }
    
    .calendar-page .day-entries {
        max-height: 70px;
    }
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .calendar-page .day-entries {
        max-height: 60px;
    }
    
    .calendar-entry {
        font-size: 8px;
        padding: 2px 3px;
        min-height: 16px;
    }
    
    .entry-icon {
        font-size: 10px;
    }
}

/* Print styles for calendar */
@media print {
    .calendar-page {
        page-break-after: always;
        margin: 0;
        border: none;
        box-shadow: none;
        padding: 15px;
    }
    
    .calendar-header h3 {
        font-size: 24px;
    }
    
    .calendar-day {
        min-height: 100px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .calendar-page .day-entries {
        max-height: 80px;
    }
    
    .calendar-entry {
        font-size: 8px;
        padding: 2px 3px;
        min-height: 16px;
    }
    
    .entry-name {
        font-size: 8px;
    }
    
    .entry-icon {
        font-size: 10px;
    }
}

/* Photo Input Styles */
.photo-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.photo-input-container button {
    width: 100%;
    padding: 0.75rem;
}

.photo-preview {
    margin-top: 0.5rem;
    display: none;
}

.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.photo-preview.has-image {
    display: block;
}

/* ============================================================
   Interesting Places
   ============================================================ */

.places-section {
    padding: 1rem;
}

.places-back-nav {
    margin-bottom: 0.5rem;
}

.places-back-btn {
    background: none;
    border: none;
    color: var(--primary-color, #3b82f6);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0;
}

.places-back-btn:hover {
    text-decoration: underline;
}

.places-container {
    margin-top: 1rem;
    overflow-x: auto;
}

.places-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.places-th {
    padding: 0.6rem 0.875rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #6b7280);
    border-bottom: 2px solid var(--border-color, #e5e7eb);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.places-th:hover {
    color: var(--text-primary, #111);
}

.places-th-active {
    color: var(--primary-color, #3b82f6);
}

.places-th-actions {
    cursor: default;
    width: 1%;
}

.places-row {
    cursor: pointer;
    transition: background 0.1s;
}

.places-row:hover {
    background: var(--surface-hover, #f9fafb);
}

.places-row-shared {
    cursor: default;
}

.place-shared-by {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

.places-row:not(:last-child) .places-td {
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.places-td {
    padding: 0.625rem 0.875rem;
    vertical-align: top;
}

.places-td-name {
    font-weight: 500;
}

.places-td-notes {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.places-td-date {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

.places-td-actions {
    white-space: nowrap;
    text-align: right;
}

.place-web-link {
    font-size: 1rem;
    text-decoration: none;
    margin-right: 4px;
}

.place-add-to-trip-btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-right: 4px;
}


#placesBtn.active {
    background: var(--accent-color, #3b82f6);
    color: #fff;
    border-color: var(--accent-color, #3b82f6);
}

.place-has-photo {
    font-size: 0.9rem;
    margin-right: 4px;
}

.places-country-header {
    cursor: pointer;
    user-select: none;
    background: var(--surface-color, #f8f9fa);
}

.places-country-header:hover {
    background: var(--hover-color, #e9ecef);
}

.places-country-cell {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.places-country-arrow {
    display: inline-block;
    width: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.places-country-count {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    font-weight: normal;
}

.place-attachment-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
}

