/* =============================================
   Search in the Light - Main Stylesheet
   ============================================= */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --accent: #D4A843;
    --accent-dark: #B8922F;
    --accent-light: #FDF5E6;
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --error: #DC2626;
    --error-bg: #FEE2E2;
    --info: #2563EB;
    --info-bg: #DBEAFE;
    --star: #F59E0B;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', Times, serif;
    --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ===================== NAVBAR ===================== */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}
.nav-brand .brand-search { color: var(--primary); }
.nav-brand .brand-light { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.nav-links .btn { padding: 0.4rem 1rem; font-size: 0.85rem; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem;
}

/* ===================== HOMEPAGE HERO ===================== */
.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    flex: 1;
}

.home-logo {
    margin-bottom: 0.5rem;
}

.home-logo h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}
.home-logo .logo-search { color: var(--primary); }
.home-logo .logo-light { color: var(--accent); }
.home-logo .logo-torch {
    height: 2.8rem;
    width: auto;
    vertical-align: middle;
    image-rendering: pixelated;
}

.home-tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* ===================== SEARCH BAR ===================== */
.search-form {
    width: 100%;
    max-width: 620px;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-input-wrapper {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font);
    background: transparent;
    color: var(--text);
}

.search-input::placeholder { color: var(--text-light); }

.search-btn {
    border: none;
    background: var(--primary);
    color: white;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}
.search-btn:hover { background: var(--primary-dark); }

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 4px;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
}
.search-suggestions.active { display: block; }

.search-suggestion-item {
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}
.search-suggestion-item:hover { background: var(--primary-light); }
.search-suggestion-item .suggestion-icon { color: var(--text-light); }

/* ===================== CATEGORY PILLS ===================== */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    max-width: 700px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface);
    text-decoration: none;
    transition: all 0.2s;
}
.category-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.category-pill .pill-icon { font-size: 0.9rem; }

/* ===================== DAILY VERSE ===================== */
.daily-verse {
    width: 100%;
    max-width: 620px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.daily-verse::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 6rem;
    font-family: var(--font-serif);
    color: rgba(37, 99, 235, 0.08);
    line-height: 1;
}

.verse-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.verse-text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-style: italic;
    position: relative;
}

.verse-reference {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.verse-translation-select {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verse-translation-select label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.verse-translation-select select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.verse-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.4;
}

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

.btn-accent {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: white; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger {
    background: var(--error);
    color: white;
    border-color: var(--error);
}
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; color: white; }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }

/* ===================== CARDS ===================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-featured {
    border-left: 4px solid var(--accent);
}

.result-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.result-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.result-card .card-body { flex: 1; }

.result-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.15rem;
}
.result-card .card-title a { text-decoration: none; }
.result-card .card-title a:hover { text-decoration: underline; }

.result-card .card-url {
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 0.3rem;
}

.result-card .card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.result-card .card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.result-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    background: var(--accent-light);
    color: var(--accent-dark);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Favorite button */
.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
    transition: color 0.2s, transform 0.2s;
    padding: 0.2rem;
}
.fav-btn:hover { color: var(--error); transform: scale(1.1); }
.fav-btn.favorited { color: var(--error); }

/* ===================== BUSINESS PROFILE ===================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    position: relative;
}

.profile-header-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.profile-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }

.profile-info h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.profile-info .profile-category { opacity: 0.85; font-size: 0.9rem; }
.profile-info .profile-rating { margin-top: 0.3rem; }

.profile-verified {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.profile-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.profile-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.profile-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.profile-detail {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.profile-detail-icon { color: var(--primary); width: 20px; text-align: center; flex-shrink: 0; }
.profile-detail-value { color: var(--text-muted); }
.profile-detail-value a { color: var(--primary); }

.profile-hours { list-style: none; font-size: 0.85rem; }
.profile-hours li { padding: 0.3rem 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border-light); }
.profile-hours li:last-child { border: none; }
.profile-hours .day { font-weight: 600; color: var(--text); }
.profile-hours .time { color: var(--text-muted); }

.social-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}
.social-link:hover { background: var(--primary); color: white; }

/* ===================== STARS/RATINGS ===================== */
.stars { display: inline-flex; gap: 1px; }
.star { font-size: 1rem; }
.star.filled { color: var(--star); }
.star.half { color: var(--star); }
.star.empty { color: var(--border); }

.star-input-group { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input-group input { display: none; }
.star-input-group label {
    font-size: 1.8rem;
    color: var(--border);
    cursor: pointer;
    transition: color 0.15s;
}
.star-input-group label:hover,
.star-input-group label:hover ~ label,
.star-input-group input:checked ~ label {
    color: var(--star);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.rating-number { font-size: 2rem; font-weight: 700; color: var(--text); }
.rating-details { font-size: 0.85rem; color: var(--text-muted); }

/* ===================== REVIEWS ===================== */
.review-card {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}
.review-card:last-child { border: none; }

.review-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.review-author { font-weight: 600; font-size: 0.9rem; }
.review-date { font-size: 0.8rem; color: var(--text-light); }

.review-title { font-weight: 600; margin-bottom: 0.3rem; font-size: 0.95rem; }
.review-body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.review-actions { margin-top: 0.5rem; }
.review-flag {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}
.review-flag:hover { color: var(--error); }

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

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

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
    appearance: auto;
    cursor: pointer;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 0.2rem;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.form-check label { font-weight: 400; margin: 0; cursor: pointer; }

/* ===================== FLASH MESSAGES ===================== */
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    animation: flashIn 0.3s ease;
}

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

.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid #BBF7D0; }
.flash-error { background: var(--error-bg); color: var(--error); border: 1px solid #FECACA; }
.flash-info { background: var(--info-bg); color: var(--info); border: 1px solid #BFDBFE; }

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: inherit;
    opacity: 0.7;
    padding: 0 0.25rem;
}
.flash-close:hover { opacity: 1; }

/* ===================== AUTH PAGES ===================== */
.auth-container {
    max-width: 440px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-light);
    font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===================== DASHBOARD ===================== */
.dashboard-layout {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

.dashboard-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 0;
    height: fit-content;
    position: sticky;
    top: 76px;
}

.dashboard-sidebar a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.dashboard-sidebar a:hover { background: var(--primary-light); color: var(--primary); }
.dashboard-sidebar a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.dashboard-sidebar .sidebar-header {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    font-weight: 700;
}

.dashboard-main h1 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

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

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.stat-card .stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ===================== DIRECTORY ===================== */
.page-container {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.page-header p { color: var(--text-muted); }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}
.category-card .cat-icon { font-size: 2rem; }
.category-card .cat-name { font-weight: 600; }
.category-card .cat-count { font-size: 0.8rem; color: var(--text-muted); }

/* ===================== SEARCH RESULTS ===================== */
.search-results-layout {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
}

.search-results-main { min-width: 0; }

.search-results-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.search-sidebar {
    height: fit-content;
    position: sticky;
    top: 76px;
}

.filter-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.filter-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.filter-list { list-style: none; }
.filter-list li { margin-bottom: 0.4rem; }
.filter-list a {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.filter-list a:hover { background: var(--primary-light); color: var(--primary); }
.filter-list a.active { background: var(--primary); color: white; }

/* ===================== PAGINATION ===================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .ellipsis { border: none; color: var(--text-light); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ===================== FOOTER ===================== */
.footer {
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--primary); }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    list-style: none;
}

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

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
table.table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: var(--border-light);
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}
table.table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}
table.table tr:hover td { background: #FAFAFA; }

/* ===================== BADGES ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }

/* ===================== ERROR PAGES ===================== */
.error-page {
    text-align: center;
    padding: 4rem 1.5rem;
}
.error-page h1 {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}
.error-page h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.error-page p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===================== UTILITIES ===================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    .mobile-menu-btn { display: block; }

    .home-logo h1 { font-size: 2rem; }
    .home-logo .logo-torch { height: 2rem; }

    .search-results-layout { grid-template-columns: 1fr; }
    .search-sidebar { position: static; }

    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }

    .profile-body { grid-template-columns: 1fr; }
    .profile-header-content { flex-direction: column; text-align: center; }

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

    .category-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .home-logo h1 { font-size: 1.6rem; }
    .home-logo .logo-torch { height: 1.6rem; }
    .home-tagline { font-size: 0.9rem; }
    .daily-verse { padding: 1rem 1.25rem; }
    .verse-text { font-size: 1rem; }
    .category-pills { gap: 0.3rem; }
    .category-pill { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
}
