:root {
    --navy: #071428;
    --navy-2: #0d2240;
    --teal: #0f9d8e;
    --teal-dark: #0b7a6e;
    --gold: #e8a317;
    --gold-2: #f6c453;
    --ink: #142033;
    --muted: #5b6b80;
    --line: #e4ebf4;
    --paper: #f4f7fb;
    --white: #fff;
    --danger: #c23b4a;
    --ok: #168a62;
    --shadow: 0 18px 50px rgba(7, 20, 40, .12);
    --radius: 18px;
    --font: "Vazirmatn", Tahoma, sans-serif;
    --glow-teal: 0 10px 28px rgba(15,157,142,.28);
    --glow-gold: 0 10px 28px rgba(232,163,23,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { font-size: 15px; }
body {
    font-family: var(--font);
    color: var(--ink);
    line-height: 1.7;
    background:
        radial-gradient(1100px 520px at 110% -8%, rgba(15,157,142,.14), transparent 55%),
        radial-gradient(820px 420px at -12% 8%, rgba(232,163,23,.11), transparent 50%),
        linear-gradient(180deg, #e8eef6 0%, var(--paper) 38%, #eef4fa 100%);
    background-attachment: fixed;
}
body::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(rgba(7,20,40,.05) 1px, transparent 1px),
        linear-gradient(135deg, rgba(15,157,142,.03) 0 1px, transparent 1px 12px);
    background-size: 22px 22px, 48px 48px;
}

a { color: var(--teal-dark); text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font-family: inherit; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    border: 0; border-radius: 12px; padding: .65rem 1.1rem; cursor: pointer;
    font-weight: 700; position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, filter .18s ease;
}
.btn::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.28) 45%, transparent 70%);
    transform: translateX(-120%); transition: transform .55s ease; pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; box-shadow: var(--glow-teal); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2500; box-shadow: var(--glow-gold); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-danger { background: linear-gradient(135deg, #e25563, var(--danger)); color: #fff; }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; border-radius: 10px; }

.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow), 0 1px 0 rgba(255,255,255,.85) inset;
    border: 1px solid rgba(255,255,255,.75); padding: 1.15rem;
    animation: fadeUp .45s ease both;
    position: relative; overflow: hidden;
}
.card::before {
    content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--gold-2), transparent 70%);
}
.card:hover { transform: translateY(-4px); transition: transform .25s ease; box-shadow: 0 22px 50px rgba(7,20,40,.14); }
a.card { color: var(--navy); font-weight: 800; text-decoration: none; }
a.card.shortcut-card { display: flex; align-items: center; gap: .75rem; }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.7rem; color: var(--navy); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .85rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .92rem; }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=color]),
textarea, select, .entity-trigger {
    width: 100%; max-width: 100%;
    border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem;
    background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.5;
    min-height: 44px; transition: border .2s, box-shadow .2s;
}
input:not([type]),
input[type=text], input[type=password], input[type=tel], input[type=email], input[type=url], input[type=search] {
    appearance: none; -webkit-appearance: none;
}
textarea { min-height: 110px; resize: vertical; }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):focus,
textarea:focus, select:focus, .entity-trigger:focus {
    outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,157,142,.14);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input:disabled, textarea:disabled, select:disabled { background: #eef2f7; color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--teal); }
input[type=file]:not(.up-native) {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .85rem; background: #fff;
}
.persian-otp { text-align: center; letter-spacing: .28em; font-weight: 800; }
.check-row { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.check-row label { margin: 0; }
.filter-bar { margin-bottom: 1rem; }
.filter-bar .filter-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .55rem; align-items: end;
}
.filter-bar .filter-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: end; }
.card-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; align-items: center; }
.inline-form { display: inline; }

.flash-ok, .flash-warn, .validation-summary-errors {
    border-radius: 14px; padding: .85rem 1rem; margin-bottom: 1rem; animation: fadeUp .35s ease;
    display: flex; align-items: flex-start; gap: .65rem; font-weight: 700;
}
.flash-ok { background: linear-gradient(135deg, #e8f8f1, #f3fbf7); color: var(--ok); border: 1px solid #b7ead4; }
.flash-warn { background: linear-gradient(135deg, #fff6e5, #fffaf0); color: #8a5a00; border: 1px solid #f3dd9e; }
.validation-summary-errors { background: linear-gradient(135deg, #fdecee, #fff6f7); color: var(--danger); border: 1px solid #f3c4ca; }

.table-wrap { overflow: auto; border-radius: 14px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; }
table.data th, table.data td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); text-align: right; }
table.data th { font-size: .78rem; color: var(--muted); letter-spacing: .04em; background: linear-gradient(180deg, #f7fafc, #eef3f8); font-weight: 800; }
table.data tbody tr { transition: background .15s ease; }
table.data tbody tr:hover { background: #f3fbf9; }
table.data tbody tr:nth-child(even) { background: #fafcfe; }
table.data tbody tr:nth-child(even):hover { background: #eefaf7; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.badge-wait { background: linear-gradient(135deg, #fff3d6, #ffe9b0); color: #8a5a00; }
.badge-ok { background: linear-gradient(135deg, #d9f5ea, #c3eedc); color: var(--ok); }
.badge-no { background: linear-gradient(135deg, #fdecee, #f8d0d5); color: var(--danger); }
.badge-gold { background: linear-gradient(135deg, #fff1cc, var(--gold-2)); color: #7a5200; }

/* layouts */
.public-hero {
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(15,157,142,.35), transparent 50%),
        radial-gradient(700px 380px at 100% 0%, rgba(232,163,23,.28), transparent 46%),
        linear-gradient(165deg, #071428 0%, #123056 55%, #0b7a6e 140%);
    color: #fff; padding: 1.2rem;
}
.public-nav { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; }
.brand {
    font-weight: 900; letter-spacing: -.02em; font-size: 1.25rem; color: #fff;
    display: flex; align-items: center; gap: .65rem;
}
.hero-copy { max-width: 1100px; margin: 4rem auto 2rem; }
.hero-copy h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.25; margin: 0 0 1rem; }
.hero-copy p { max-width: 42rem; opacity: .88; }
.role-card {
    background: rgba(255,255,255,.08); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 1.1rem;
    animation: fadeUp .55s ease both;
}
.role-card:nth-child(2) { animation-delay: .08s; }
.role-card:nth-child(3) { animation-delay: .16s; }
.role-card:nth-child(4) { animation-delay: .24s; }

.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
    width: 278px; background:
        radial-gradient(420px 220px at 100% 0%, rgba(232,163,23,.18), transparent 55%),
        linear-gradient(180deg, var(--navy), var(--navy-2) 55%, #0a1c33);
    color: #d7e4f2; padding: 1rem .8rem 2rem; position: sticky; top: 0; height: 100vh; overflow: auto;
    transition: transform .28s ease;
    box-shadow: 8px 0 32px rgba(7,20,40,.18);
}
.sidebar a { color: #d7e4f2; display: flex; gap: .65rem; align-items: center; padding: .5rem .65rem; border-radius: 12px; transition: background .18s, transform .18s, color .18s; }
.sidebar a i {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: rgba(255,255,255,.08); color: var(--gold-2); font-size: .86rem;
}
.sidebar a:hover { background: rgba(15,157,142,.18); color: #fff; transform: translateX(-3px); }
.sidebar a.active { background: linear-gradient(135deg, rgba(15,157,142,.38), rgba(232,163,23,.18)); color: #fff; }
.sidebar a.active i { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2500; }
.nav-group { margin: 1rem 0 .35rem; font-size: .72rem; letter-spacing: .12em; color: #89a0b8; padding: 0 .7rem; text-transform: uppercase; }
.main { flex: 1; padding: 1.2rem 1.3rem 3rem; position: relative; z-index: 1; }
.topbar {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.15rem; gap: 1rem;
    background: rgba(255,255,255,.72); backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.8); border-radius: 16px; padding: .7rem .9rem;
    box-shadow: 0 10px 30px rgba(7,20,40,.06);
}
.topbar h1 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .55rem; }
.burger { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; }

.overlay { display: none; position: fixed; inset: 0; background: rgba(7,20,40,.45); z-index: 30; }

/* entity picker */
.ep-backdrop {
    position: fixed; inset: 0; background: rgba(7,20,40,.46); z-index: 80;
    display: none; align-items: center; justify-content: center; padding: 1rem;
    animation: fade .2s ease;
}
.ep-backdrop.open { display: flex; }
.ep-modal {
    width: min(640px, 100%); background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.28); animation: pop .28s ease;
}
.ep-head { padding: 1rem 1.1rem; background: linear-gradient(135deg, var(--navy), #15416e); color: #fff; display: flex; justify-content: space-between; }
.ep-body { padding: 1rem; }
.ep-results { max-height: 360px; overflow: auto; }
.ep-item { padding: .75rem; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.ep-item:hover { background: #eefaf7; border-color: #c6efe8; }
.entity-field { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; }
.entity-label { font-size: .9rem; color: var(--muted); }

/* timeline */
.timeline { position: relative; padding-right: 1.55rem; }
.timeline::before {
    content: ""; position: absolute; right: 13px; top: .4rem; bottom: .4rem; width: 3px;
    background: linear-gradient(180deg, var(--gold-2), var(--teal), #9adfd6);
    border-radius: 99px; box-shadow: 0 0 12px rgba(15,157,142,.35);
}
.tl-item {
    position: relative; background: #fff; border-radius: 16px; padding: 1rem 1.1rem 1rem 1rem;
    margin-bottom: .95rem; animation: fadeUp .4s ease both;
    border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(7,20,40,.06);
}
.tl-item::after {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--teal));
    position: absolute; right: -1.62rem; top: 1.15rem;
    box-shadow: 0 0 0 5px #d7f3ee, 0 0 16px rgba(15,157,142,.45);
    animation: pulseDot 1.8s ease-in-out infinite;
}
.tl-item.done { border-right: 5px solid var(--teal); }
.tl-item.done::after { background: radial-gradient(circle at 30% 30%, #fff, var(--ok)); box-shadow: 0 0 0 5px #d9f5ea; animation: none; }
.tl-item.progress { border-right: 5px solid var(--gold); }
.tl-item.progress::after { background: radial-gradient(circle at 30% 30%, #fff, var(--gold)); box-shadow: 0 0 0 5px #fff1cc; }
.tl-item.wait { border-right: 5px solid #c5d0de; }
.tl-item.wait::after { background: #c5d0de; box-shadow: 0 0 0 5px #e4ebf4; animation: none; }
.tl-item.reject { border-right: 5px solid var(--danger); }
.tl-item.reject::after { background: var(--danger); box-shadow: 0 0 0 5px #fdecee; animation: none; }
.wf-progress { height: 10px; background: #e4ebf4; border-radius: 99px; overflow: hidden; margin: .55rem 0; position: relative; }
.wf-progress i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--teal), var(--gold-2), var(--gold));
    background-size: 200% 100%;
    animation: barShine 2.2s linear infinite;
    border-radius: 99px;
    transition: width 1.1s cubic-bezier(.22,1,.36,1);
}
.rate-row { margin: .7rem 0; }
.rate-row-head { display: flex; justify-content: space-between; gap: .6rem; font-size: .9rem; }
.rate-input input[type=range] { width: 100%; accent-color: var(--gold); }

.mission {
    background:
        radial-gradient(420px 180px at 0% 0%, rgba(232,163,23,.22), transparent 50%),
        linear-gradient(165deg, #10243f 0%, #0b1a30 60%, #12324a 100%);
    color: #f3e7c8;
    border: 1px solid rgba(246,196,83,.4); border-radius: 22px; padding: 1.1rem;
    box-shadow: 0 0 28px rgba(232,163,23,.2), 0 16px 40px rgba(0,0,0,.25);
    animation: glow 2.8s ease-in-out infinite alternate, fadeUp .45s ease both;
    position: relative; overflow: hidden;
}
.mission::after {
    content: ""; position: absolute; inset: auto -20% -40% auto; width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(232,163,23,.25), transparent 70%); pointer-events: none;
}
.xp { font-weight: 900; color: var(--gold-2); }

.stars { color: var(--gold); letter-spacing: 1px; }

.auth-box { max-width: 460px; margin: 3rem auto; }

.prompt-tree-page { display: flex; flex-direction: column; gap: .7rem; }
.tree-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.tree-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.tree-banner {
    display: block; background: #e8a317; color: #071428; font-weight: 700;
    text-align: center; padding: .55rem .8rem; border-radius: 12px;
}
.tree-banner[hidden] { display: none !important; }
.tree-wrapper { background: #0d2240; border-radius: 18px; overflow: hidden; min-height: 62vh; position: relative; }
.tree-wrapper.fullscreen { position: fixed; inset: 0; z-index: 90; min-height: 100vh; border-radius: 0; }
.tree-view-container, .tree-view-container .vis-network, .tree-view-container canvas {
    height: 62vh; direction: ltr; touch-action: none;
}
.tree-wrapper.fullscreen .tree-view-container,
.tree-wrapper.fullscreen .tree-view-container .vis-network { height: 100vh; }
.node-info-panel {
    position: fixed; top: 5.5rem; left: 1rem; width: min(300px, 90vw); background: #fff;
    border-radius: 16px; box-shadow: var(--shadow); padding: 1rem; z-index: 50; display: none;
}
.node-info-panel.open { display: block; }
.ctx-menu {
    position: fixed; z-index: 10050; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
    min-width: 220px; overflow: hidden; display: none; border: 1px solid var(--line);
}
.ctx-menu.show { display: block !important; }
.ctx-menu button {
    display: flex; width: 100%; align-items: center; gap: .55rem;
    text-align: right; border: 0; background: #fff; padding: .7rem 1rem; cursor: pointer;
}
.ctx-menu button i { width: 1.1rem; color: var(--teal); }
.ctx-menu button:hover { background: #eefaf7; }
.ctx-menu button.danger { color: var(--danger); }
.ctx-menu button.danger i { color: var(--danger); }
.prompt-preview { white-space: pre-wrap; font-size: .88rem; max-height: 60vh; overflow: auto; background: #f4f7fb; padding: 1rem; border-radius: 12px; }

.upload-zone {
    border: 2px dashed var(--line); border-radius: 16px; padding: 1rem; background: #fbfcfe;
    transition: border .2s, background .2s; position: relative;
}
.upload-zone.drag { border-color: var(--teal); background: #eefaf7; }
.up-hint { display: flex; gap: .6rem; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); padding: .8rem; min-height: 64px; text-align: center; }
.up-hint i { font-size: 1.4rem; color: var(--teal); }
.up-native { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-zone input[type=file].up-native { pointer-events: none; }
.up-list { display: grid; gap: .55rem; margin-top: .6rem; }
.up-item { display: grid; grid-template-columns: 72px 1fr; gap: .7rem; align-items: center; background: #fff; border-radius: 12px; padding: .5rem; border: 1px solid var(--line); }
.up-item.fail { border-color: #f3c4ca; }
.up-thumb { min-height: 56px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: #eef2f7; }
.up-thumb img, .up-thumb video { width: 100%; height: 64px; object-fit: cover; }
.up-bar { height: 8px; background: #e4ebf4; border-radius: 99px; overflow: hidden; margin: .35rem 0; }
.up-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .15s; }
.up-pct { font-size: .8rem; color: var(--muted); }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; margin: .8rem 0; }
.media-card { position: relative; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.media-card img, .media-card video { width: 100%; height: 120px; object-fit: cover; display: block; }
.media-card .btn-del { position: absolute; top: .35rem; left: .35rem; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
    from { opacity: 0; transform: scale(.94) translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes glow {
    from { box-shadow: 0 0 12px rgba(232,163,23,.12); }
    to { box-shadow: 0 0 32px rgba(232,163,23,.38); }
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 5px #d7f3ee, 0 0 0 0 rgba(15,157,142,.35); }
    50% { box-shadow: 0 0 0 5px #d7f3ee, 0 0 0 8px rgba(15,157,142,.12); }
}
@keyframes barShine {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    html { font-size: 12.75px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; z-index: 40; transform: translateX(110%);
        width: min(86vw, 300px);
    }
    .sidebar.open { transform: none; }
    .burger, .overlay.show { display: block; }
    .main { padding: .8rem .75rem 5rem; }
    .btn, .burger, .sidebar a { min-height: 44px; }
    .btn { padding: .7rem .9rem; }
    input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]),
    textarea {
        min-height: 44px;
    }
    .card { padding: .9rem; border-radius: 14px; }

    .ep-backdrop { align-items: flex-end; padding: 0; }
    .ep-modal {
        width: 100%; border-radius: 22px 22px 0 0;
        animation: sheet .28s ease;
        max-height: 86vh;
    }
    .sp-ios-jw-backdrop { align-items: flex-end !important; }
    .sp-ios-jw-dialog { max-width: 100% !important; border-radius: 22px 22px 0 0 !important; }
}

@keyframes sheet {
    from { transform: translateY(100%); }
    to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

.crm-funnel { display: grid; gap: .65rem; }
.crm-funnel .bar-row { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .55rem; align-items: center; }
.crm-funnel .bar {
    height: 14px; background: #e4ebf4; border-radius: 99px; overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(7,20,40,.08);
}
.crm-funnel .bar i {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--teal), #3ec7b8, var(--gold));
    background-size: 200% 100%;
    animation: barShine 2.4s linear infinite;
    border-radius: 99px;
    transition: width 1s cubic-bezier(.22,1,.36,1);
}
.kanban { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: .7rem; overflow: auto; padding-bottom: .5rem; }
.kanban-col {
    background: linear-gradient(180deg, #f4f7fb, #e8eef6);
    border-radius: 16px; padding: .7rem; min-height: 200px;
    border: 1px solid rgba(255,255,255,.8); box-shadow: 0 8px 20px rgba(7,20,40,.05);
}
.kanban-col h4 { margin: .15rem .2rem .7rem; font-size: .85rem; display: flex; justify-content: space-between; gap: .4rem; }
.kanban-card {
    background: #fff; border-radius: 14px; padding: .75rem; margin-bottom: .55rem;
    box-shadow: 0 8px 18px rgba(7,20,40,.07); border: 1px solid var(--line);
    transition: transform .18s ease, box-shadow .18s ease;
}
.kanban-card:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: 0 14px 28px rgba(7,20,40,.12); }
.call-tl {
    border-right: 4px solid transparent; padding: .75rem .9rem; margin: .65rem 0;
    border-radius: 12px; background: linear-gradient(90deg, #f7fbfa, #fff);
    border-right-color: var(--teal);
    box-shadow: 0 6px 16px rgba(7,20,40,.04);
}
.call-tl audio { width: 100%; margin-top: .4rem; }
.quote-paper { max-width: 900px; margin: 0 auto; }
.prio-urgent { color: var(--danger); font-weight: 800; }
.prio-high { color: #8a5a00; font-weight: 800; }
@media (max-width: 900px) {
    .kanban { grid-template-columns: 1fr; }
    .crm-funnel .bar-row { grid-template-columns: 1fr; }
    .stat-card { flex-direction: column; text-align: center; }
    .hero-orbs { display: none; }
}

/* —— visual pro —— */
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    color: #3a2500; font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(232,163,23,.35);
}
.user-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: .25rem .7rem .25rem .3rem; color: var(--ink); font-size: .82rem; font-weight: 700;
}
.user-chip i {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy), #15416e); color: var(--gold-2);
}
.page-ico {
    width: 36px; height: 36px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(15,157,142,.14), rgba(232,163,23,.16));
    color: var(--navy);
}
.stat-card {
    display: flex; align-items: center; gap: .85rem; text-align: right;
}
.stat-card .stat-copy { flex: 1; min-width: 0; }
.stat-card.stat { text-align: right; }
.stat-ico {
    width: 52px; height: 52px; border-radius: 16px; flex: 0 0 52px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, #0f9d8e, #0b7a6e);
    color: #fff; font-size: 1.15rem;
    box-shadow: 0 10px 20px rgba(15,157,142,.28);
}
.stat-card:nth-child(2n) .stat-ico { background: linear-gradient(145deg, #123056, #0d2240); box-shadow: 0 10px 20px rgba(7,20,40,.22); }
.stat-card:nth-child(3n) .stat-ico { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #3a2500; box-shadow: var(--glow-gold); }
.stat-card:nth-child(4n) .stat-ico { background: linear-gradient(145deg, #c23b4a, #9c2e3a); }
.shortcut-card { min-height: 76px; }
.shortcut-ico {
    width: 44px; height: 44px; border-radius: 14px; flex: 0 0 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(15,157,142,.12), rgba(232,163,23,.14));
    color: var(--teal-dark); font-size: 1.1rem;
}
.tl-head { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: .35rem; }
.tl-ico {
    width: 34px; height: 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eefaf7; color: var(--teal-dark);
}
.fin-row {
    display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center;
}
.fin-ico {
    width: 46px; height: 46px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fff1cc, var(--gold-2)); color: #7a5200; font-size: 1.1rem;
}
.donut {
    width: 140px; height: 140px; border-radius: 50%; margin: .4rem auto;
    background: conic-gradient(var(--teal) 0 40%, var(--gold) 40% 70%, #c5d0de 70% 100%);
    mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
    -webkit-mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
    animation: pop .6s ease;
}
.kpi-ring { position: relative; }
.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orbs span {
    position: absolute; border-radius: 50%; filter: blur(2px); opacity: .45; animation: floaty 6s ease-in-out infinite;
}
.hero-orbs span:nth-child(1) { width: 180px; height: 180px; background: #0f9d8e; top: 12%; left: 8%; }
.hero-orbs span:nth-child(2) { width: 120px; height: 120px; background: #e8a317; top: 40%; right: 12%; animation-delay: -2s; }
.hero-orbs span:nth-child(3) { width: 80px; height: 80px; background: #fff; bottom: 16%; left: 40%; animation-delay: -3.4s; }
.public-hero { position: relative; overflow: hidden; z-index: 1; }
.role-card h3 { display: flex; align-items: center; gap: .5rem; }
.role-card i {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(232,163,23,.2); color: var(--gold-2);
}
.filter-bar { background: linear-gradient(180deg, #fff, #f7fafc); }
.empty-art {
    text-align: center; padding: 1.4rem .8rem; color: var(--muted);
}
.empty-art i { font-size: 2rem; color: var(--gold); display: block; margin-bottom: .4rem; animation: floaty 3.5s ease-in-out infinite; }
.auth-box { position: relative; z-index: 1; }
.auth-hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center; padding: 1.2rem;
    background:
        radial-gradient(700px 320px at 10% -10%, rgba(15,157,142,.35), transparent 50%),
        radial-gradient(560px 280px at 100% 0%, rgba(232,163,23,.28), transparent 46%),
        linear-gradient(165deg, #071428 0%, #123056 55%, #0b7a6e 140%);
}
.grid > .card:nth-child(1) { animation-delay: .02s; }
.grid > .card:nth-child(2) { animation-delay: .06s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .14s; }
.grid > .card:nth-child(5) { animation-delay: .18s; }
.grid > .card:nth-child(6) { animation-delay: .22s; }
.grid > .card:nth-child(7) { animation-delay: .26s; }
.public-hero .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.kanban-col:nth-child(1) { border-top: 4px solid var(--teal); }
.kanban-col:nth-child(2) { border-top: 4px solid #3ec7b8; }
.kanban-col:nth-child(3) { border-top: 4px solid var(--gold); }
.kanban-col:nth-child(4) { border-top: 4px solid #f6c453; }
.kanban-col:nth-child(5) { border-top: 4px solid var(--ok); }
.kanban-col:nth-child(6) { border-top: 4px solid var(--danger); }
.card > h3 { display: flex; align-items: center; gap: .5rem; margin-top: .15rem; }

.portal-hero { padding-bottom: 3rem; }
.portal-grid { max-width: 1280px; margin: 0 auto 2rem; }
.project-card {
    display: flex; flex-direction: column; gap: .55rem;
    background: rgba(255,255,255,.1); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.16); border-radius: 24px;
    padding: 1.4rem 1.3rem 1.2rem; color: #fff !important; text-decoration: none !important;
    min-height: 240px; animation: fadeUp .55s ease both;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.22); }
.project-card-teal { border-top: 4px solid #3ec7b8; }
.project-card-gold { border-top: 4px solid #f6c453; }
.project-card-crimson { border-top: 4px solid #e11d2e; }
.project-card-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(232,163,23,.22); font-size: 1.35rem; color: #f6c453;
}
.project-card h2 { margin: .2rem 0 0; font-size: 1.55rem; }
.project-card-kicker { opacity: .78; font-weight: 700; margin: 0; }
.project-card-go { margin-top: auto; font-weight: 800; color: #f6c453; }
.back-to-hub {
    display: inline-flex; align-items: center; gap: .4rem;
    color: inherit; opacity: .85; font-size: .85rem; font-weight: 700;
}
.back-to-hub:hover { opacity: 1; }
