@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,600;0,800;1,600&display=swap');

/* =========================================
   DASHBOARD & ADMIN — WHITE GLASSMORPHISM
========================================= */

:root {
    --primary: #0097b2;
    --secondary: #e53935;
    --accent: #6200ea;
    --gold: #ffc032;
    --bg: #f0f4f8;
    --text: #1a1e23;
    --text-muted: #6b7280;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 12px 40px rgba(31, 38, 135, 0.08);
    --glass-blur: blur(24px);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --sidebar-width: 280px;
}

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

body.dashboard-body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
}

/* =========================================
   SIDEBAR
========================================= */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--white);
    border-right: 1px solid rgba(0,0,0,0.06);
    padding: 30px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.03);
}

.sidebar-logo {
    padding: 0 30px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.sidebar-logo img {
    height: 50px;
}

.sidebar-logo .logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

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

.nav-section {
    margin-bottom: 25px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 0 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 151, 178, 0.06);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(0, 151, 178, 0.1);
    color: var(--primary);
    font-weight: 700;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
}

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

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

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

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* =========================================
   GLASS CARDS
========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: 0 20px 50px rgba(31, 38, 135, 0.12);
}

/* =========================================
   STAT CARDS
========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 0 20px 0 100%;
    opacity: 0.1;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after { background: var(--danger); }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-icon.primary { background: rgba(0, 151, 178, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* =========================================
   TABLES
========================================= */
.data-table-wrapper {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.table-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    background: var(--bg);
    transition: var(--transition);
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.95rem;
}

.data-table tr:hover {
    background: rgba(0, 151, 178, 0.02);
}

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

/* =========================================
   BADGES
========================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.badge-primary { background: rgba(0, 151, 178, 0.1); color: var(--primary); }
.badge-gold { background: rgba(255, 192, 50, 0.15); color: #b8860b; }

/* =========================================
   BUTTONS
========================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary:hover {
    background: #007a93;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 151, 178, 0.3);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--gold);
    color: #1a1e23;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-gold:hover {
    background: #e6a800;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 192, 50, 0.3);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--danger);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* =========================================
   FORMS
========================================= */
.form-group {
    margin-bottom: 24px;
}

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    background: var(--white);
    transition: var(--transition);
    color: var(--text);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 151, 178, 0.1);
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* =========================================
   ALERTS / TOASTS
========================================= */
.alert {
    padding: 18px 24px;
    border-radius: 14px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success { background: rgba(16, 185, 129, 0.1); color: #065f46; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: #92400e; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-danger { background: rgba(239, 68, 68, 0.1); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-info { background: rgba(59, 130, 246, 0.1); color: #1e40af; border: 1px solid rgba(59, 130, 246, 0.2); }

.alert-pending {
    background: linear-gradient(135deg, rgba(255, 192, 50, 0.1), rgba(255, 192, 50, 0.05));
    border: 1px solid rgba(255, 192, 50, 0.3);
    color: #92400e;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

/* =========================================
   MEMBER CARD (QR Section)
========================================= */
.member-card-mini {
    background: linear-gradient(135deg, var(--white), #fefce8);
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(255, 192, 50, 0.15);
    position: relative;
    overflow: hidden;
}

.member-card-mini::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: var(--gold);
    opacity: 0.1;
    border-radius: 50%;
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 10px 25px rgba(255, 192, 50, 0.2);
}

.member-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 4px solid var(--gold);
}

.member-name { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.member-title { font-size: 0.95rem; font-weight: 700; color: var(--text-muted); margin-top: 4px; }
.member-ministry { font-size: 0.9rem; color: var(--text-muted); margin-top: 2px; }

.member-id {
    display: inline-block;
    background: rgba(255, 192, 50, 0.15);
    color: #b8860b;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 15px;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

/* =========================================
   VERIFICATION PAGE
========================================= */
.verify-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 20px;
}

.verify-card {
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.verify-header {
    padding: 40px;
    text-align: center;
    position: relative;
}

.verify-header.certified {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
    border-bottom: 3px solid var(--success);
}

.verify-header.expired {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
    border-bottom: 3px solid var(--warning);
}

.verify-header.invalid {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    border-bottom: 3px solid var(--danger);
}

.verify-seal {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    animation: sealPulse 2s infinite ease-in-out;
}

.verify-seal.certified { background: rgba(16, 185, 129, 0.1); }
.verify-seal.expired { background: rgba(245, 158, 11, 0.1); }
.verify-seal.invalid { background: rgba(239, 68, 68, 0.1); }

@keyframes sealPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.verify-body {
    padding: 40px;
}

.verify-info-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.verify-info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.verify-info-value {
    font-weight: 700;
    text-align: right;
}

/* =========================================
   LOGIN / REGISTER PAGES
========================================= */
.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 151, 178, 0.08), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 192, 50, 0.08), transparent 50%);
    pointer-events: none;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: var(--glass-shadow);
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo img {
    height: 60px;
}

.auth-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 35px;
}

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

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* =========================================
   GRID LAYOUTS
========================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-sidebar { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-title { font-size: 1.5rem; }
    .auth-card { padding: 35px 25px; }
}

/* =========================================
   CUSTOM CONFIRM DIALOG
========================================= */
.custom-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-confirm-card {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-confirm-overlay.show .custom-confirm-card {
    transform: scale(1);
}

.confirm-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 151, 178, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirm-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}

.confirm-message {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.confirm-actions {
    display: flex;
    gap: 15px;
}

.confirm-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm-yes {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-confirm-yes:hover {
    background: #007a93;
    transform: translateY(-2px);
}

.btn-confirm-no {
    background: #f3f4f6;
    color: var(--text);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-confirm-no:hover {
    background: #e5e7eb;
}
