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

:root {
    --primary-blue: #2196F3;
    --success-green: #4CAF50;
    --warning-amber: #FFC107;
    --error-red: #F44336;
    --accent-purple: #9C27B0;
    --background: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 80px;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.main-content {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.welcome-section h2 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.welcome-section p {
    color: var(--text-light);
    font-size: 1rem;
}

.quick-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.action-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.action-btn.primary {
    background: var(--primary-blue);
}

.action-btn.secondary {
    background: var(--success-green);
}

.action-btn.danger {
    background: var(--error-red);
}

.itineraries-list {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.itineraries-list h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.itinerary-card {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
}

.itinerary-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.itinerary-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.itinerary-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.itinerary-card .card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.card-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.card-actions button:hover {
    background: var(--border);
}

.card-actions .delete-btn:hover {
    color: var(--error-red);
}

.form-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

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

.itinerary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.back-btn {
    background: var(--border);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--primary-blue);
    color: white;
}

.itinerary-info h2 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.itinerary-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.itinerary-tabs {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-light);
}

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

.tab-content {
    display: none;
}

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

.days-container {
    margin-bottom: 1.5rem;
}

.day-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.day-header h3 {
    color: var(--primary-blue);
}

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

.day-header button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.day-header button:hover {
    background: var(--border);
}

.activities-list {
    margin-top: 1rem;
}

.activity-item {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--success-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.activity-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.activity-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.activity-actions button:hover {
    background: var(--white);
}

.activity-actions .delete-btn:hover {
    color: var(--error-red);
}

.budget-summary {
    margin-bottom: 2rem;
}

.budget-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.budget-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.budget-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.budget-item:last-child {
    border-bottom: none;
    font-weight: 600;
}

.add-expense-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.add-expense-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.expenses-list {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.expenses-list h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.expense-info {
    flex: 1;
}

.expense-amount {
    font-weight: 600;
    color: var(--error-red);
}

.expense-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.expense-actions button:hover {
    background: var(--border);
    color: var(--error-red);
}

.map-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.map-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

#map-locations {
    margin-top: 1rem;
    text-align: left;
}

.location-item {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary-blue);
}

.faq-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.faq-container h2 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 0;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-blue);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: var(--text-light);
    line-height: 1.6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item.active {
    color: var(--primary-blue);
    background: rgba(33, 150, 243, 0.1);
}

.nav-item:hover {
    color: var(--primary-blue);
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    background: var(--white);
    margin-top: 2rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h3 {
    color: var(--primary-blue);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--border);
    color: var(--text-dark);
}

.modal form {
    padding: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border);
}

@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .itinerary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .budget-info {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .welcome-section {
        padding: 1rem;
    }
    
    .welcome-section h2 {
        font-size: 1.2rem;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    .nav-item {
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}
