/* --- MISSIONS GUILD CORE DESIGN SYSTEM --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;        /* Brand Blue */
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --accent: #7c3aed;         /* Purple Accent */
    --surface: #f8fafc;        /* Main Background */
    --card-bg: #ffffff;        /* Card Background */
    --text: #0f172a;           /* Slate 900 */
    --text-dim: #64748b;       /* Slate 500 */
    --border: #e2e8f0;         /* Soft Border */
    --admin: #f43f5e;          /* Rose for Admin/Urgent */
    --success: #10b981;        /* Emerald */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --radius: 18px;
}

* {
    box-sizing: border-box;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--surface);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-brand {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.nav-brand span {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Fix for White-on-White Buttons in Nav */
.nav-actions button {
    color: var(--text) !important;
    border-color: var(--border) !important;
}

.nav-actions button:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

.badge-token {
    background: var(--text);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- LAYOUT --- */
.container {
    max-width: 1100px;
    margin: 120px auto 50px;
    padding: 0 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
}

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

/* --- COMPONENTS --- */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.glass-card h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0;
}

.glass-card h3 {
    font-weight: 700;
    margin-top: 0;
    font-size: 1.25rem;
}

/* --- STAT CARDS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: left;
    box-shadow: var(--shadow);
}

.stat-card small {
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.stat-card h2 {
    margin: 8px 0 0 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- BUTTONS --- */
.glow-btn {
    background: var(--primary);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.glow-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.logout-btn:hover {
    border-color: var(--admin);
    color: var(--admin);
    background: #fff1f2;
}

/* --- FORMS & INPUTS --- */
label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text);
}

input, textarea, select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fdfdfd;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea { min-height: 120px; resize: none; }

/* --- MODALS (FIXED) --- */
.modal {
    display: none; /* Ensure hidden by default */
    position: fixed;
    z-index: 2000; /* Above nav */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.6); /* Darker backdrop for focus */
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 100px auto; /* Centered top-ish */
    border-radius: 24px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    animation: modalSlide 0.3s ease-out;
}

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

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    font-weight: bold;
}

.close:hover {
    color: var(--admin);
}

/* --- LISTS & FEED --- */
.list-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.scroll-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.scroll-list::-webkit-scrollbar { width: 6px; }
.scroll-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* --- MISSIONARY PROFILE FEED --- */
.social-post {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.social-post small {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.social-post h4 {
    margin: 10px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.social-post p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* --- TABLE (Admin) --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    text-align: left;
    padding: 10px 15px;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    background: white;
    padding: 15px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

td:first-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; }
td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; }

/* --- LINKS --- */
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

/* --- SPECIFIC FIXES --- */
#followerFeed .glass-card {
    border-left: 4px solid var(--primary);
    padding: 20px;
}

#mPrayerWall .glass-card {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
}

.load-more-btn {
    background: var(--surface);
    border: 1px dashed var(--border);
    color: var(--text-dim);
    padding: 12px;
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

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