/* ============================================
   OUTbound Dashboard Styles
   Brand: Pink #ff1491, Blue #0683d7, Navy #2c3077
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #ff1491;
    --primary-dark: #d4117a;
    --primary-light: #ffe0f0;
    --secondary: #0683d7;
    --secondary-dark: #0570b8;
    --dark: #2c3077;
    --dark-lighter: #3a3e8a;
    --dark-hover: #4a4e9a;
    --white: #ffffff;
    --bg: #f4f6f9;
    --text: #2c3077;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --transition: 0.25s ease;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
}

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

/* --- Utility --- */
.hidden {
    display: none !important;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #ff1491, #223ccf, #0683d7, #161b7f);
    background-size: 300% 300%;
    animation: heroGradient 12s ease infinite;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

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

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-logo {
    text-align: center;
    margin-bottom: 8px;
}

.login-logo-img {
    height: 40px;
    width: auto;
    margin: 0 auto 16px;
}

.login-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,20,145,0.12);
}

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

.form-group input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition);
}
.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(255,20,145,0.3);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text);
}
.btn-secondary:hover {
    background: #d1d5db;
}

.btn-success {
    background: var(--secondary);
    color: var(--white);
}
.btn-success:hover {
    background: var(--secondary-dark);
}

.btn-danger {
    background: #ef4444;
    color: var(--white);
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    padding: 12px 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.back-link:hover {
    color: var(--primary);
}

/* ============================================
   TOP NAVBAR
   ============================================ */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    display: none;
    transition: background var(--transition);
}
.sidebar-toggle:hover {
    background: var(--bg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo {
    height: 28px;
    width: auto;
}

.navbar-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.3px;
}

.navbar-center {
    flex: 1;
    max-width: 480px;
    margin: 0 24px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 8px 14px 8px 40px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.search-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(255,20,145,0.1);
}
.search-input::placeholder {
    color: #9ca3af;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    position: relative;
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Dropdowns */
.notification-wrapper,
.user-wrapper {
    position: relative;
}

.notification-dropdown,
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    z-index: 1100;
    animation: dropdownIn 0.2s ease;
}

.user-dropdown {
    min-width: 200px;
}

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

.dropdown-header {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.notification-item:hover {
    background: var(--bg);
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item .notif-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.notification-item .notif-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
    color: var(--text);
}
.dropdown-btn:hover {
    background: var(--bg);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-family: inherit;
    color: var(--text);
    transition: background var(--transition);
}
.user-menu-btn:hover {
    background: var(--bg);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================================
   SIDEBAR
   ============================================ */
.dashboard-body {
    display: flex;
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    z-index: 900;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--dark-lighter);
}

.role-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.role-switcher {
    width: 100%;
    padding: 8px 12px;
    background: var(--dark-lighter);
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: auto;
    transition: border-color var(--transition);
}
.role-switcher:hover {
    border-color: rgba(255,255,255,0.3);
}
.role-switcher:focus {
    border-color: var(--primary);
}
.role-switcher option {
    background: var(--dark);
    color: var(--white);
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--dark-hover);
    color: rgba(255,255,255,0.9);
}

.nav-item.active {
    background: rgba(255,20,145,0.15);
    color: var(--white);
    border-right: 3px solid var(--primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}
.nav-item.active svg {
    opacity: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 899;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left var(--transition);
}

.content-header {
    margin-bottom: 24px;
}

.content-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon.coral { background: rgba(255,20,145,0.1); color: var(--primary); }
.stat-icon.teal { background: rgba(6,131,215,0.1); color: var(--secondary); }
.stat-icon.orange { background: rgba(255,152,0,0.1); color: #FF9800; }
.stat-icon.purple { background: rgba(156,39,176,0.1); color: #9C27B0; }
.stat-icon.red { background: rgba(244,67,54,0.1); color: #F44336; }
.stat-icon.blue { background: rgba(33,150,243,0.1); color: #2196F3; }

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.data-table tbody tr:hover {
    background: #fff0f8;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}
.badge-yellow {
    background: rgba(255,193,7,0.15);
    color: #f57f17;
}
.badge-red {
    background: rgba(239,68,68,0.12);
    color: #dc2626;
}
.badge-blue {
    background: rgba(33,150,243,0.12);
    color: #1565c0;
}
.badge-gray {
    background: rgba(158,158,158,0.15);
    color: #616161;
}
.badge-pink,
.badge-coral {
    background: rgba(255,20,145,0.12);
    color: var(--primary-dark);
}
.badge-blue,
.badge-teal {
    background: rgba(6,131,215,0.12);
    color: var(--secondary-dark);
}

/* ============================================
   FORMS
   ============================================ */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    max-width: 720px;
}

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

.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* ============================================
   STAR RATINGS
   ============================================ */
.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    color: #e0e0e0;
    font-size: 1rem;
}

.star.filled {
    color: #FFC107;
}

/* ============================================
   CHART PLACEHOLDER
   ============================================ */
.chart-placeholder {
    background: linear-gradient(135deg, #f8f9fb 0%, #eef1f6 100%);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder svg {
    margin-bottom: 8px;
}

/* ============================================
   TRIP CARDS
   ============================================ */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.trip-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.trip-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.trip-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffd6eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.trip-body {
    padding: 16px 20px;
}

.trip-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.trip-dates {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.trip-type {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
}

.trip-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   PHOTO GALLERY
   ============================================ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.photo-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.photo-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--secondary-light, #d4eefb) 0%, #b3ddf5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.photo-info {
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ============================================
   FRIENDS LIST
   ============================================ */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.friend-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.friend-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.friend-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}
.online-dot.online {
    background: var(--secondary);
}
.online-dot.offline {
    background: #9ca3af;
}

/* ============================================
   MESSAGES / INBOX
   ============================================ */
.inbox-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 480px;
}

.inbox-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.inbox-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.inbox-item:hover {
    background: #fff0f8;
}
.inbox-item.active {
    background: rgba(255,20,145,0.08);
    border-left: 3px solid var(--primary);
}

.inbox-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.inbox-item-preview {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-item-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    float: right;
}

.thread-view {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.thread-header {
    font-weight: 700;
    font-size: 1.05rem;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.thread-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.msg-bubble {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.msg-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.msg-bubble.received {
    align-self: flex-start;
    background: var(--bg);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.msg-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
}
.msg-bubble.sent .msg-time {
    color: rgba(255,255,255,0.7);
    text-align: right;
}

.thread-input {
    display: flex;
    gap: 10px;
}

.thread-input input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.thread-input input:focus {
    border-color: var(--primary);
}

/* ============================================
   SEARCH & FILTER
   ============================================ */
.search-filters {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.filters-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-field {
    flex: 1;
    min-width: 150px;
}

.filter-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
}
.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--primary);
}

/* ============================================
   SETTINGS FORM
   ============================================ */
.settings-section {
    margin-bottom: 28px;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    animation: fadeInUp 0.25s ease;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 22px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .navbar-center {
        display: none;
    }

    .user-name {
        display: none;
    }

    .inbox-layout {
        grid-template-columns: 1fr;
    }

    .thread-view {
        display: none;
    }

    .inbox-layout.thread-active .inbox-list {
        display: none;
    }
    .inbox-layout.thread-active .thread-view {
        display: flex;
    }

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

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .trips-grid,
    .photo-grid,
    .friends-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 20px 24px;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-field {
        min-width: unset;
        width: 100%;
    }
}

/* ============================================
   Collapsible "Past" section (trips, etc.)
   ============================================ */
.past-section {
    margin-top: 20px;
}
.past-section > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius, 10px);
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}
.past-section > summary::-webkit-details-marker { display: none; }
.past-section > summary::before {
    content: "▸";
    font-size: 0.8rem;
    transition: transform var(--transition, 0.2s);
}
.past-section[open] > summary::before { transform: rotate(90deg); }
.past-section > summary:hover { color: var(--dark); }
.past-section[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ============================================
   Airport autocomplete field
   ============================================ */
.airport-control { position: relative; }
.airport-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.12));
    max-height: 280px;
    overflow-y: auto;
}
.airport-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
}
.airport-suggestion:last-child { border-bottom: none; }
.airport-suggestion:hover { background: var(--primary-light); }
.airport-suggestion strong { color: var(--primary); margin-right: 4px; }
.airport-city { color: var(--text-secondary); font-size: 0.82rem; }
