/* User Portal Stylesheet - HOPE Care Community */
:root {
    --primary: #0f4c5c;
    --primary-hover: #0a3642;
    --primary-light: #e6f0f2;
    --accent-blue: #0284c7;
    --accent-sky: #38bdf8;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------------------------------------
   Navigation Bar
------------------------------------------------------------- */
.portal-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.portal-nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.portal-brand-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

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

.portal-nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.925rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.portal-nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.portal-nav-link.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
}

.portal-user-menu {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-user-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.portal-logout-btn {
    text-decoration: none;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    transition: all 0.15s ease;
}

.portal-logout-btn:hover {
    background: #fee2e2;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* -------------------------------------------------------------
   Main Container
------------------------------------------------------------- */
.portal-main {
    flex: 1;
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 1.75rem 1rem;
}

/* -------------------------------------------------------------
   Alert Banners
------------------------------------------------------------- */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error, .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}

/* -------------------------------------------------------------
   Cards & Layout
------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

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

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

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.stat-subtext {
    font-size: 0.775rem;
    color: var(--text-light);
    margin-top: 0.35rem;
}

/* -------------------------------------------------------------
   Hero Banner
------------------------------------------------------------- */
.welcome-hero {
    background: linear-gradient(135deg, #0f4c5c, #166476);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-hero h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.welcome-hero p {
    color: #e6f0f2;
    font-size: 0.95rem;
}

.welcome-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* -------------------------------------------------------------
   Badges
------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.775rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-volunteer { background: #e0f2fe; color: #0369a1; }
.badge-partner { background: #f3e8ff; color: #7e22ce; }
.badge-active, .badge-approved { background: #dcfce7; color: #15803d; }
.badge-new { background: #fef3c7; color: #b45309; }
.badge-in_review, .badge-pending { background: #ffedd5; color: #c2410c; }
.badge-praying { background: #ede9fe; color: #6d28d9; }
.badge-completed { background: #f1f5f9; color: #475569; }
.badge-archived, .badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-scheduled { background: #e0f2fe; color: #0284c7; }

/* -------------------------------------------------------------
   Tables
------------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.portal-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.portal-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.portal-table tbody tr:hover {
    background: #f8fafc;
}

/* -------------------------------------------------------------
   Buttons & Links
------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* -------------------------------------------------------------
   Forms
------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.925rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.15);
}

.form-control:disabled, .form-control[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
}

/* -------------------------------------------------------------
   Auth Container (Login / Forgot Password)
------------------------------------------------------------- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    flex: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.25rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.85rem;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
   Footer
------------------------------------------------------------- */
.portal-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* -------------------------------------------------------------
   Responsive Breakpoints
------------------------------------------------------------- */
@media (max-width: 840px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .portal-nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-top: 1rem;
    }

    .portal-nav-links.open {
        display: flex;
    }

    .portal-nav-container {
        flex-wrap: wrap;
    }

    .portal-user-menu {
        width: 100%;
        justify-content: space-between;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
}
