/*!
 * DSSource design system v2
 * DarkStack - dssource.ir
 */

/* ---------------- fonts ---------------- */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* ---------------- tokens ---------------- */
:root {
    --ds-primary: #5b5bf6;
    --ds-primary-dark: #4646d9;
    --ds-primary-2: #8b5cf6;
    --ds-primary-soft: rgba(91, 91, 246, .1);
    --ds-primary-glow: rgba(91, 91, 246, .35);
    --ds-gradient: linear-gradient(135deg, #5b5bf6 0%, #8b5cf6 55%, #06b6d4 130%);
    --ds-accent: #06b6d4;
    --ds-success: #10b981;
    --ds-warning: #f59e0b;
    --ds-danger: #ef4444;
    --ds-info: #3b82f6;

    --ds-bg: #f4f5fb;
    --ds-surface: #ffffff;
    --ds-surface-2: #f6f7fc;
    --ds-surface-3: #eef0f8;
    --ds-border: #e6e8f1;
    --ds-border-strong: #d6d9e6;
    --ds-text: #0f1629;
    --ds-text-2: #3f4763;
    --ds-text-muted: #6b7390;
    --ds-shadow-sm: 0 1px 2px rgba(15, 22, 41, .04);
    --ds-shadow: 0 1px 2px rgba(15, 22, 41, .04), 0 10px 30px -12px rgba(15, 22, 41, .12);
    --ds-shadow-lg: 0 20px 50px -18px rgba(15, 22, 41, .28);
    --ds-radius: 18px;
    --ds-radius-sm: 12px;
    --ds-radius-xs: 8px;
    --ds-nav-h: 68px;
    --ds-ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
    --ds-primary: #7c7cff;
    --ds-primary-dark: #6a6af5;
    --ds-primary-soft: rgba(124, 124, 255, .16);
    --ds-primary-glow: rgba(124, 124, 255, .35);
    --ds-bg: #0a0f1e;
    --ds-surface: #111a2e;
    --ds-surface-2: #16203a;
    --ds-surface-3: #1c2744;
    --ds-border: #223052;
    --ds-border-strong: #2d3d64;
    --ds-text: #e8ecf8;
    --ds-text-2: #b8c1dc;
    --ds-text-muted: #8d97b8;
    --ds-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --ds-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --ds-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------------- base ---------------- */
* { scrollbar-width: thin; scrollbar-color: var(--ds-border-strong) transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: var(--ds-bg);
    color: var(--ds-text);
    font-size: .95rem;
    line-height: 1.9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

a { color: var(--ds-primary); text-decoration: none; transition: color .15s var(--ds-ease); }
a:hover { color: var(--ds-primary-dark); }

h1, h2, h3, h4, h5, h6 { font-weight: 800; color: var(--ds-text); letter-spacing: -.01em; }
.text-muted { color: var(--ds-text-muted) !important; }
.text-primary { color: var(--ds-primary) !important; }
.num { font-variant-numeric: tabular-nums; }
code { color: var(--ds-primary); background: var(--ds-primary-soft); padding: .1rem .4rem; border-radius: 6px; font-size: .82em; direction: ltr; unicode-bidi: embed; }
::selection { background: var(--ds-primary); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--ds-border-strong); border-radius: 999px; }

img { max-width: 100%; }
.small, small { font-size: .84em; }

/* ---------------- motion ---------------- */
@keyframes ds-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ds-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ds-blob { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.08); } 66% { transform: translate(-20px, 25px) scale(.95); } }
@keyframes ds-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.ds-reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ds-ease), transform .55s var(--ds-ease); }
.ds-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .ds-reveal { opacity: 1; transform: none; } }

/* ---------------- layout blocks ---------------- */
.ds-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-sm);
    transition: transform .2s var(--ds-ease), box-shadow .2s var(--ds-ease), border-color .2s var(--ds-ease);
}
.ds-card-hover:hover { transform: translateY(-4px); box-shadow: var(--ds-shadow-lg); border-color: rgba(91, 91, 246, .35); }
.ds-card-body { padding: 1.35rem; }
.ds-card > .ds-card-body + .ds-card-body { border-top: 1px solid var(--ds-border); }
.ds-card .border-bottom { border-color: var(--ds-border) !important; }
.ds-card .border-top { border-color: var(--ds-border) !important; }

.ds-section { padding: 4rem 0; }
.ds-section-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; }
.ds-section-title h2 { font-size: 1.55rem; margin: 0; font-weight: 900; }
.ds-section-title h2 span { color: var(--ds-primary); background: var(--ds-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ds-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; color: var(--ds-primary); background: var(--ds-primary-soft); padding: .2rem .7rem; border-radius: 999px; margin-bottom: .6rem; }

/* ---------------- navbar ---------------- */
.ds-navbar {
    background: color-mix(in srgb, var(--ds-surface) 78%, transparent);
    border-bottom: 1px solid var(--ds-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    min-height: var(--ds-nav-h);
    padding: .5rem 0;
}
.ds-navbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(15, 22, 41, .35); }
.ds-navbar .navbar-brand { font-weight: 900; font-size: 1.4rem; letter-spacing: -.03em; color: var(--ds-text); }
.ds-navbar .navbar-brand span { color: var(--ds-primary); }
.ds-navbar .navbar-brand i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ds-gradient); color: #fff !important; font-size: .95rem; box-shadow: 0 6px 16px -6px var(--ds-primary-glow); }
.ds-navbar .nav-link { color: var(--ds-text-2); font-weight: 600; padding: .45rem .85rem !important; border-radius: 999px; font-size: .9rem; transition: all .15s var(--ds-ease); }
.ds-navbar .nav-link:hover { color: var(--ds-primary); background: var(--ds-primary-soft); }
.ds-navbar .nav-link.active { color: var(--ds-primary); background: var(--ds-primary-soft); }
.ds-navbar .navbar-toggler { color: var(--ds-text); font-size: 1.2rem; }
.ds-navbar .btn-sm { padding: .4rem .85rem; }

.ds-topbar { background: var(--ds-gradient); color: #fff; font-size: .82rem; padding: .45rem 0; }
.ds-topbar a { color: #fff; text-decoration: underline; }

/* ---------------- hero ---------------- */
.ds-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0b1020 0%, #121a3a 60%, #0f1530 100%);
    color: #fff;
    padding: 5rem 0 4.5rem;
    isolation: isolate;
}
.ds-hero::before, .ds-hero .ds-blob {
    content: '';
    position: absolute;
    width: 640px; height: 640px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .85;
    z-index: 0;
    animation: ds-blob 14s ease-in-out infinite;
    pointer-events: none;
}
.ds-hero::before { background: radial-gradient(circle, #6366f1 0%, rgba(99,102,241,.35) 40%, transparent 68%); top: -240px; inset-inline-end: -100px; }
.ds-hero .ds-blob { background: radial-gradient(circle, #06b6d4 0%, rgba(6,182,212,.3) 40%, transparent 68%); bottom: -300px; inset-inline-start: -180px; animation-delay: -7s; }
.ds-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
    pointer-events: none;
}
.ds-hero > .container { position: relative; z-index: 2; }
.ds-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3.2rem); font-weight: 900; line-height: 1.45; letter-spacing: -.02em; }
.ds-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ds-hero p.lead { color: #c7d2fe; font-size: 1.05rem; max-width: 600px; }
.ds-hero .badge-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
    color: #e0e7ff; padding: .35rem .95rem; border-radius: 999px; font-size: .8rem; backdrop-filter: blur(6px);
}
.ds-hero .badge-pill i { color: #fbbf24; }
.ds-hero .btn-outline-light { border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .04); }
.ds-hero .btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff; }
.ds-hero .ds-card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); animation: ds-float 7s ease-in-out infinite; }

.ds-hero-search {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    padding: .35rem .35rem .35rem .9rem;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
    color: #0f1629;
}
.ds-hero-search .text-white-50 { color: var(--ds-primary) !important; }
.ds-hero-search .form-control { background: transparent; border: 0; color: #0f1629; box-shadow: none; }
.ds-hero-search .form-control::placeholder { color: #6b7390; }
.ds-hero-search .btn { border-radius: 999px; }
[data-theme="dark"] .ds-hero-search { background: rgba(17, 26, 46, .92); border-color: rgba(255, 255, 255, .12); color: #fff; }
[data-theme="dark"] .ds-hero-search .form-control { color: #fff; }

/* hero trust row */
.ds-hero-trust { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.75rem; color: #a5b4fc; font-size: .8rem; }
.ds-hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.ds-hero-trust i { color: #34d399; }

/* ---------------- stats ---------------- */
.ds-stat { text-align: center; padding: 1.4rem .5rem; position: relative; }
.ds-stat + .ds-stat::before { content: ''; position: absolute; inset-inline-start: 0; top: 25%; height: 50%; width: 1px; background: var(--ds-border); }
.ds-stat .value { font-size: 1.85rem; font-weight: 900; background: var(--ds-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.3; }
.ds-stat .label { color: var(--ds-text-muted); font-size: .84rem; }

/* ---------------- badges / chips ---------------- */
.ds-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    background: var(--ds-surface-2); border: 1px solid var(--ds-border);
    color: var(--ds-text-2); border-radius: 999px;
    padding: .18rem .7rem; font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.7;
}
.ds-chip i { font-size: .7em; }
.ds-chip-primary { background: var(--ds-primary-soft); border-color: transparent; color: var(--ds-primary); }
.ds-chip-success { background: rgba(16, 185, 129, .13); border-color: transparent; color: #059669; }
.ds-chip-warning { background: rgba(245, 158, 11, .15); border-color: transparent; color: #b45309; }
.ds-chip-danger  { background: rgba(239, 68, 68, .12); border-color: transparent; color: #dc2626; }
[data-theme="dark"] .ds-chip-success { color: #34d399; }
[data-theme="dark"] .ds-chip-warning { color: #fbbf24; }
[data-theme="dark"] .ds-chip-danger { color: #f87171; }

.ds-match {
    font-weight: 800; font-size: .78rem; color: #059669;
    background: rgba(16, 185, 129, .13); border-radius: 999px; padding: .15rem .6rem;
}
[data-theme="dark"] .ds-match { color: #34d399; }

.badge { font-weight: 700; }

/* ---------------- project card ---------------- */
.ds-project-title { font-size: 1.02rem; font-weight: 800; margin-bottom: .4rem; display: block; color: var(--ds-text); line-height: 1.7; }
.ds-project-title:hover { color: var(--ds-primary); }
.ds-project-meta { display: flex; flex-wrap: wrap; gap: .8rem; color: var(--ds-text-muted); font-size: .78rem; }
.ds-price { font-weight: 800; color: #059669; }
[data-theme="dark"] .ds-price { color: #34d399; }

/* ---------------- product card ---------------- */
.ds-product-thumb {
    aspect-ratio: 16 / 10; width: 100%; object-fit: cover;
    border-radius: var(--ds-radius) var(--ds-radius) 0 0; background: var(--ds-surface-3);
    display: flex; align-items: center; justify-content: center; color: var(--ds-text-muted); font-size: 2rem;
}

/* ---------------- avatars ---------------- */
.ds-avatar {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    background: var(--ds-primary-soft); color: var(--ds-primary);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto;
    border: 1px solid transparent;
}
img.ds-avatar { border-color: var(--ds-border); }
.ds-avatar-lg { width: 88px; height: 88px; font-size: 1.7rem; }
.ds-avatar-sm { width: 32px; height: 32px; font-size: .8rem; }

/* ---------------- buttons ---------------- */
.btn { border-radius: var(--ds-radius-sm); font-weight: 700; padding: .55rem 1.15rem; transition: all .18s var(--ds-ease); }
.btn-sm { padding: .38rem .8rem; font-size: .82rem; border-radius: 10px; }
.btn-primary {
    background: var(--ds-gradient); border: 0; color: #fff;
    box-shadow: 0 8px 20px -10px var(--ds-primary-glow);
}
.btn-primary:hover, .btn-primary:focus { background: var(--ds-gradient); filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 12px 24px -10px var(--ds-primary-glow); color: #fff; }
.btn-primary:active { transform: none; }
.btn-primary:disabled { background: var(--ds-gradient); opacity: .55; }
.btn-outline-primary { color: var(--ds-primary); border-color: var(--ds-primary); background: transparent; }
.btn-outline-primary:hover { background: var(--ds-primary); border-color: var(--ds-primary); color: #fff; }
.btn-soft { background: var(--ds-primary-soft); color: var(--ds-primary); border: 0; }
.btn-soft:hover { background: var(--ds-primary); color: #fff; }
.btn-success { background: #10b981; border-color: #10b981; }
.btn-success:hover { background: #059669; border-color: #059669; }
.btn-danger { background: #ef4444; border-color: #ef4444; }
.btn-outline-danger { color: #ef4444; border-color: rgba(239, 68, 68, .5); }
.btn-outline-danger:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
.btn-outline-secondary { color: var(--ds-text-2); border-color: var(--ds-border-strong); }
.btn-outline-secondary:hover { background: var(--ds-surface-3); color: var(--ds-text); border-color: var(--ds-border-strong); }
.btn-check:checked + .btn-outline-secondary { background: var(--ds-primary); border-color: var(--ds-primary); color: #fff; }
.btn-link { font-weight: 600; }
.btn-light { background: #fff; color: #0f1629; border: 0; }

/* ---------------- forms ---------------- */
.form-control, .form-select {
    background: var(--ds-surface); border: 1px solid var(--ds-border-strong); color: var(--ds-text);
    border-radius: var(--ds-radius-sm); padding: .6rem .9rem; font-size: .9rem; transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm { padding: .4rem .7rem; font-size: .84rem; border-radius: 10px; }
.form-control:focus, .form-select:focus {
    background: var(--ds-surface); color: var(--ds-text);
    border-color: var(--ds-primary); box-shadow: 0 0 0 4px var(--ds-primary-soft);
}
.form-control::placeholder { color: var(--ds-text-muted); opacity: .8; }
.form-control:disabled, .form-select:disabled { background: var(--ds-surface-2); }
.form-label { font-weight: 700; font-size: .86rem; margin-bottom: .35rem; color: var(--ds-text-2); }
.form-text { font-size: .78rem; color: var(--ds-text-muted); }
.form-check-input { border-color: var(--ds-border-strong); background-color: var(--ds-surface); }
.form-check-input:checked { background-color: var(--ds-primary); border-color: var(--ds-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--ds-primary-soft); border-color: var(--ds-primary); }
.form-range::-webkit-slider-thumb { background: var(--ds-primary); }
.input-group-text { background: var(--ds-surface-2); border-color: var(--ds-border-strong); color: var(--ds-text-muted); border-radius: var(--ds-radius-sm); }
.is-invalid { border-color: #ef4444 !important; }
.invalid-feedback { font-size: .78rem; }
select.form-select { background-position: left .75rem center; padding-inline-start: 2rem; }

/* ---------------- tables ---------------- */
.table { color: var(--ds-text); border-color: var(--ds-border); vertical-align: middle; margin-bottom: 0; }
.table > :not(caption) > * > * { background: transparent; border-bottom-color: var(--ds-border); padding: .8rem .85rem; color: inherit; }
.table thead th { color: var(--ds-text-muted); font-weight: 700; font-size: .78rem; background: var(--ds-surface-2); letter-spacing: .01em; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table-hover > tbody > tr:hover > * { background: var(--ds-surface-2); color: inherit; }
.table-sm > :not(caption) > * > * { padding: .5rem .6rem; }
.table-responsive { border-radius: var(--ds-radius); }
.ds-card > .ds-card-body.p-0 > .table-responsive { border-radius: var(--ds-radius); overflow: hidden; }

/* ---------------- dashboard shell ---------------- */
.ds-shell { display: flex; min-height: calc(100vh - var(--ds-nav-h)); }
.ds-sidebar {
    width: 268px; flex: 0 0 268px; background: var(--ds-surface);
    border-inline-start: 1px solid var(--ds-border); padding: 1rem .8rem 2rem;
    position: sticky; top: var(--ds-nav-h); height: calc(100vh - var(--ds-nav-h)); overflow-y: auto;
}
.ds-sidebar .nav-link {
    color: var(--ds-text-2); border-radius: var(--ds-radius-sm);
    padding: .55rem .75rem; margin-bottom: .1rem; font-size: .87rem; font-weight: 600;
    display: flex; align-items: center; gap: .65rem; transition: all .15s var(--ds-ease); position: relative;
}
.ds-sidebar .nav-link i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ds-text-muted); background: var(--ds-surface-2); font-size: .8rem; flex: 0 0 auto; transition: all .15s; }
.ds-sidebar .nav-link:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.ds-sidebar .nav-link:hover i { color: var(--ds-primary); background: var(--ds-primary-soft); }
.ds-sidebar .nav-link.active { background: var(--ds-gradient); color: #fff; box-shadow: 0 8px 18px -10px var(--ds-primary-glow); }
.ds-sidebar .nav-link.active i { color: #fff; background: rgba(255, 255, 255, .18); }
.ds-sidebar .sidebar-heading {
    font-size: .68rem; color: var(--ds-text-muted); text-transform: uppercase;
    letter-spacing: .06em; margin: 1.1rem .75rem .45rem; font-weight: 800;
}
.ds-content { flex: 1 1 auto; padding: 1.75rem 2rem; min-width: 0; animation: ds-fade-up .35s var(--ds-ease); }
.ds-content > .d-flex:first-child h1 { font-size: 1.35rem; font-weight: 900; }

@media (max-width: 991.98px) {
    .ds-shell { flex-direction: column; }
    .ds-sidebar { position: static; width: 100%; flex: none; height: auto; border-inline-start: 0; border-bottom: 1px solid var(--ds-border); padding: .5rem .75rem; }
    .ds-sidebar .nav { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; gap: .25rem; padding-bottom: .25rem; }
    .ds-sidebar .nav-link { white-space: nowrap; margin: 0; }
    .ds-sidebar .sidebar-heading { display: none; }
    .ds-content { padding: 1rem; }
}

/* ---------------- stat cards ---------------- */
.ds-stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; position: relative; overflow: hidden; }
.ds-stat-card::after { content: ''; position: absolute; inset-inline-start: 0; top: 18%; height: 64%; width: 4px; border-radius: 0 4px 4px 0; background: var(--ds-gradient); }
.ds-stat-card .icon {
    width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
    background: var(--ds-primary-soft); color: var(--ds-primary); font-size: 1.15rem; flex: 0 0 auto;
}
.ds-stat-card .value { font-size: 1.35rem; font-weight: 900; line-height: 1.3; }
.ds-stat-card .label { font-size: .8rem; color: var(--ds-text-muted); }

/* ---------------- progress ---------------- */
.progress { background: var(--ds-surface-3); height: 8px; border-radius: 999px; overflow: hidden; }
.progress-bar { background: var(--ds-gradient); }

/* ---------------- timeline ---------------- */
.ds-timeline { position: relative; padding-inline-start: 1.6rem; }
.ds-timeline::before { content: ''; position: absolute; inset-inline-start: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--ds-border); }
.ds-timeline-item { position: relative; padding-bottom: 1.1rem; }
.ds-timeline-item::before {
    content: ''; position: absolute; inset-inline-start: -1.6rem; top: .45rem;
    width: 12px; height: 12px; border-radius: 50%; background: var(--ds-primary); border: 2px solid var(--ds-surface); box-shadow: 0 0 0 3px var(--ds-primary-soft);
}

/* ---------------- footer ---------------- */
.ds-footer { background: #0b1020; color: #cbd5e1; padding: 3.5rem 0 1.25rem; margin-top: 4rem; position: relative; overflow: hidden; }
.ds-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ds-gradient); }
.ds-footer h5 { color: #fff; font-size: .98rem; margin-bottom: 1rem; }
.ds-footer a { color: #cbd5e1; font-size: .87rem; display: block; padding: .22rem 0; transition: color .15s, transform .15s; }
.ds-footer a:hover { color: #67e8f9; transform: translateX(-3px); }
.ds-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2rem; padding-top: 1.1rem; font-size: .82rem; }

/* ---------------- alerts / empty ---------------- */
.alert { border: 1px solid transparent; border-radius: var(--ds-radius-sm); font-size: .88rem; }
.alert-primary { background: var(--ds-primary-soft); color: var(--ds-primary); border-color: rgba(91, 91, 246, .2); }
.alert-success { background: rgba(16, 185, 129, .12); color: #047857; border-color: rgba(16, 185, 129, .25); }
.alert-warning { background: rgba(245, 158, 11, .14); color: #92400e; border-color: rgba(245, 158, 11, .3); }
.alert-danger { background: rgba(239, 68, 68, .12); color: #b91c1c; border-color: rgba(239, 68, 68, .25); }
.alert-info { background: rgba(6, 182, 212, .12); color: #0e7490; border-color: rgba(6, 182, 212, .25); }
[data-theme="dark"] .alert-success { color: #6ee7b7; } [data-theme="dark"] .alert-warning { color: #fcd34d; } [data-theme="dark"] .alert-danger { color: #fca5a5; } [data-theme="dark"] .alert-info { color: #67e8f9; }
.ds-empty { text-align: center; padding: 3.2rem 1rem; color: var(--ds-text-muted); }
.ds-empty i { font-size: 2.8rem; opacity: .35; margin-bottom: .75rem; display: block; background: var(--ds-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .6; }

/* ---------------- toast ---------------- */
.ds-toast-wrap { position: fixed; top: 1rem; inset-inline-start: 1rem; z-index: 1080; display: grid; gap: .5rem; }
.ds-toast-wrap .alert { animation: ds-fade-up .3s var(--ds-ease); min-width: 260px; }

/* ---------------- misc ---------------- */
.ds-divider { height: 1px; background: var(--ds-border); margin: 1.25rem 0; }
.cursor-pointer { cursor: pointer; }
.ds-sticky-side { position: sticky; top: calc(var(--ds-nav-h) + 1rem); }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-truncate-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.min-w-0 { min-width: 0; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--ds-text-muted); }
.breadcrumb-item.active { color: var(--ds-text-muted); }
.border, .border-bottom, .border-top { border-color: var(--ds-border) !important; }
.bg-light { background: var(--ds-surface-2) !important; }
.bg-body { background: var(--ds-surface) !important; }

.ds-kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 1rem; overflow-x: auto; }
.ds-kanban-col { background: var(--ds-surface-2); border-radius: var(--ds-radius); padding: .75rem; min-height: 160px; }
.ds-kanban-col h6 { font-size: .82rem; color: var(--ds-text-muted); margin-bottom: .75rem; }
.ds-kanban-card { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm); padding: .7rem; margin-bottom: .6rem; font-size: .85rem; }
@media (max-width: 767.98px) { .ds-kanban { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }

.pagination { --bs-pagination-color: var(--ds-text-2); --bs-pagination-bg: var(--ds-surface); --bs-pagination-border-color: var(--ds-border); --bs-pagination-active-bg: var(--ds-primary); --bs-pagination-active-border-color: var(--ds-primary); --bs-pagination-hover-bg: var(--ds-primary-soft); --bs-pagination-hover-color: var(--ds-primary); --bs-pagination-disabled-bg: var(--ds-surface); --bs-pagination-disabled-border-color: var(--ds-border); --bs-pagination-disabled-color: var(--ds-text-muted); gap: .3rem; }
.pagination .page-link { border-radius: 10px !important; font-weight: 600; min-width: 40px; text-align: center; }

.dropdown-menu { background: var(--ds-surface); border-color: var(--ds-border); box-shadow: var(--ds-shadow-lg); border-radius: var(--ds-radius-sm); padding: .4rem; }
.dropdown-item { color: var(--ds-text); font-size: .88rem; border-radius: 8px; padding: .45rem .75rem; }
.dropdown-item:hover { background: var(--ds-primary-soft); color: var(--ds-primary); }
.dropdown-divider { border-color: var(--ds-border); }

.modal-content { background: var(--ds-surface); border-color: var(--ds-border); border-radius: var(--ds-radius); color: var(--ds-text); }
.nav-tabs { border-bottom-color: var(--ds-border); gap: .25rem; }
.nav-tabs .nav-link { color: var(--ds-text-muted); border: 0; border-bottom: 2px solid transparent; font-weight: 700; padding: .55rem .9rem; border-radius: 8px 8px 0 0; }
.nav-tabs .nav-link:hover { color: var(--ds-primary); background: var(--ds-primary-soft); }
.nav-tabs .nav-link.active { color: var(--ds-primary); background: transparent; border-bottom-color: var(--ds-primary); }
.nav-pills .nav-link { color: var(--ds-text-2); border-radius: 999px; font-weight: 600; }
.nav-pills .nav-link.active { background: var(--ds-gradient); }

.list-group-item { background: var(--ds-surface); border-color: var(--ds-border); color: var(--ds-text); }
.card { background: var(--ds-surface); border-color: var(--ds-border); border-radius: var(--ds-radius); color: var(--ds-text); }
.offcanvas { background: var(--ds-surface); color: var(--ds-text); }
.accordion-item { background: var(--ds-surface); border-color: var(--ds-border); }
.accordion-button { background: var(--ds-surface); color: var(--ds-text); font-weight: 700; }
.accordion-button:not(.collapsed) { background: var(--ds-primary-soft); color: var(--ds-primary); }
details > summary { cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }


/* Leading icons written with ms-* (margin-start) sit glued to the text in RTL; give them the trailing gap instead. */
i.ms-1:first-child:not(:last-child), i.ms-2:first-child:not(:last-child), i.ms-3:first-child:not(:last-child) { margin-inline-start: 0 !important; }
i.ms-1:first-child:not(:last-child) { margin-inline-end: .3rem !important; }
i.ms-2:first-child:not(:last-child) { margin-inline-end: .5rem !important; }
i.ms-3:first-child:not(:last-child) { margin-inline-end: .85rem !important; }

/* skeleton */
.ds-skeleton { background: linear-gradient(90deg, var(--ds-surface-2) 25%, var(--ds-surface-3) 50%, var(--ds-surface-2) 75%); background-size: 800px 100%; animation: ds-shimmer 1.4s infinite linear; border-radius: 8px; }

/* ---------------- god admin command center ---------------- */
.admin-command-hero, .team-command-hero {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    padding: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--ds-shadow-sm);
}
.admin-command-hero h1, .team-command-hero h1 {
    font-size: 1.35rem;
    line-height: 1.6;
    margin: .2rem 0;
}
.admin-command-hero p, .team-command-hero p { margin: 0; color: var(--ds-text-muted); font-size: .92rem; }
.admin-command-kicker, .team-command-hero > div > span:first-child {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: var(--ds-primary-soft);
    color: var(--ds-primary);
    font-size: .78rem;
    font-weight: 700;
    padding: .15rem .65rem;
}
.admin-command-quick {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}
.admin-command-quick a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 38px;
    padding: .45rem .75rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-text);
    background: var(--ds-surface-2);
    font-size: .84rem;
    font-weight: 700;
}
.admin-command-quick a:hover { border-color: var(--ds-primary); color: var(--ds-primary); }
.admin-metric-grid, .admin-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.admin-metric, .admin-action {
    color: var(--ds-text);
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-sm);
    text-decoration: none;
}
.admin-metric {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 1rem;
    min-height: 112px;
}
.admin-metric:hover, .admin-action:hover { border-color: var(--ds-primary); color: var(--ds-text); transform: translateY(-1px); }
.admin-metric-icon, .admin-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--ds-primary-soft);
    color: var(--ds-primary);
    flex: 0 0 auto;
}
.admin-metric-body { display: grid; gap: .1rem; min-width: 0; }
.admin-metric-body strong { font-size: 1.15rem; line-height: 1.5; }
.admin-metric-body b { font-size: .9rem; line-height: 1.5; }
.admin-metric-body small { color: var(--ds-text-muted); font-size: .78rem; line-height: 1.6; }
.admin-action {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    min-height: 104px;
    position: relative;
}
.admin-action-copy { display: grid; gap: .2rem; min-width: 0; }
.admin-action-copy strong { font-size: .92rem; line-height: 1.6; }
.admin-action-copy small { color: var(--ds-text-muted); font-size: .8rem; line-height: 1.7; }
.admin-action-badge {
    min-width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--ds-danger, #ef4444);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    margin-inline-start: auto;
}
.admin-tone-danger .admin-metric-icon, .admin-tone-danger .admin-action-icon { background: rgba(239, 68, 68, .1); color: #ef4444; }
.admin-tone-warning .admin-metric-icon, .admin-tone-warning .admin-action-icon { background: rgba(245, 158, 11, .14); color: #b45309; }
.admin-tone-success .admin-metric-icon, .admin-tone-success .admin-action-icon { background: rgba(16, 185, 129, .12); color: #059669; }
.admin-tone-info .admin-metric-icon, .admin-tone-info .admin-action-icon { background: rgba(6, 182, 212, .12); color: #0891b2; }
.admin-command-panel {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-sm);
    padding: 1rem;
}
.admin-command-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.admin-command-panel-head h2 { font-size: .98rem; margin: 0 0 .25rem; }
.admin-command-panel-head p { margin: 0; color: var(--ds-text-muted); font-size: .82rem; }
.admin-command-table th, .admin-command-table td { font-size: .84rem; white-space: nowrap; }
.admin-empty-state {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 68px;
    color: var(--ds-text-muted);
    background: var(--ds-surface-2);
    border-radius: var(--ds-radius-sm);
    padding: 1rem;
    font-size: .88rem;
}

/* ---------------- registration ---------------- */
.auth-form-head { margin-bottom: 1.25rem; }
.register-form { display: grid; gap: 1rem; }
.register-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}
.register-type-card {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-surface);
    min-height: 136px;
    padding: .95rem;
    cursor: pointer;
    display: grid;
    gap: .35rem;
    align-content: start;
}
.register-type-card i { color: var(--ds-primary); font-size: 1.1rem; }
.register-type-card strong { font-size: .9rem; }
.register-type-card span { color: var(--ds-text-muted); font-size: .78rem; line-height: 1.75; }
.btn-check:checked + .register-type-card {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 .18rem var(--ds-primary-soft);
}
.register-section {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-surface);
    padding: 1rem;
}
.register-section[hidden] { display: none !important; }
.register-section-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--ds-text);
    font-weight: 800;
    margin-bottom: 1rem;
}
.register-section-title i { color: var(--ds-primary); }

/* ---------------- chat and calls ---------------- */
.ds-chat-policy {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #f1f5f9;
    color: #ef4444;
    border: 1px solid #e2e8f0;
    border-radius: var(--ds-radius-sm);
    padding: .75rem 1rem;
    font-weight: 800;
    font-size: .88rem;
    line-height: 1.9;
}
.ds-chat-policy i { flex: 0 0 auto; }
.ds-call-message {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
    padding: .75rem;
    background: var(--ds-surface-2);
    border-radius: var(--ds-radius-sm);
}
.ds-call-message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ds-primary);
    color: #fff;
    flex: 0 0 auto;
}
.call-room-shell {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
}
.call-room-main {
    width: min(920px, 100%);
    background: #0f172a;
    color: #fff;
    border-radius: var(--ds-radius);
    padding: 1rem;
    box-shadow: var(--ds-shadow-lg);
}
.call-room-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
    font-size: .86rem;
}
.call-room-status span { display: inline-flex; align-items: center; gap: .5rem; }
.call-room-stage {
    min-height: 420px;
    background: #111827;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--ds-radius-sm);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}
.call-room-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    inset: 0;
}
.call-room-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: .55rem;
    text-align: center;
}
.call-room-avatar i {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ds-primary);
    font-size: 1.6rem;
}
.call-room-avatar small { color: #cbd5e1; }
.call-room-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

/* ---------------- team workspace ---------------- */
.team-list-row, .team-project-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid var(--ds-border);
    padding: .75rem 0;
}
.team-list-row:last-child, .team-project-mini:last-child { border-bottom: 0; }
.team-list-row strong, .team-project-mini strong { display: block; font-size: .88rem; line-height: 1.6; }
.team-list-row small, .team-project-mini small { color: var(--ds-text-muted); font-size: .78rem; line-height: 1.6; }
.team-activity-item {
    background: var(--ds-surface-2);
    border-radius: var(--ds-radius-sm);
    padding: .75rem;
}
.team-activity-item strong { display: block; font-size: .86rem; line-height: 1.7; }
.team-activity-item span { color: var(--ds-text-muted); font-size: .76rem; }
.team-kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1rem;
    overflow-x: auto;
}
.team-kanban-column { min-width: 220px; }
.team-task-card, .team-chat-message {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-surface);
    padding: .75rem;
}
.team-task-card strong, .team-chat-message strong { font-size: .88rem; line-height: 1.7; }
.team-task-card small { display: block; color: var(--ds-text-muted); font-size: .78rem; margin-top: .2rem; }
.team-chat-message.is-mine { background: var(--ds-primary-soft); border-color: rgba(79, 70, 229, .22); }

@media (max-width: 1199.98px) {
    .admin-metric-grid, .admin-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-kanban-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

@media (max-width: 767.98px) {
    .admin-command-hero, .team-command-hero { align-items: stretch; flex-direction: column; }
    .admin-command-quick { justify-content: flex-start; }
    .admin-metric-grid, .admin-action-grid, .register-type-grid { grid-template-columns: 1fr; }
    .admin-command-table th, .admin-command-table td { font-size: .8rem; }
    .ds-chat-policy { align-items: flex-start; font-size: .82rem; }
    .call-room-stage { min-height: 300px; }
    .team-kanban-grid { grid-template-columns: repeat(4, minmax(210px, 1fr)); }
}
