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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Authentication Styles */
.auth-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    margin: 50px auto;
}

.auth-container h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 36px;
}

.tagline {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    font-size: 14px;
}

.auth-container h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* App Container */
.app-container {
    display: none;
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #667eea;
    font-size: 28px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-email {
    color: #555;
    font-weight: 500;
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
    font-size: 14px;
}

.logout-btn:hover {
    transform: translateY(-2px);
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.dashboard h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    transition: transform 0.3s;
}

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

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.upcoming-trip-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
}

.upcoming-trip-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.upcoming-trip-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.upcoming-trip-detail {
    display: flex;
    flex-direction: column;
}

.upcoming-trip-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.upcoming-trip-value {
    font-size: 18px;
    font-weight: 600;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.add-trip-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 25px;
    transition: transform 0.2s;
    font-size: 15px;
}

.add-trip-btn:hover {
    transform: translateY(-2px);
}

.trip-list {
    list-style: none;
}

.trip-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.trip-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.trip-item.active {
    background: #e7ebf8;
    border-left-color: #667eea;
}

.trip-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.trip-dates {
    font-size: 12px;
    color: #777;
}

/* Content Area */
.content-area {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: 500px;
}

.no-trip-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #999;
}

.no-trip-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.trip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.trip-header h2 {
    color: #333;
    font-size: 28px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 15px;
}

.tab:hover {
    color: #667eea;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* Overview Tab */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.overview-card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.overview-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.overview-card-label {
    font-size: 13px;
    color: #777;
}

/* Packing List */
.packing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.packing-category {
    margin-bottom: 30px;
}

.packing-category h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.packing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.packing-item:hover {
    background: #e9ecef;
}

.packing-item.checked {
    opacity: 0.5;
}

.packing-item.checked .packing-item-text {
    text-decoration: line-through;
}

.packing-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

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

.delete-icon {
    color: #e74c3c;
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
}

.delete-icon:hover {
    color: #c0392b;
}

/* Itinerary */
.itinerary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.itinerary-day {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.itinerary-day h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.activity {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.activity-info {
    flex: 1;
}

.activity-time {
    color: #999;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.activity-name {
    font-weight: 600;
    color: #333;
    margin: 5px 0;
    font-size: 16px;
}

.activity-location {
    color: #777;
    font-size: 14px;
    margin: 5px 0;
}

.activity-notes {
    color: #555;
    font-size: 13px;
    margin-top: 8px;
    font-style: italic;
}

.activity-delete {
    color: #e74c3c;
    cursor: pointer;
    padding: 5px 10px;
    font-weight: bold;
}

.activity-delete:hover {
    color: #c0392b;
}

/* Budget Tracker */
.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.budget-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.budget-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.budget-card.spent .budget-card-value {
    color: #e74c3c;
}

.budget-card.remaining .budget-card-value {
    color: #27ae60;
}

.budget-card-label {
    font-size: 13px;
    color: #777;
}

.expenses-list {
    margin-top: 20px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.expense-item:hover {
    background: #e9ecef;
}

.expense-info {
    flex: 1;
}

.expense-category {
    color: #999;
    font-size: 12px;
    margin-bottom: 3px;
}

.expense-description {
    font-weight: 600;
    color: #333;
    margin: 5px 0;
}

.expense-date {
    color: #777;
    font-size: 12px;
}

.expense-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.expense-amount {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
}

.expense-delete {
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    font-weight: bold;
}

.expense-delete:hover {
    color: #c0392b;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

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

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

.modal-header h2 {
    color: #333;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: auto;
}

.close-btn:hover {
    color: #667eea;
    transform: none;
}

/* Utility Classes */
.hidden {
    display: none;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.toggle-form {
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.toggle-form:hover {
    color: #764ba2;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trip-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-container {
        padding: 25px;
    }
    
    .dashboard, .content-area, .sidebar {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}