/* assets/css/style.css */
:root {
    --primary-color: #E60023;
    /* KFC Red */
    --secondary-color: #F8F9FA;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-dark);
    margin: 0;
    padding-bottom: 60px;
    /* Space for footer/PWA actions */
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Navbar */
.navbar {
    background-color: white;
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section Title */
.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 0.8rem;
    padding-left: 0.8rem;
    border-left: 6px solid var(--primary-color);
    margin-top: 2rem;
}

/* Header Buttons */
.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f0f2f5;
    color: #444;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 999px;
    /* Pill shape */
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background-color: #e4e6eb;
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-links a:active {
    transform: translateY(1px);
    background-color: #d8dadf;
}

/* Alerts */
.btn-delete {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.container {
    max-width: 800px;
    /* Mobile Adjustments */
    margin: 0 auto;
    padding: 1rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .card {
        border-radius: 12px;
        margin-left: 0;
        margin-right: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    /* Better touch targets */
    .btn,
    .tab-item {
        padding: 0.6rem 1rem;
    }

    input.form-control,
    select.form-control {
        font-size: 16px;
        padding: 0.6rem;
    }

    /* Prevent iOS zoom */
}

/* Portal Styles & Modern UI */
.portal-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .portal-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.portal-card {
    text-decoration: none;
    color: white !important;
    position: relative;
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.1s ease-in-out;
    display: flex;
    display: -webkit-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
    /* Button-like bottom shadow */
    border: none;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.portal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}

.portal-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

/* Specific Themes */
.portal-travel {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
}

.portal-party {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Icons on lighter circle background */
.portal-icon-bg {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.25);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.portal-content {
    flex: 1;
    text-align: left;
}

.portal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.portal-desc {
    color: rgba(255, 255, 255, 0.95);
    margin: 0.3rem 0 0 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Next Schedule specific */
.next-schedule-card {
    border-left: none !important;
    border-top: 5px solid var(--primary-color);
    box-shadow: 0 8px 20px -5px rgba(230, 0, 35, 0.15);
    /* Subtle red glow */
    position: relative;
    overflow: hidden;
}

.next-schedule-card h3 {
    font-size: 1.4rem !important;
    z-index: 1;
    position: relative;
}

.next-schedule-link {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--primary-color);
    text-align: right;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-bottom-left-radius: 12px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

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

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    width: auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.card-header {
    background-color: #fafafa;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1rem;
}

/* Trip List */
.trip-card {
    display: block;
    color: inherit;
    transition: transform 0.2s;
}

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

.trip-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    background: white;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
}

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

/* Itinerary */
.timeline-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.timeline-time {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 60px;
}

.timeline-content h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.timeline-place {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

/* Expenses */
.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.expense-info {
    flex: 1;
}

.expense-title {
    font-weight: bold;
}

.expense-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.expense-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Login Page specific */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Utility */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

/* Expense Row Styles */
.expense-row {
    transition: background 0.2s, opacity 0.2s;
}

.expense-row:hover {
    background: #f9f9f9 !important;
}

.expense-row.expense-settled {
    background: #f5f5f5;
    opacity: 0.75;
}

.expense-row.expense-settled:hover {
    opacity: 0.85;
}