/* Premium UI Styles for FallahTrips */
:root {
    --primary: #c29957; /* Desert Gold */
    --primary-hover: #e0b46b;
    --bg-dark: #0f1118;
    --bg-card: #181c26;
    --text-main: #f8f9fa;
    --text-muted: #abb2bf;
    --glass-bg: rgba(24, 28, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

/* Dynamic Background */
#dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: linear-gradient(rgba(15, 17, 24, 0.8), rgba(15, 17, 24, 0.8)),
                url('uae-bg.png') no-repeat center center fixed;
    background-size: cover;
    filter: brightness(0.7) contrast(1.1);
}

#dynamic-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(194, 153, 87, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(56, 92, 148, 0.15) 0%, transparent 50%);
    animation: pulse-bg 15s ease-in-out infinite alternate;
}

@keyframes pulse-bg {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 17, 24, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

#nav-admin { color: #facc15; }

/* Main Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    border-radius: 12px;
}

.card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 4rem 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    background: -webkit-linear-gradient(45deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

input, select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(194, 153, 87, 0.2);
}

select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #111;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 153, 87, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Loader */
.loader {
    border: 3px solid rgba(0,0,0,0.1);
    border-left-color: #111;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Results Container Layout */
.results-container {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 3rem;
}

.results-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.map-side {
    flex: 1;
    position: sticky;
    top: 100px;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
}

.btn-gmaps {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    color: #444;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-gmaps:hover {
    background: #f8f9fa;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    color: #1a73e8; /* Google Blue */
}

.map-dist-label span {
    background: white;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #ccc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.itinerary-side {
    flex: 1.5;
}

.day-frame {
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-frame.active-day {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(194, 153, 87, 0.3);
    background: rgba(194, 153, 87, 0.05);
}

.map-label-start {
    background: #ef4444 !important;
    color: white !important;
    border: 1px solid white !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.map-label-end {
    background: #10b981 !important;
    color: white !important;
    border: 1px solid white !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.distance-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: 80px;
    margin-top: -0.8rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.distance-tag::before {
    content: '↓';
    color: var(--primary);
    font-weight: bold;
}

@media (max-width: 1000px) {
    .results-layout {
        flex-direction: column;
    }
    .map-side {
        position: relative;
        top: 0;
        width: 100%;
        height: 400px;
        order: -1;
    }
}

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

.results-header h2 {
    font-size: 2.2rem;
    color: var(--primary);
}

.package-badge {
    background: rgba(194, 153, 87, 0.15);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(194, 153, 87, 0.3);
}

/* Complex Layouts - Grid & Timeline */
.plan-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Timeline (Day by Day Breakdown) */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary) 0%, transparent 100%);
}

.day-frame {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s;
}

.day-frame:hover {
    transform: translateY(-3px);
    border-color: rgba(194, 153, 87, 0.4);
}

.day-frame::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 24px;
    width: 14px;
    height: 14px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
}

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

.day-title {
    font-family: 'Outfit';
    font-size: 1.4rem;
    font-weight: 600;
}

.day-title span {
    color: var(--primary);
    margin-right: 0.5rem;
}

.day-theme {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
}

.activity-slot {
    display: flex;
    margin-bottom: 1.2rem;
    align-items: flex-start;
}

.activity-time {
    flex: 0 0 80px;
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    padding-top: 0.2rem;
}

.activity-details {
    flex: 1;
}

.activity-name {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.activity-loc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-cost-badge {
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* Sidebar Info (Hotels & Costs) */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cost-val {
    font-weight: 500;
    color: var(--text-main);
}

.cost-total {
    border-top: 1px solid var(--glass-border);
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.hotel-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hotel-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hotel-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

.hotel-stars {
    color: #facc15;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.hotel-loc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Admin Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.stat-card {
    padding: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.stat-val {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Outfit';
    margin-top: 0.5rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    color: var(--text-muted);
    font-weight: 500;
}

/* Auth box */
.auth-box {
    max-width: 400px;
    margin: 4rem auto;
}
.auth-box h2 { margin-bottom: 0.5rem; }
.auth-box p { color: var(--text-muted); margin-bottom: 2rem; }
.auth-box .input-group { margin-bottom: 1.5rem; }

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}

/* Animations */
.fade-in { animation: fadeIn 0.8s ease forwards; opacity: 0; }
.slide-up { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(20px); }
.delay-1 { animation-delay: 0.2s; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* Mobile Responsive */
@media (max-width: 900px) {
    .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.5rem; }
    .nav-links a { margin-left: 1rem; font-size: 0.9rem; }
    .card { padding: 1.5rem; }
    .timeline { padding-left: 1.5rem; }
    .timeline::before { left: 0px; }
    .day-frame::before { left: -1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH PAGES  –  Register / Login / Verify Email
═══════════════════════════════════════════════════════════════════ */

/* Wider card for the register form */
.auth-box-wide {
    max-width: 580px;
}

/* Auth header block (icon + title + subtitle) */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    animation: floatIcon 3s ease-in-out infinite alternate;
}

@keyframes floatIcon {
    0%   { transform: translateY(0);   }
    100% { transform: translateY(-6px); }
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--text-main) 40%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer link row below the form */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.4rem;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 2-column grid for the register form fields */
.form-grid-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-grid-auth .full-width {
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .form-grid-auth {
        grid-template-columns: 1fr;
    }
    .form-grid-auth .full-width {
        grid-column: 1;
    }
}

/* Password field wrapper (input + eye toggle) */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.8rem;
}

.toggle-pw {
    position: absolute;
    right: 0.8rem;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.5;
    user-select: none;
    transition: opacity 0.2s;
    line-height: 1;
}

.toggle-pw:hover { opacity: 1; }

/* Password strength bar */
.password-strength {
    margin-top: 0.5rem;
}

.pw-bar-track {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.pw-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s ease;
}

.pw-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Required field asterisk */
.req {
    color: #ef4444;
    font-size: 0.8rem;
    margin-left: 2px;
}

/* Helper text below inputs */
.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
}

/* Resend verification banner */
.resend-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(194, 153, 87, 0.08);
    border: 1px solid rgba(194, 153, 87, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.resend-banner button {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.resend-banner button:hover {
    background: var(--primary);
    color: #111;
}

/* Success message (green variant of error-msg) */
.success-msg {
    color: var(--accent-green);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    line-height: 1.5;
}


/* Audit Log Styles */
.log-user { font-weight: 600; color: var(--primary); }
.badge-event { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; border: 1px solid rgba(59, 130, 246, 0.2); }
.log-details { color: var(--text-main); font-size: 0.95rem; }
.log-time { white-space: nowrap; }
.recent-activity { margin-bottom: 2rem; }

