/* CONSIA SaaS — Sahara Lattice (approved 24 Jul 2026) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
    --canvas: #FAFBFC;
    --surface: #FFFFFF;
    --ink: #1A1A1A;
    --muted: #5C6570;
    --brand: #0B6E4F;
    --brand-hover: #095C42;
    --brand-deep: #0A3D2E;
    --brand-soft: #E6F4EF;
    --sand: #E8E4DC;
    --border: #E2E8F0;
    --lattice: rgba(11, 110, 79, 0.14);
    --danger: #B91C1C;
    --warning: #B45309;
    --shadow: 0 12px 40px rgba(26, 26, 26, 0.06);
    --radius: 14px;
    --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

/* —— Nav —— */
.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    background: rgba(250, 251, 252, 0.92);
    backdrop-filter: blur(10px);
    padding: 14px 40px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid var(--brand);
    background:
        linear-gradient(90deg, var(--lattice) 1px, transparent 1px) 0 0 / 7px 7px,
        linear-gradient(var(--lattice) 1px, transparent 1px) 0 0 / 7px 7px,
        var(--brand-soft);
    flex-shrink: 0;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.nav-center a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.nav-center a:hover { color: var(--ink); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-actions .btn-nav {
    background: var(--brand);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.nav-actions .btn-nav:hover { background: var(--brand-hover); }

.nav-actions .btn-ghost {
    border: 1px solid var(--border);
    color: var(--ink) !important;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.nav-actions .btn-ghost:hover { border-color: var(--brand); color: var(--brand) !important; }

/* legacy aliases */
.nav-links { display: contents; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 72px;
}

.container.narrow { max-width: 960px; }

/* —— Buttons —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-link {
    background: none;
    border: none;
    color: var(--brand);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.btn-link:hover { color: var(--brand-hover); }

/* —— Landing hero —— */
.landing {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.hero-split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
    min-height: min(72vh, 620px);
    padding: 32px 0 48px;
}

.hero-copy { max-width: 540px; }

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.hero-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C2410C;
}

.hero-brand {
    margin: 0 0 12px;
    font-size: clamp(48px, 7vw, 72px);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--ink);
}

.hero-tagline {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}

.hero-roles {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--brand);
    font-weight: 500;
}

.hero-desc {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 15px;
    max-width: 460px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.hero-actions .btn {
    min-width: 160px;
}
.hero-actions .btn-link {
    padding: 12px 8px;
}

.hero-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(10, 61, 46, 0.55), rgba(11, 110, 79, 0.25)),
        linear-gradient(160deg, #2a2a2a 0%, #6b6b6b 40%, #9a9a9a 100%);
    box-shadow: var(--shadow);
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0%, transparent 48%, rgba(250,251,252,0.08) 49%, transparent 51%),
        linear-gradient(0deg, transparent 0%, transparent 48%, rgba(250,251,252,0.08) 49%, transparent 51%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 36px,
            rgba(11, 110, 79, 0.35) 36px,
            rgba(11, 110, 79, 0.35) 37px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 36px,
            rgba(11, 110, 79, 0.35) 36px,
            rgba(11, 110, 79, 0.35) 37px
        );
    mix-blend-mode: screen;
    opacity: 0.9;
    pointer-events: none;
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 12% 8% auto auto;
    width: 55%;
    height: 55%;
    border: 2px solid rgba(11, 110, 79, 0.85);
    border-radius: 4px;
    box-shadow:
        18px 18px 0 -2px rgba(11, 110, 79, 0.35),
        -14px 22px 0 -4px rgba(230, 244, 239, 0.25);
    transform: perspective(600px) rotateY(-18deg) rotateX(8deg);
    pointer-events: none;
}

.hero-visual-caption {
    position: absolute;
    bottom: 16px;
    inset-inline-start: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-deep);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 1;
}

/* —— Plan cards (landing) —— */
.plans-section {
    margin-top: 24px;
    padding-top: 8px;
}

.plans-section-title {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 28px;
    font-weight: 500;
}

.plans-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.plan-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.plan-tile.featured {
    border-color: var(--brand);
    box-shadow: 0 16px 48px rgba(11, 110, 79, 0.12);
    transform: translateY(-6px);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.plan-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    font-size: 18px;
}

.plan-tile h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.plan-tile p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    flex: 1;
}

.plan-price-line {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
}

.plan-price-line.free { color: var(--brand); }

.plan-tile .btn-link { font-size: 14px; }

/* —— Values bar —— */
.values-bar {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    padding-top: 28px;
}

.value-item {
    padding: 8px 20px;
    border-inline-start: 1px solid var(--border);
    text-align: center;
}

.value-item:first-child { border-inline-start: none; }

.value-item .vi {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 16px;
}

.value-item p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

/* —— Generic page bits —— */
.page-title {
    font-size: 32px;
    margin: 0 0 8px;
    font-weight: 700;
}

.subtitle {
    color: var(--muted);
    max-width: 640px;
    margin: 0 0 28px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.form-card {
    max-width: 420px;
    margin: 24px auto;
}
.form-card-wide { max-width: 720px; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    align-items: stretch;
}
.form-actions .btn {
    min-width: 140px;
    min-height: 46px;
    justify-content: center;
}

.demo-roles-block {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}
.demo-roles-block h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.role-chip {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--ink) !important;
    border-radius: 12px;
    padding: 14px 8px;
    min-height: 56px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    text-decoration: none !important;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
@media (max-width: 720px) {
    .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.role-chip:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-deep);
}
.role-chip.active,
.role-chip.is-target {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.role-chip:disabled,
.btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.form-status {
    min-height: 18px;
    font-size: 13px;
    color: var(--brand);
    margin: 0;
}

.dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.brand-text { color: var(--brand); }

.enter-ok {
    border-color: var(--brand);
    background: linear-gradient(180deg, var(--brand-soft), var(--surface));
}
.code-block {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    color: var(--ink);
}

/* —— Role hub dashboards —— */
.hub { max-width: 1120px; margin: 0 auto; padding: 8px 0 48px; }
.hub-eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: 0.04em;
}
.hub-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}
.hub-role-line { margin: 8px 0 0; color: var(--muted); }
.hub-section-title {
    margin: 28px 0 14px;
    font-size: 18px;
}
.hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.hub-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    min-height: 140px;
    box-shadow: var(--shadow);
    color: var(--ink) !important;
    text-decoration: none !important;
    transition: border-color 0.15s, transform 0.15s;
}
.hub-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}
.hub-card-icon { font-size: 22px; }
.hub-card-title { font-weight: 700; font-size: 15px; }
.hub-card-meta { font-size: 12px; color: var(--muted); margin-top: auto; line-height: 1.4; }
.hub-switch { margin-top: 28px; }
.module-page { max-width: 960px; margin: 0 auto; padding: 8px 0 48px; }
.module-action { cursor: default; }
.module-action:hover { transform: none; border-color: var(--border); }

@media (max-width: 900px) {
    .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .hub-grid { grid-template-columns: 1fr; }
}

.form-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.form-card label {
    display: block;
    margin: 14px 0 6px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.form-card input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
}

.form-card input:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}

.form-error {
    color: var(--danger);
    min-height: 18px;
    font-size: 13px;
}

.form-footer {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-top: 16px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.plan-card.featured {
    border-color: var(--brand);
    box-shadow: 0 16px 48px rgba(11, 110, 79, 0.12);
}

.plan-price { font-size: 28px; font-weight: 700; }
.plan-price span { font-size: 14px; color: var(--muted); }

.checkout-panel { margin-top: 2rem; max-width: 640px; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: var(--surface);
}

.site-footer strong { color: var(--brand); }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

@media (max-width: 900px) {
    .navbar {
        grid-template-columns: 1fr;
        padding: 12px 16px;
        gap: 12px;
    }
    .nav-center, .nav-actions { justify-content: flex-start; }
    .hero-split { grid-template-columns: 1fr; min-height: auto; }
    .hero-visual { min-height: 280px; order: -1; }
    .plans-row { grid-template-columns: 1fr; }
    .plan-tile.featured { transform: none; }
    .values-bar { grid-template-columns: 1fr 1fr; gap: 20px; }
    .value-item { border-inline-start: none; border-top: 1px solid var(--border); padding-top: 16px; }
    .value-item:nth-child(-n+2) { border-top: none; padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .plan-tile { transition: none; }
}

/* ============================================================
   App shell — authenticated hub/dashboard layout (v4.9.56)
   Sahara Lattice: deep-forest sidebar + emerald accents.
   ============================================================ */
.app-body { margin: 0; background: var(--canvas); min-height: 100vh; }
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--brand-deep);
    color: #EAF3EF;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    gap: 3px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.app-brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-size: 19px; font-weight: 700;
    letter-spacing: 0.04em; padding: 2px 8px 18px;
}
.app-brand:hover { color: #fff; }
.app-brand-mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--brand);
    display: flex; align-items: center; justify-content: center;
}
.app-brand-glyph { width: 13px; height: 13px; border-radius: 4px; border: 2px solid #fff; }
.app-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.app-nav-label {
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #7FA595; padding: 6px 11px 4px;
}
.app-nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 11px; border-radius: 10px;
    color: #C4DBD1 !important; font-size: 13.5px;
    text-decoration: none; transition: background 0.14s, color 0.14s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-nav-item:hover { background: rgba(255,255,255,0.07); color: #fff !important; }
.app-nav-item.active { background: var(--brand); color: #fff !important; }
.app-nav-ic {
    font-style: normal; font-size: 16px; width: 20px; text-align: center;
    flex-shrink: 0; opacity: 0.95;
}
.app-sidebar-foot {
    display: flex; flex-direction: column; gap: 3px;
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; margin-top: 8px;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 20px 30px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.app-topbar-title { margin: 0; font-size: 20px; font-weight: 700; }
.app-topbar-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.app-topbar-side { display: flex; align-items: center; gap: 12px; }
.app-role-pill {
    font-size: 12.5px; font-weight: 500; color: var(--brand);
    background: var(--brand-soft); padding: 6px 13px; border-radius: 999px;
}
.app-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
}
.app-content { padding: 26px 30px 48px; max-width: 1180px; }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-tile {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px 18px;
    display: flex; flex-direction: column; gap: 7px;
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 23px; font-weight: 700; }
.stat-tile-brand { background: var(--brand); border-color: var(--brand); }
.stat-tile-brand .stat-label { color: #CDE7DD; }
.stat-tile-brand .stat-value { color: #fff; }

.section-title { margin: 26px 0 14px; font-size: 16px; font-weight: 700; color: var(--muted); }
.app-content .section-title:first-child { margin-top: 0; }

/* Refined hub cards inside the app shell */
.app-content .hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.app-content .hub-card {
    box-shadow: none; border-radius: 12px; min-height: 128px;
    padding: 16px 15px; gap: 10px;
}
.app-content .hub-card:hover {
    border-color: var(--brand); transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(11,110,79,0.10);
}
.app-content .hub-card-icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: var(--brand-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.app-content .hub-card-title { font-size: 14px; }
.app-content .role-grid { display: flex; flex-wrap: wrap; gap: 9px; }

.module-intro { font-size: 15px; color: var(--muted); margin: 0 0 6px; max-width: 720px; }
.module-note {
    margin-top: 26px; background: var(--brand-soft);
    border: 1px solid #CBE4DA; border-radius: 12px; padding: 16px 18px;
}
.module-note h2 { margin: 0 0 6px; font-size: 15px; color: var(--brand-deep); }
.module-note p { margin: 0; font-size: 13.5px; color: var(--brand-deep); line-height: 1.6; }

@media (max-width: 860px) {
    .app-sidebar { width: 64px; }
    .app-sidebar .app-brand span, .app-nav-item span, .app-nav-label { display: none; }
    .app-brand { justify-content: center; padding: 2px 0 18px; }
    .app-nav-item { justify-content: center; padding: 11px 0; }
    .stat-row { grid-template-columns: 1fr; }
    .app-content, .app-topbar { padding-left: 16px; padding-right: 16px; }
}
