/* ==========================================================================
   OpsBuild Labs — demo app · design system
   ========================================================================== */

:root {
    --bg: #f6f7fb;
    --bg-card: #ffffff;
    --bg-subtle: #f9fafc;
    --bg-hover: #f3f5f9;
    --border: #e6e8ef;
    --border-strong: #d5d9e3;
    --text: #0f172a;
    --text-2: #334155;
    --text-muted: #64748b;
    --text-faint: #94a3b8;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-ring: rgba(79, 70, 229, .22);

    --ok: #059669;      --ok-soft: #ecfdf5;
    --warn: #d97706;    --warn-soft: #fffbeb;
    --danger: #dc2626;  --danger-soft: #fef2f2;
    --info: #2563eb;    --info-soft: #eff6ff;

    --side-bg: #0b1020;
    --side-text: #9aa3b8;
    --side-hover: rgba(255,255,255,.05);
    --side-active: rgba(99,102,241,.16);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
    --shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
    --shadow-lg: 0 24px 64px rgba(15,23,42,.18), 0 8px 24px rgba(15,23,42,.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --ease: cubic-bezier(.2,.8,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 13.5px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01", "tnum";
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    background: var(--bg-hover);
    color: var(--text-2);
    padding: 2px 6px;
    border-radius: 6px;
}
h1, h2, h3 { letter-spacing: -.01em; }

.dm-muted { color: var(--text-muted); }
.dm-small { font-size: 12px; }
.dm-strong { font-weight: 600; color: var(--text); }
.dm-nowrap { white-space: nowrap; }
.dm-center { text-align: center; }
.dm-warn { color: var(--warn); font-weight: 600; }
.dm-danger { color: var(--danger); }
.dm-link { color: var(--primary); font-weight: 500; }
.dm-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dm-lead { margin-bottom: 20px; color: var(--text-muted); max-width: 760px; }

/* ---------- Layout ---------- */
.dm-layout { display: flex; min-height: 100vh; }

.dm-sidenav {
    width: 248px;
    flex-shrink: 0;
    background: var(--side-bg);
    color: var(--side-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    background-image:
        radial-gradient(600px 300px at -20% -10%, rgba(99,102,241,.25), transparent 60%),
        radial-gradient(400px 300px at 120% 110%, rgba(14,165,233,.12), transparent 60%);
}
.dm-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 20px 18px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    letter-spacing: -.01em;
}
.dm-brand-center { justify-content: center; color: var(--text); padding: 0 0 10px; }
.dm-brand-mark {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.dm-menu { display: flex; flex-direction: column; padding: 4px 12px; gap: 2px; flex: 1; }
.dm-menu-label {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
    color: #5b6478; padding: 18px 12px 6px;
}
.dm-menu a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    font-weight: 500;
    color: var(--side-text);
    position: relative;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.dm-menu a:hover { background: var(--side-hover); color: #e5e9f2; }
.dm-menu a.active { background: var(--side-active); color: #fff; }
.dm-menu a.active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: linear-gradient(#818cf8, #a78bfa);
}
.dm-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.dm-menu a.active svg { opacity: 1; color: #a5b4fc; }
.dm-sidenav-foot { padding: 14px 16px 18px; }
.dm-sidenav .dm-badge-muted {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.06); color: #aab3c7;
    border: 1px solid rgba(255,255,255,.08);
    padding: 5px 10px; font-weight: 500;
}
.dm-sidenav .dm-badge-muted::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); }

.dm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-topbar {
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    background: rgba(255,255,255,.8);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.dm-breadcrumbs { color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.dm-breadcrumbs a { color: var(--text-muted); }
.dm-breadcrumbs a:hover { color: var(--text); }
.dm-user { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--text-2); }
.dm-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #e0e7ff); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    box-shadow: inset 0 0 0 1px rgba(79,70,229,.15);
}
.dm-content { padding: 28px 32px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }
