* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #ddd6fe 100%);
    min-height: 100vh;
    padding: 20px;
    color: #1f2937;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 24px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-purple {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.flex {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.item {
    padding: 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transform: translateX(4px);
}

.expense-item {
    padding: 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.expense-item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transform: translateX(4px);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin: 4px;
}

.badge-active {
    background: #2563eb;
    color: white;
}

.badge-inactive {
    background: #e5e7eb;
    color: #374151;
}

.text-green {
    color: #16a34a;
    font-weight: 600;
}

.text-red {
    color: #dc2626;
    font-weight: 600;
}

.text-gray {
    color: #6b7280;
    font-size: 14px;
}

.text-sm {
    font-size: 12px;
}

.settlement {
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
    border: 1px solid #fde047;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.settlement:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 224, 71, 0.3);
}

.balance-item {
    padding: 12px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.balance-item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.hidden {
    display: none;
}

.scroll-container {
    max-height: 400px;
    overflow-y: auto;
}

.trip-card {
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.trip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #2563eb;
}

.budget-section {
    padding: 20px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid #d8b4fe;
    border-radius: 12px;
    margin-bottom: 24px;
}

.comparison-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #dc2626;
}

.icon-btn:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-flex h1 {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .flex {
        width: 100%;
        justify-content: space-between;
    }
}

/* Auth Page Styles */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-header h1 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-modes {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-mode-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.auth-mode-btn.active {
    background: #2563eb;
    color: white;
}

.auth-mode-btn:hover {
    background: #e5e7eb;
}

.auth-mode-btn.active:hover {
    background: #1d4ed8;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-form {
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.auth-divider {
    margin: 20px 0;
    position: relative;
    color: #6b7280;
    font-size: 14px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: white;
    padding: 0 10px;
}

.auth-google-btn {
    width: 100%;
    padding: 12px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-planned {
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
    color: #92400e;
}

.status-ongoing {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-completed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.status-cancelled {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
}