@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray: #64748b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(99,102,241,0.08);
    --shadow-lg: 0 8px 40px rgba(99,102,241,0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-bg);
    color: var(--dark);
    min-height: 100vh;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ── NAVBAR ── */
.navbar {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 6px 20px;
    font-weight: 500;
    transition: all 0.2s;
}
.navbar .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}
.navbar .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    padding: 6px 20px;
    font-weight: 500;
}
.navbar-text { color: var(--gray) !important; font-weight: 500; }

/* ── HERO ── */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    animation: pulse 6s ease-in-out infinite;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--light-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}
.hero-section h1 {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.hero-section .lead { font-size: 1.15rem; opacity: 0.9; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* ── CARDS ── */
.card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    background: var(--card-bg);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.75rem; }

/* Feature cards on homepage */
.feature-card {
    border: none;
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
    background: var(--primary-light);
}

/* ── STAT CARDS (admin) ── */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-lg);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.stat-card h2 { font-size: 2.8rem; font-weight: 800; margin: 0; }
.stat-card h5 { font-weight: 500; opacity: 0.9; margin-bottom: 8px; }
.stat-card.total  { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.stat-card.pending { background: linear-gradient(135deg, #f59e0b, #f97316); }
.stat-card.approved { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.rejected { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ── BUTTONS ── */
.btn {
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}
.btn-success { background: var(--success); border: none; }
.btn-danger  { background: var(--danger);  border: none; }
.btn-secondary { background: #e2e8f0; color: var(--dark); border: none; }
.btn-secondary:hover { background: #cbd5e1; color: var(--dark); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; }

/* ── FORMS ── */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.92rem;
    transition: all 0.2s;
    background: #fafafa;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: white;
    outline: none;
}
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 6px;
}
.form-text { font-size: 0.8rem; color: var(--gray); }

/* ── SECTION TITLES ── */
.section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
    margin-bottom: 18px;
    margin-top: 8px;
}

/* ── STATUS BADGES ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.status-badge::before { content: '●'; font-size: 0.6rem; }
.status-pending  { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* ── TABLE ── */
.table { border-collapse: separate; border-spacing: 0; }
.table thead th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 2px solid var(--border);
    padding: 12px 16px;
}
.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* ── AUTH PAGES ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
}
.auth-card {
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.auth-card .card-body { padding: 2.5rem; }
.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 8px;
}
.auth-subtitle { text-align: center; color: var(--gray); font-size: 0.9rem; margin-bottom: 28px; }
.auth-divider { text-align: center; color: var(--gray); font-size: 0.85rem; margin: 16px 0; }

/* ── DASHBOARD APPLICATION CARDS ── */
.app-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    padding: 1.25rem 1.5rem;
    margin-bottom: 14px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.app-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px 0 0 4px;
}
.app-card:hover { box-shadow: var(--shadow-lg); transform: translateX(2px); }
.app-card .pending-msg {
    font-size: 0.82rem;
    color: #92400e;
    background: #fef3c7;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    border-left: 3px solid var(--warning);
}

/* ── ID PREVIEWS ── */
.id-preview {
    max-width: 100%;
    max-height: 160px;
    border-radius: 10px;
    border: 2px solid var(--border);
    object-fit: cover;
    transition: border-color 0.2s;
}
.id-preview:hover { border-color: var(--primary); }
.id-preview-admin {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    border: 2px solid var(--border);
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s;
}
.id-preview-admin:hover { border-color: var(--primary); transform: scale(1.02); }

/* ── FILE UPLOAD ── */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    position: relative;
}
.file-upload-area:hover, .file-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.file-upload-area input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    width: 100%; height: 100%;
}

/* ── LOCATION BUTTON ── */
#shareLocationBtn {
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-weight: 500;
}
#shareLocationBtn:hover { opacity: 0.9; }

/* ── PAGINATION ── */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 1px solid var(--border);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* ── MODAL ── */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
}
.modal-header .btn-close { filter: invert(1); }
.modal-title { font-weight: 700; }
.modal-body { padding: 1.5rem; }

/* ── SEARCH BAR ── */
.search-bar {
    position: relative;
}
.search-bar .form-control {
    padding-left: 42px;
    border-radius: 50px;
}
.search-bar .search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1rem;
}

/* ── ADMIN SIDEBAR LAYOUT ── */
.admin-layout { display: flex; min-height: calc(100vh - 65px); }
.admin-content { flex: 1; padding: 28px; overflow-x: hidden; }

/* ── TOAST NOTIFICATION ── */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; }
.toast-msg {
    background: white;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 260px;
}
.toast-msg.success { border-color: var(--success); }
.toast-msg.error   { border-color: var(--danger); }
@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

/* ── LOADING SPINNER ── */
.spinner-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9998;
}
.spinner-ring {
    width: 48px; height: 48px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROFILE AVATAR ── */
.avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: white; font-weight: 700;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h5 { font-weight: 600; color: #374151; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero-section { padding: 70px 0 60px; }
    .hero-section h1 { font-size: 2rem; }
    .stat-card h2 { font-size: 2rem; }
    .card-body { padding: 1.25rem; }
    .admin-content { padding: 16px; }
}
