/* ================================
   CareHub Dashboard Typography
================================ */

.carehub-app {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #0f172a;
    line-height: 1.6;
}

/* Headings */
.carehub-app h1,
.carehub-app h2,
.carehub-app h3,
.carehub-app h4 {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #020617;
}

.carehub-app h1 {
    font-size: 26px;
    margin-bottom: 20px;
}

.carehub-app h2 {
    font-size: 20px;
    margin: 28px 0 14px;
}

.carehub-app h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Body text helpers */
.carehub-app p,
.carehub-app span,
.carehub-app li,
.carehub-app td {
    font-size: 16px;
    font-weight: 300;
}

/* Muted text */
.carehub-app .muted {
    color: #64748b;
    font-size: 14px;
}

/* App shell */
.carehub-app {
    margin: 0;
    background: #f4f6fb;
}

.carehub-app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.carehub-sidebar {
    width: 260px;
    background: #0f172a;
    color: #fff;
    padding: 24px;
}

.carehub-nav a {
    display: block;
    color: #cbd5f5;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 6px;
}

.carehub-nav a:hover,
.carehub-nav a.active {
    background: #1e293b;
    color: #fff;
}

/* Main */
.carehub-app-main {
    flex: 1;
    background: #f4f6fb;
}

.carehub-app-content {
    padding: 32px;
}

/* Stats */
.carehub-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .05);
}

.back-to-site {
    font-size: 14px;
    font-weight: 400;
    color: #475569;
    text-decoration: none;
}

.back-to-site:hover {
    color: #2563eb;
}

/* ================================
   CareHub Icon System (FIX)
================================ */

/* Base icon reset */
.carehub-app svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    stroke-width: 1.8;
    flex-shrink: 0;
}

/* Sidebar icons */
.carehub-sidebar svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    color: #cbd5f5;
}

/* Active sidebar icon */
.carehub-nav a.active svg {
    color: #ffffff;
}

/* Topbar / notification icons */
.carehub-topbar svg,
.carehub-notification svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

/* Card icons */
.card-icon svg {
    width: 28px;
    height: 28px;
    color: #2563eb;
    margin-bottom: 8px;
}

/* Table icons (if any later) */
.carehub-table svg {
    width: 16px;
    height: 16px;
}

/* Prevent SVG from stretching in flex/grid */
.carehub-app svg * {
    vector-effect: non-scaling-stroke;
}

.carehub-cards {
    display:flex;
    flex-direction: row;
    justify-content:space-between;
}

.carehub-cards .carehub-card {
        background: #fff;
            padding: 45px 25px;
            border-radius: 15px;
}

.carehub-topbar  {
    text-align:right;
    font-weight:bold;
}

/* ================================
   Dashboard Tables
================================ */

.carehub-table {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.carehub-table-header,
.carehub-table-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 14px 20px;
    align-items: center;
}

.carehub-table-header {
    background: #f8fafc;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}

.carehub-table-row {
    border-top: 1px solid #e5e7eb;
    font-size: 15px;
}

.carehub-table-row:hover {
    background: #f9fafb;
}

.carehub-actions {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
}

.carehub-empty {
    padding: 30px;
    text-align: center;
    color: #64748b;
}

.carehub-notice {
    padding: 12px 18px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
}

.carehub-notice.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #10b981;
}

.carehub-notice.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* =========================
 Dashboard Page Layout
========================= */

.carehub-page {
    max-width: 1100px;
}

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

.carehub-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* =========================
 Tables
========================= */

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

.carehub-table th {
    text-align: left;
    font-weight: 600;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.carehub-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* =========================
 Modal
========================= */

.carehub-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.carehub-modal.open {
    display: block;
}

.carehub-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.carehub-modal-panel {
    position: relative;
    max-width: 520px;
    margin: 10vh auto;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    z-index: 1;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.modal-body label {
    display: block;
    margin-bottom: 14px;
}

.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ================================
   CareHub – Service Request Form
================================ */

.carehub-service-new {
    max-width: 720px;
    margin: 0 auto;
}

.carehub-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    padding: 28px;
}

.carehub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.carehub-card-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}

.carehub-back-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
}

.carehub-back-link:hover {
    text-decoration: underline;
}

/* Form layout */
.carehub-form-stacked {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.carehub-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.carehub-field label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

/* Inputs */
.carehub-field input,
.carehub-field select,
.carehub-field textarea {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.carehub-field textarea {
    resize: vertical;
    min-height: 90px;
}

.carehub-field input:focus,
.carehub-field select:focus,
.carehub-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

/* Actions */
.carehub-form-actions {
    margin-top: 10px;
}

.carehub-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.carehub-button-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.carehub-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
}

/* ================================
   CareHub – Services List
================================ */

.carehub-services-list {
    max-width: 100%;
}

.carehub-table-wrapper {
    margin-top: 10px;
    overflow-x: auto;
}

.carehub-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.carehub-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.carehub-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

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

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

.carehub-table-empty td {
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-style: italic;
}

/* ================================
   CareHub – Transport
================================ */

.carehub-transport-new {
    max-width: 800px;
    margin: 0 auto;
}

.carehub-section {
    margin-top: 20px;
}

.carehub-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.carehub-map {
    height: 260px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

/* ================================
   CareHub – Address Autocomplete
================================ */

.carehub-autocomplete {
    position: relative;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 999;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.carehub-autocomplete-item {
    padding: 10px 14px;
    font-size: 14px;
    color: #0f172a;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.carehub-autocomplete-item:last-child {
    border-bottom: none;
}

.carehub-autocomplete-item:hover {
    background: #f1f5f9;
}

/* ================================
   CareHub – Donations & Listings
================================ */

.carehub-text {
    font-size: 15px;
    color: #334155;
    margin-bottom: 20px;
}

.carehub-donation-actions {
    margin-bottom: 30px;
}

.carehub-donation-bank {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.carehub-bank-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.carehub-bank-details li {
    margin-bottom: 8px;
    font-size: 14px;
}

.carehub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.carehub-list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.carehub-list-item:last-child {
    border-bottom: none;
}

.carehub-empty {
    color: #64748b;
    font-style: italic;
}

/* ================================
   CareHub – Topbar & Branding
================================ */

.carehub-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.carehub-topbar-left {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.carehub-dashboard-badge {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.carehub-dashboard-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.carehub-topbar-right {
    display: flex;
    align-items: center;
}

/* Secondary button for topbar */
.carehub-button-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.carehub-button-secondary:hover {
    background: #e2e8f0;
}

/* ================================
   Volunteer Theme
================================ */

.carehub-role-volunteer {
    --carehub-primary: #0f766e;
    --carehub-primary-dark: #115e59;
}

.carehub-role-volunteer .carehub-button-primary {
    background: linear-gradient(135deg,
            var(--carehub-primary),
            var(--carehub-primary-dark));
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
}

.carehub-role-volunteer .carehub-dashboard-badge {
    background: linear-gradient(135deg,
            var(--carehub-primary),
            var(--carehub-primary-dark));
}
/* ================================
   Staff Transport Status Colors
================================ */

.carehub-table-staff tr.status-pending {
    border-left: 4px solid #f59e0b;
}

.carehub-table-staff tr.status-approved {
    border-left: 4px solid #3b82f6;
}

.carehub-table-staff tr.status-in_progress {
    border-left: 4px solid #22c55e;
}

.carehub-table-staff tr.status-completed {
    border-left: 4px solid #94a3b8;
    opacity: 0.8;
}

.carehub-table-staff tr.status-cancelled {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

/* ==========================================
   Universal Two Column Layout
========================================== */

.carehub-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
}

@media (max-width: 768px) {
    .carehub-two-col {
        grid-template-columns: 1fr;
    }
}

/* ==============================
   CAREHUB FORM SYSTEM
============================== */

.carehub-card-body {
    padding: 24px;
}

.carehub-form-group {
    margin-bottom: 20px;
}

.carehub-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.carehub-input,
.carehub-textarea,
.carehub-file {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.carehub-input:focus,
.carehub-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.carehub-textarea {
    resize: vertical;
    min-height: 120px;
}

.carehub-form-actions {
    margin-top: 30px;
}

/* Primary Button */
.carehub-btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carehub-btn-primary:hover {
    background: #1d4ed8;
}

/* ===============================
   CAREHUB TOAST
================================ */

.carehub-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #16a34a;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.carehub-toast.show {
    opacity: 1;
    transform: translateY(0);
}