@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600&display=swap');

:root {
    /* ── Zayed For Good Foundation brand palette ── */
    --primary:    #203832;          /* PMS 330 U — deep forest green  */
    --warm:       #AA7D6D;          /* PMS 695 U — terracotta/rose    */
    --sage:       #D7E5D6;          /* PMS 621 U — soft sage cream    */

    --bg:         #D7E5D6;
    --surface:    #ffffff;
    --ink:        #203832;
    --muted:      rgba(32, 56, 50, 0.60);
    --line:       rgba(32, 56, 50, 0.12);
    --accent:     #203832;
    --accent-2:   #AA7D6D;
    --shadow:     0 18px 45px rgba(32, 56, 50, 0.14);
    --shadow-sm:  0 4px 16px rgba(32, 56, 50, 0.08);
    --radius:     20px;
    --radius-sm:  12px;
    --h1: 90px;
    --h2: 44px;
    --headerH: calc(var(--h1) + var(--h2));
}

* {
    box-sizing: border-box
}

html, body {
    min-height: 100%;
    height: auto;
}

body {
    margin: 0;
    font-family: 'Cairo', "Open Sans", sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Global Cairo override — covers all elements ── */
*, *::before, *::after {
    font-family: 'Cairo', "Open Sans", sans-serif;
}

.bg-theme {
    background-color: var(--sage) !important;
}

.btn-info {
    background-color: var(--primary) !important;
    color: var(--sage) !important;
    border-color: var(--primary) !important;
}
.text-info {
    color: var(--primary) !important;
}
.btn-primary, .btn-success {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-success:hover {
    background-color: #162a24 !important;
    border-color: #162a24 !important;
}
.btn-warning {
    background-color: var(--warm) !important;
    border-color: var(--warm) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}
.text-primary { color: var(--primary) !important; }
.bg-primary    { background-color: var(--primary) !important; }
.border-primary{ border-color: var(--primary) !important; }
/* ===== Top header (fixed, two rows) ===== */
.top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: #fff;
    border-bottom: 1px solid var(--line)
}

.head, .menuBar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px
}

.head {
    height: var(--h1);
    /*background: linear-gradient(169deg, #f9f6e9 0%, #dcd1b7 50%, #bbab86 100% ), linear-gradient(45deg, rgba(255, 255, 255, 0.07) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.07) 50%, #1f3663 75%, transparent 75%, transparent);*/
    background-size: 100% 100%, 40px 40px;
}

.menuBar {
    height: var(--h2);
    border-top: 1px solid var(--line);
    gap: 16px;
    display: flex;
    align-items: center;
    padding: 0 14px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px
}

    .brand .burger {
        width: 36px;
        height: 36px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        cursor: pointer;
        display: grid;
        place-items: center
    }

    .brand .logoImg {
        height: 60px;
        display: block
    }

.grow {
    flex: 1
}

.search {
    width: 320px;
    max-width: 40vw;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    color: #374151;
    background: #fff
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fde68a;
    display: grid;
    place-items: center;
    font-weight: 700
}

.breadcrumbs {
    font-size: 14px;
    color: var(--muted);
    margin-left: auto
}

/* ===== Top multi-level nav with icons (hover) ===== */
.topNav {
    display: flex;
    align-items: center;
    /*gap: 8px;*/
    list-style: none;
    margin: 0;
    padding: 0
}

    .topNav > li {
        position: relative
    }

.topBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer
}

    .topBtn svg {
        width: 16px;
        height: 16px
    }

.submenu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(2,8,23,.12);
    display: none;
    padding: 8px
}

    .submenu a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 8px;
        color: #111827;
        text-decoration: none
    }

        .submenu a:hover {
            background: #f3f4f6
        }

.topNav > li:hover .submenu, .topNav > li:focus-within .submenu {
    display: block
}

/* ===== Overlay Sidebar (100% hide, overlaps content) ===== */
/* aside overlay styles removed — replaced by #app-sidebar in _Layout.cshtml */

    aside nav .navItem .label {
        color: #787878;
        font-size: 13px;
    }


/* body.sidebar-open rules removed — handled by #sb-backdrop in layout */

.backdrop {
    display: none; /* legacy class — kept to avoid errors but no longer used */
    background: rgba(0,0,0,.25);
    display: none;
    z-index: 65
}

/* body.sidebar-open .backdrop removed */

nav {
    padding: 10px
}

.navItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: 10px;
    color: #111827;
    text-decoration: none
}

    .navItem:hover {
        background: rgba(32, 56, 50, 0.08)
    }

.navIcon {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(32, 56, 50, 0.10);
    color: var(--primary);
}

    .navIcon svg {
        width: 18px;
        height: 18px
    }

.label {
    white-space: nowrap
}

.groupTitle {
    margin: 10px 12px 4px;
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em
}

/* ===== Page and Footer ===== */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

main {
    flex: 1;
    padding: 18px;
}

/* Cards */
.grid {
    display: grid;
    gap: 14px
}

@media(min-width:900px) {
    .grid {
        grid-template-columns: repeat(3,1fr)
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.name {
    font-weight: 700
}

.role {
    margin: 2px 0 6px;
    color: #4b5563;
    font-size: 13px
}

.row {
    /*display: flex;
    align-items: center;*/
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px
}

    .row a {
        color: #4f46e5;
        text-decoration: none
    }

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin: 14px 0
}

.pageBtn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #fff;
    cursor: pointer
}

    .pageBtn.active {
        background: #111827;
        color: #fff;
        border-color: #111827
    }

/* ===== Footer (as per provided image) ===== */
footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 24px
}

.footerTop {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start
}

.footerLogo {
    display: flex;
    flex-direction: column;
    gap: 12px
}

    .footerLogo img {
        width: 200px;
        margin-bottom: 10px;
    }

.social {
    display: flex;
    gap: 14px;
    align-items: center;
    color: #7c3aed
}

    .social a {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border: 1px solid var(--line);
        border-radius: 8px;
        text-decoration: none;
        color: inherit
    }

.contact h3 {
    margin: 0 0 6px 0;
    font-size: 18px
}

.contact p {
    margin: 0 0 10px 0;
    color: #6b7280;
    line-height: 1.4
}

.contact .row {
    margin: 6px 0
}

.download h3 {
    margin: 0 0 10px 0;
    font-size: 18px
}

.qrWrap {
    display: flex;
    gap: 12px;
    align-items: center
}

.qr {
    width: 84px;
    height: 84px;
    background: #111827;
    border-radius: 6px
}

.badges {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.badge {
    height: 20px;
    width: 110px;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 10px;
    color: #111827;
}

.bg-secondary {
    background-color: var(--sage) !important;
}

.footDivider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0
}

.footerBottom {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center
}

    .footerBottom .row {
        gap: 10px
    }

    .footerBottom a {
        color: #4f46e5;
        text-decoration: none
    }

@media(max-width:900px) {
    .footerTop {
        grid-template-columns: 1fr
    }

    .footerBottom {
        grid-template-columns: 1fr
    }
}


.service-card .card-body {
    padding: 0px !important;
}

.btn-sm{
    font-size: 11px !important;
}
.btn-success {
    color: #fff !important;
}

.tbl-Z-wrap {
    background: var(--sage);
    /*border-radius: 10px;*/
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 5px 10px;
}

.tbl-Z {
    width: 100%;
    border-collapse: separate; /* allow spacing so rows can be rounded */
    border-spacing: 0px 3px;
}


    .tbl-Z thead th {
        text-align: left;
        font-size: 13px;
        font-weight: 600;
        padding: 8px 10px;
        color: var(--muted);
        background: transparent; /* no header box */
    }

    .tbl-Z thead th {
        padding: 10px;
        background: transparent;
        border: 0; /* ensure no cell borders */
    }

    .tbl-Z thead {
        background: linear-gradient(to right, #203832, #2d5248);
    }
    .tbl-Z thead th {
        color: rgba(215, 229, 214, 0.85) !important;
    }

        .tbl-Z thead tr th:first-child {
            border-top-left-radius: 10px;
            border-bottom-left-radius: 10px;
        }

        .tbl-Z thead tr th:last-child {
            border-top-right-radius: 10px;
            border-bottom-right-radius: 10px;
        }


    /* Make each row appear like a rounded card with no borders */
    .tbl-Z tbody td {
        padding: 5px 10px;
        font-size: 12px;
        background: #fff;
        border: 0; /* ensure no cell borders */
    }

    .tbl-Z tbody tr td:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .tbl-Z tbody tr td:last-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }


    /* Optional: subtle hover */
    .tbl-Z tbody tr:hover td {
        filter: brightness(0.98);
    }

    /* Make long text wrap nicely */
    .tbl-Z td, .tbl-Z th {
        word-wrap: break-word;
    }

.rounded-lrb-4 {
    border-bottom-left-radius: var(--bs-border-radius-xl) !important;
    border-bottom-right-radius: var(--bs-border-radius-xl) !important;
}

.relatives-grid .member-card {
    grid-column: span 12 !important;
    position: relative;
}

    .relatives-grid .member-card .avatar {
        width: 50px;
        height: 50px;
        border-radius: 10%;
    }

    .relatives-grid .member-card .relation-badge {
        padding: .15rem 1rem;
        border-radius: 5px;
    }

    .relatives-grid .member-card .card-actions {
        display: inline-block;
        position: absolute;
        top: 10px;
        right: 10px;
        right: 10px;
    }

.meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #cecece;
    padding-bottom: 5px;
    flex-wrap: wrap;
}

.section-title {
    color: black;
    font-weight: 400 !important;
    font-size: 22px;
    flex: 1;
    min-width: 0;
}

.section-actions {
    flex-shrink: 0;
}

    .section-actions .btn {
        background: #fff;
        color: #000;
        border: 1px solid var(--accent);
        font-weight: 600;
        padding: 6px 14px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

        .section-actions .btn:hover {
            background: var(--accent);
            color: #fff;
        }

/* Group container */
.groups {
    padding: 20px 0px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.group {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

    .group:hover {
        border-left-color: var(--accent);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    }

.group-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand);
    background: #f8fafa;
    padding: 10px 16px;
    border-bottom: 1px solid #eaeaea;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 18px;
    padding: 16px;
}

.detail-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg);
    transition: background 0.2s ease, transform 0.2s ease;
}

    .detail-card:hover {
        background: #fff;
        transform: translateY(-2px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    }

.label-muted {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.kv-val {
    font-weight: 400;
    color: var(--text);
}

@@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.alt-mobile-wrap {
    position: relative;
}

.alt-mobile-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}

    .alt-mobile-toggle:hover {
        background: rgba(0,0,0,.05);
        color: #212529;
    }

.alt-mobile-wrap input.form-control {
    padding-right: 44px; /* space for pencil */
}

.section-divider {
    position: relative;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,.08);
}

    .section-divider span {
        position: relative;
        top: -11px;
        background: #fff;
        padding: 0 14px;
        font-size: 12px;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #6b7280; /* muted */
        font-weight: 600;
    }

.left-sidebar {
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    border: 1px solid rgba(15,23,42,0.04);
    transition: transform .18s ease, box-shadow .18s ease;
    top: 80px; /* move it down from the very top */
    width: 100%; /* make it wider (default Bootstrap sidebar is ~200px) */
}

    /* Title */
    .left-sidebar .sidebar-title {
        font-size: 0.95rem;
    }

/* Links */
.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .6rem;
    border-radius: 10px;
    color: #213c35;
    text-decoration: none;
    font-weight: 600;
    transition: background .14s ease, transform .12s ease, color .12s ease;
    outline: none;
}

/* icon */
.sidebar-icon {
    width: 28px;
    text-align: center;
    font-size: 0.95rem;
    opacity: .95;
}

/* small numeric badge on right */
.sidebar-badge {
    min-width: 28px;
    text-align: center;
    font-size: .75rem;
    padding: 2px 6px;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-weight: 700;
    opacity: .9;
}

/* hover */
.sidebar-nav .sidebar-link:hover {
    background: rgba(33, 60, 53, 0.08);
    transform: translateX(4px);
    color: #213c35;
}

/* active state */
.sidebar-nav .sidebar-link.active,
.sidebar-nav .sidebar-link:focus {
    background: linear-gradient(90deg, rgba(33, 60, 53, 0.14), rgba(33, 60, 53, 0.06));
    box-shadow: inset 0 0 0 1px rgba(33, 60, 53, 0.10);
    color: #182c27;
    transform: translateX(2px);
}

/* collapsed (small width) state */
.left-sidebar.collapsed {
    width: 64px;
    min-width: 64px;
    padding-left: 10px;
    padding-right: 10px;
}

    .left-sidebar.collapsed .sidebar-text {
        display: none;
    }

    .left-sidebar.collapsed .sidebar-badge {
        display: none;
    }

/* keyboard focus ring for accessibility */
.sidebar-link:focus {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
    border-radius: 10px;
}

@@media (max-width: 767px) {
    .left-sidebar { display: none !important; }
}

/* ════════════════════════════════════════
   ZFGF BRAND THEME OVERRIDES
   #203832 · #AA7D6D · #D7E5D6
   ════════════════════════════════════════ */

/* Links */
a { color: var(--primary); }
a:hover { color: var(--warm); }

/* Badges */
.badge.bg-success  { background-color: var(--primary) !important; }
.badge.bg-warning  { background-color: var(--warm) !important; color: #fff !important; }
.badge.bg-info     { background-color: #4a7c73 !important; color: #fff !important; }

/* Form focus */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(32,56,50,.18);
}

/* Tables */
.table thead th { background: var(--sage); color: var(--primary); font-weight: 700; }
.table > :not(caption) > * > * { border-color: rgba(32,56,50,.08); }

/* Section headers */
.section-header   { border-bottom: 2px solid var(--warm); padding-bottom: 6px; }
.section-title    { color: var(--primary) !important; font-weight: 600 !important; }

/* Group titles in forms/profile cards */
.group-title {
    background: linear-gradient(90deg, rgba(32,56,50,.08), transparent);
    color: var(--primary);
    border-bottom: 1px solid rgba(32,56,50,.10);
}

/* Detail card */
.detail-card          { background: rgba(215,229,214,.45); }
.detail-card:hover    { background: #fff; }

/* Page btn */
.pageBtn.active { background: var(--primary); border-color: var(--primary); }

/* Sidebar nav links (right-panel / in-page nav) */
.sidebar-nav .sidebar-link           { color: var(--primary); }
.sidebar-nav .sidebar-link:hover     { background: rgba(32,56,50,.08); color: var(--primary); }
.sidebar-nav .sidebar-link.active    {
    background: linear-gradient(90deg, rgba(32,56,50,.14), rgba(32,56,50,.06));
    box-shadow: inset 0 0 0 1px rgba(32,56,50,.10);
    color: var(--primary);
}

/* Left sidebar (in-page) */
.left-sidebar {
    background: linear-gradient(180deg, #fff, #f4f7f4);
    border: 1px solid rgba(32,56,50,.08);
}

/* Bootstrap overrides */
.btn-primary, .btn-success {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-success:hover {
    background-color: #162a24 !important;
    border-color: #162a24 !important;
}
.btn-warning {
    background-color: var(--warm) !important;
    border-color: var(--warm) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}
.text-primary  { color: var(--primary) !important; }
.bg-primary    { background-color: var(--primary) !important; }
.border-primary{ border-color: var(--primary) !important; }
.text-success  { color: var(--primary) !important; }
.bg-success    { background-color: var(--primary) !important; }

/* Nav pills / tabs */
.nav-pills .nav-link.active {
    background-color: var(--primary) !important;
    color: #fff !important;
}
.nav-pills .nav-link { color: var(--primary); }
.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--warm);
    font-weight: 700;
}

/* Progress bars */
.progress-bar { background-color: var(--primary) !important; }
.progress-bar.bg-warning { background-color: var(--warm) !important; }

/* Alerts */
.alert-primary { background: rgba(32,56,50,.08); border-color: rgba(32,56,50,.20); color: var(--primary); }
.alert-warning { background: rgba(170,125,109,.10); border-color: rgba(170,125,109,.30); color: #7a4a35; }
