* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.app {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.header {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #333;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 16px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    gap: 1rem;
}

.search-container {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 16px;
    font-size: 14px;
    background: transparent;
}

.search-btn, .filter-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.search-btn:hover, .filter-btn:hover {
    background-color: #f5f5f5;
}

.filter-btn {
    border-left: 1px solid #e0e0e0;
}

.search-filter-panel {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filter-categories, .filter-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover {
    background: #e9ecef;
}

.filter-chip.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .search-container {
        order: 2;
        flex: 1 1 100%;
        max-width: none;
    }

    .header-actions {
        order: 1;
        margin-left: 0;
    }

    .filter-categories, .filter-status {
        justify-content: center;
    }
}

/* Search Results Styling */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.search-results-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.search-no-results h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.search-no-results p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

.search-result {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.search-match-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

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

.user-info {
    font-size: 0.875rem;
    color: #666;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.tab-nav {
    display: none; /* Hidden - using bottom tabs now */
}

.tab-btn {
    display: none; /* Legacy - using bottom tabs now */
}

.tab-btn.active {
    display: none; /* Legacy - using bottom tabs now */
}

/* iPhone-style Bottom Tab Navigation */
.bottom-tab-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid #e9ecef;
    display: flex;
    padding: 8px 0 20px 0; /* Extra padding for iPhone home indicator */
    z-index: 1000;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
}

.bottom-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8e8e93;
    font-size: 12px;
    min-height: 50px;
}

.bottom-tab-btn.active {
    color: #007bff;
}

.bottom-tab-btn:hover {
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}

.tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.bottom-tab-btn.active .tab-icon {
    transform: scale(1.1);
}

.tab-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.main-content {
    flex: 1;
    padding: 0;
    padding-bottom: 90px; /* Space for bottom tab bar */
    max-width: 100%;
    overflow-x: hidden;
}

.day-selector {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.day-nav-buttons {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.day-nav-buttons::-webkit-scrollbar {
    height: 3px;
}

.day-nav-buttons::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.day-nav-buttons::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.day-nav-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    color: #666;
}

.day-nav-btn.active {
    background: #ccebef;
    color: #333;
    border-color: #ccebef;
}

.day-nav-btn.today:not(.active) {
    background: #fff7e6;
    border-color: #ffc107;
    color: #856404;
}

.day-nav-btn.today.active {
    background: #ccebef;
    color: #333;
    border-color: #ccebef;
    box-shadow: 0 0 0 2px #ffc107;
}

.day-nav-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #dee2e6;
}

.current-day-container {
    padding: 0.75rem;
}

.tab-content {
    display: none;
}

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

.day-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    max-width: 100%;
    overflow: hidden;
}

.day-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.day-title-container {
    flex: 1;
    min-width: 120px;
}

.day-title {
    width: 100%;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s;
    margin-bottom: 0.25rem;
}

.day-formatted-date {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    display: block;
    padding: 0 0.5rem;
}

.day-title:focus {
    outline: none;
    border-color: #ccebef;
    box-shadow: 0 0 0 2px rgba(204, 235, 239, 0.3);
}

.day-date {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s;
}

.day-date:focus {
    outline: none;
    border-color: #ccebef;
    box-shadow: 0 0 0 2px rgba(204, 235, 239, 0.3);
}

.btn-remove-day {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

.todos-list {
    margin-bottom: 1rem;
}

.todo-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    cursor: pointer;
}

.todo-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.todo-item.completed {
    opacity: 0.6;
    background: #f8f9fa;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 20px;
}

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

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

.todo-checkbox {
    margin: 0;
    flex-shrink: 0;
}

.todo-text-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0; /* Allow text to truncate */
}

.todo-text {
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
}

.todo-compact-notes {
    font-size: 11px;
    color: #8e8e93;
    font-style: italic;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

.todo-time {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Todo detail sections */
.todo-location, .todo-notes, .todo-cost {
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.todo-location {
    background: #e8f5e8;
    color: #2e7d32;
}

.todo-notes {
    background: #fff3e0;
    color: #ef6c00;
    font-style: italic;
}

.todo-cost {
    background: #f3e5f5;
    color: #7b1fa2;
    font-weight: 500;
}

.todo-photo {
    margin-top: 8px;
}

.todo-photo img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.todo-photo img:hover {
    opacity: 0.8;
}

.todo-details-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
}

.todo-location-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.location-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.location-text {
    color: #2e7d32;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-cost-section {
    flex: 0 0 25%;
    text-align: right;
    flex-shrink: 0;
}

.cost-amount {
    color: #7b1fa2;
    font-weight: 600;
    font-size: 12px;
}


.todo-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    align-items: flex-start;
}

.btn-remove-todo {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 16px;
    color: #6c757d;
    line-height: 1;
    transition: all 0.2s;
}

.btn-remove-todo:hover {
    background: #ffebee;
    color: #ff6b6b;
}

.btn {
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-primary {
    background: #ccebef;
    color: #333;
}

.btn-primary:hover {
    background: #b8dfe4;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-add-todo {
    width: 100%;
}

.fab {
    position: fixed;
    bottom: 100px; /* Move above bottom tab bar */
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ccebef;
    color: #333;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(204, 235, 239, 0.4);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
}

.transport-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.transport-section h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.transport-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.transport-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.btn-remove {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 95%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 0 auto;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: #ccebef;
    box-shadow: 0 0 0 2px rgba(204, 235, 239, 0.3);
}

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

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.trip-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.trip-preview h4 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.trip-preview p {
    font-weight: 600;
    color: #7db5bc;
    margin-bottom: 0.5rem;
}

.day-preview {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

/* Enhanced Todo Features */
.todo-cost {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
    margin-left: 0.5rem;
}

.todo-location {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.expense-section {
    margin-top: 1rem;
}

.expense-input-group {
    display: flex;
    gap: 0.5rem;
}

.expense-amount {
    flex: 2;
}

.expense-currency {
    flex: 1;
}

.location-section {
    margin-top: 1rem;
}

/* Budget Tracker */
.budget-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.amount {
    font-weight: 600;
    color: #28a745;
}

.budget-input {
    border: none;
    background: transparent;
    font-weight: 600;
    color: #28a745;
    text-align: right;
    width: 80px;
}

.budget-input:focus {
    outline: 1px solid #ccebef;
}

/* Flight Cards */
.flights-container {
    margin-bottom: 1rem;
}

.flight-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

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

.flight-route {
    font-size: 1.1rem;
}

.flight-number {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.flight-actions {
    display: flex;
    gap: 0.25rem;
}

.flight-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
}

.flight-time {
    grid-column: span 2;
}

.flight-time div {
    margin-bottom: 0.25rem;
}

.flight-notes {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #666;
}

/* Flight Modal Form */
.flight-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group.span-2 {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .flight-form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.span-2 {
        grid-column: span 1;
    }
    
    .flight-details {
        grid-template-columns: 1fr;
    }
    
    .flight-time {
        grid-column: span 1;
    }
}

@media (min-width: 768px) {
    .app {
        max-width: 768px;
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .days-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1rem;
    }
    
    .fab {
        bottom: 2rem;
        right: 2rem;
    }
}

@media (min-width: 1200px) {
    .app {
        max-width: 1200px;
    }
    
    .days-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Photo Upload Styles */
.photo-section {
    margin-bottom: 1rem;
}

.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-item {
    position: relative;
    display: inline-block;
}

.photo-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.photo-item .photo-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-item .photo-remove:hover {
    background: #c82333;
}

/* Todo item photo display */
.todo-photo {
    margin-top: 0.5rem;
}

.todo-photo img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    cursor: pointer;
}

.todo-photo img:hover {
    opacity: 0.8;
}

/* Enhanced Photo modal for viewing and uploading */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.photo-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.photo-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.photo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.photo-modal-close:hover {
    background-color: #f0f0f0;
}

.photo-modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.photo-upload-area {
    margin-bottom: 20px;
}

.upload-placeholder {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    position: relative;
}

.upload-placeholder:hover {
    border-color: #667eea;
}

.upload-placeholder.dragover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-placeholder p {
    color: #666;
    margin: 0;
}

.upload-placeholder input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #667eea;
    transition: width 0.3s ease;
    width: 0%;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.photo-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-delete {
    opacity: 1;
}

.photo-modal-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.fullscreen-photo-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.fullscreen-photo-view img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.fullscreen-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3001;
    transition: background 0.2s;
}

.fullscreen-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.pull-to-refresh-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

.pull-to-refresh-indicator.visible {
    transform: translateY(0);
}

.pull-to-refresh-indicator.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

.refresh-icon {
    font-size: 24px;
    margin-bottom: 4px;
    font-weight: bold;
}

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

@media (max-width: 480px) {
    .photo-modal {
        padding: 10px;
    }

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

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
}

/* Photos Tab Grid */
.photos-section {
    padding: 1rem;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-grid-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.photo-grid-item:hover {
    transform: scale(1.02);
}

.photo-grid-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.photo-info {
    padding: 0.75rem;
}

.photo-todo {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.photo-day {
    font-size: 0.8rem;
    color: #666;
}

/* Settings tab placeholder */
.settings-placeholder {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Import Modal Styles */
.import-section {
    margin-bottom: 1.5rem;
}

.file-upload-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.file-name {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.import-format-section {
    margin-bottom: 1.5rem;
}

.import-format-section h4 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.format-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.format-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #495057;
}

.format-info strong {
    color: #007bff;
}

.format-example {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
}

.format-example code {
    color: #495057;
    background: none;
    padding: 0;
}

.import-preview {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.import-preview h4 {
    margin-bottom: 1rem;
    color: #333;
}

.preview-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.preview-stat {
    font-size: 0.9rem;
    color: #666;
}

.preview-stat strong {
    color: #333;
}

.preview-content {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
}

.preview-day {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.preview-day:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.preview-day h5 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1rem;
}

.preview-todo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.preview-todo:last-child {
    margin-bottom: 0;
}

.todo-time {
    font-weight: 600;
    color: #495057;
    min-width: 60px;
}

.todo-category {
    font-size: 1.1rem;
}

.todo-text {
    flex: 1;
    color: #333;
}

.todo-expense {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 500;
}

.no-todos {
    color: #999;
    font-style: italic;
    margin: 0;
}