/* ============================================================
   Kored Team — Obsidian Gray design system
   Sober, Swift-inspired, dark-first
   ============================================================ */

:root {
    /* bases */
    --bg-base: #1b1b1b;
    --bg-canvas: #202020;
    --bg-surface: #262626;
    --bg-elevated: #2d2d2d;
    --bg-overlay: #333333;
    --bg-input: #1a1a1a;

    /* borders */
    --border: #2f2f2f;
    --border-strong: #3d3d3d;
    --border-focus: #5057d9;

    /* ink */
    --ink: #e6e6e6;
    --ink-2: #b4b4b4;
    --ink-muted: #7a7a7a;
    --ink-faint: #525252;

    /* accents */
    --accent: #7c82f0;          /* obsidian indigo */
    --accent-hover: #9298ff;
    --accent-dim: rgba(124,130,240,.14);
    --accent-ring: rgba(124,130,240,.35);

    --ok: #4ade80;
    --ok-dim: rgba(74,222,128,.14);
    --warn: #fbbf24;
    --warn-dim: rgba(251,191,36,.14);
    --danger: #ef4444;
    --danger-dim: rgba(239,68,68,.14);
    --info: #60a5fa;
    --info-dim: rgba(96,165,250,.14);

    /* sticky-note colors (vivid against gray) */
    --note-yellow:  #f4d35e;
    --note-pink:    #f49ac2;
    --note-blue:    #91c4f2;
    --note-green:   #9bd4a3;
    --note-gray:    #c8c8c8;
    --note-orange:  #f0a35e;
    --note-purple:  #c7a2f0;

    /* type */
    --fsf: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, Segoe UI, Roboto, sans-serif;
    --fsm: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

    /* motion */
    --tr-fast: 120ms cubic-bezier(.4,0,.2,1);
    --tr: 200ms cubic-bezier(.4,0,.2,1);
    --tr-slow: 320ms cubic-bezier(.4,0,.2,1);

    /* radii & shadow */
    --r-sm: 6px;
    --r: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow:    0 4px 14px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
    --shadow-sticky: 0 10px 24px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.2);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--ink);
    font-family: var(--fsf);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--tr-fast);
}
a:hover { color: var(--accent-hover); }

code, pre, .mono {
    font-family: var(--fsm);
    font-size: .92em;
}
pre {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1rem;
    overflow: auto;
    font-size: .82rem;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    letter-spacing: -.01em;
    margin: 0 0 .6rem;
    font-weight: 600;
}
h1 { font-size: 1.65rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .98rem; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.4rem 0;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============== LAYOUT ============== */

.app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

aside.sidebar {
    background: var(--bg-canvas);
    border-right: 1px solid var(--border);
    padding: 1rem .9rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .3rem 1.1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .8rem;
}
.sidebar .brand .logo {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent), #5057d9);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 2px 6px rgba(80,87,217,.3);
}
.sidebar .brand .name { font-weight: 600; letter-spacing: -.01em; font-size: 1rem; }
.sidebar .brand .sub { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }

.navgroup {
    margin-top: 1rem;
}
.navgroup .label {
    font-size: .66rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 0 .5rem;
    margin-bottom: .3rem;
}
.navgroup a.navlink {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .55rem;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: .88rem;
    transition: background var(--tr-fast), color var(--tr-fast);
    position: relative;
}
.navgroup a.navlink:hover { background: var(--bg-surface); color: var(--ink); }
.navgroup a.navlink.active {
    background: var(--accent-dim);
    color: var(--ink);
}
.navgroup a.navlink.active::before {
    content: '';
    position: absolute;
    left: -.9rem; top: 15%;
    width: 3px; height: 70%;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}
.navgroup a.navlink .ico { width: 16px; height: 16px; opacity: .85; flex: 0 0 16px; }
.navgroup a.navlink .count {
    margin-left: auto;
    font-size: .66rem;
    background: var(--bg-surface);
    color: var(--ink-2);
    padding: 2px 6px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.navgroup a.navlink.active .count { background: var(--accent); color: #fff; }

/* MAIN */

main.main {
    padding: 1.6rem 2rem 4rem;
    max-width: 1600px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.topbar .crumb {
    font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--ink-muted);
}
.topbar .title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; }
.topbar .spacer { flex: 1; }
.topbar .right { display: flex; gap: .5rem; align-items: center; }

/* ============== CARDS ============== */

.card {
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.card.hover:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.card h2 {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .9rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--border);
}

.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2,1fr);} .grid.cols-3 {grid-template-columns: repeat(2,1fr);} }
@media (max-width: 700px)  { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.stat {
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1rem 1.1rem;
    display: flex; flex-direction: column;
    gap: .3rem;
    transition: transform var(--tr), border-color var(--tr);
}
.stat:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.stat .lbl { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-muted); }
.stat .val { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .val.ok { color: var(--ok); }
.stat .val.warn { color: var(--warn); }
.stat .val.danger { color: var(--danger); }
.stat .sub { font-size: .75rem; color: var(--ink-muted); }

/* ============== BUTTONS ============== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--fsf);
    font-size: .84rem;
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--ink);
    cursor: pointer;
    transition: all var(--tr-fast);
    text-decoration: none;
    line-height: 1;
}
.btn:hover { background: var(--bg-elevated); border-color: #555; }
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-2);
}
.btn.ghost:hover { background: var(--bg-surface); color: var(--ink); }
.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn.danger:hover { background: #ff6b6b; }
.btn.outline { background: transparent; }
.btn.outline:hover { background: var(--bg-surface); }
.btn.sm { font-size: .74rem; padding: .35rem .65rem; }
.btn.xs { font-size: .68rem; padding: .22rem .5rem; }
.btn.block { width: 100%; justify-content: center; }

/* ============== FORMS ============== */

label {
    display: block;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: .35rem;
}
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=datetime-local], input[type=tel],
textarea, select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .55rem .75rem;
    color: var(--ink);
    font-family: var(--fsf);
    font-size: .9rem;
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea { min-height: 140px; resize: vertical; font-family: var(--fsm); font-size: .86rem; }

.row { margin-bottom: 1rem; }
.row.two, .row.three {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}
.row.two { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) { .row.two, .row.three { grid-template-columns: 1fr; } }

/* ============== TABLES ============== */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
thead th {
    text-align: left;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 600;
    padding: .55rem .7rem;
    border-bottom: 1px solid var(--border);
}
tbody td {
    padding: .65rem .7rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr { transition: background var(--tr-fast); }
tbody tr:hover { background: var(--bg-surface); }
tbody tr:last-child td { border-bottom: none; }

/* ============== PILLS / BADGES ============== */

.pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    background: var(--bg-surface);
    color: var(--ink-2);
    border: 1px solid var(--border);
    line-height: 1;
}
.pill.ok { background: var(--ok-dim); color: var(--ok); border-color: rgba(74,222,128,.3); }
.pill.warn { background: var(--warn-dim); color: var(--warn); border-color: rgba(251,191,36,.3); }
.pill.danger { background: var(--danger-dim); color: var(--danger); border-color: rgba(239,68,68,.3); }
.pill.info { background: var(--info-dim); color: var(--info); border-color: rgba(96,165,250,.3); }
.pill.accent { background: var(--accent-dim); color: var(--accent); border-color: rgba(124,130,240,.3); }
.pill.dot::before {
    content: ''; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    margin-right: .2rem;
}

/* ============== STICKY NOTES ============== */

.sticky-board {
    position: relative;
    min-height: 420px;
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    background-image:
        radial-gradient(circle, #2a2a2a 1px, transparent 1px);
    background-size: 22px 22px;
}
.sticky {
    position: absolute;
    width: 220px; min-height: 160px;
    padding: 1.3rem 1rem .9rem;
    background: var(--note-yellow);
    color: #1a1510;
    font-size: .82rem;
    line-height: 1.45;
    box-shadow: var(--shadow-sticky);
    cursor: grab;
    user-select: none;
    border-radius: 2px;
    transition: transform var(--tr), box-shadow var(--tr);
    font-family: 'Caveat', 'Comic Neue', var(--fsf);
}
.sticky:hover {
    box-shadow: 0 14px 32px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.3);
    z-index: 100 !important;
}
.sticky:active { cursor: grabbing; }
.sticky[data-color="pink"]   { background: var(--note-pink); }
.sticky[data-color="blue"]   { background: var(--note-blue); }
.sticky[data-color="green"]  { background: var(--note-green); }
.sticky[data-color="gray"]   { background: var(--note-gray); }
.sticky[data-color="orange"] { background: var(--note-orange); }
.sticky[data-color="purple"] { background: var(--note-purple); }
.sticky .meta {
    font-family: var(--fsm);
    font-size: .62rem;
    opacity: .45;
    position: absolute;
    bottom: 6px;
    right: 10px;
}
.sticky .delete {
    position: absolute;
    top: 4px; right: 6px;
    background: none; border: 0;
    color: rgba(0,0,0,.35);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0;
    transition: opacity var(--tr-fast);
}
.sticky:hover .delete { opacity: 1; }

@keyframes sticky-pop {
    0%   { transform: scale(.6) rotate(-6deg); opacity: 0; }
    50%  { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.sticky.new { animation: sticky-pop .32s cubic-bezier(.34,1.56,.64,1); }

/* ============== ANIMATIONS ============== */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up .3s var(--tr) both; }

@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: .55; }
}
.pulse { animation: pulse 1.8s ease-in-out infinite; }

@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin { animation: spin .9s linear infinite; }

@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.slide-in-right { animation: slide-in-right .3s var(--tr) both; }

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}
.shake { animation: shake .4s both; }

/* ============== LOGIN ============== */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: var(--bg-base);
    position: relative;
    overflow: hidden;
}
.auth-wrap::before {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(circle at 20% 20%, rgba(124,130,240,.12), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(80,87,217,.1), transparent 40%);
    pointer-events: none;
}
.auth-card {
    width: 360px;
    max-width: 100%;
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 2rem 1.6rem 1.6rem;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
    animation: fade-up .4s;
}
.auth-card .logo-row {
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: 1.4rem;
}
.auth-card .logo {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), #5057d9);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
}
.auth-card h1 {
    font-size: 1.1rem;
    margin-bottom: .3rem;
}
.auth-card .sub {
    font-size: .72rem;
    color: var(--ink-muted);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}
.auth-card .err {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: var(--r-sm);
    padding: .55rem .75rem;
    font-size: .82rem;
    margin-bottom: 1rem;
}

/* ============== TOAST / FLASH ============== */
.toast-wrap { position: fixed; top: 1rem; right: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--ink);
         padding: .7rem 1rem; border-radius: var(--r-sm); box-shadow: var(--shadow); animation: slide-in-right .3s;
         min-width: 240px; }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--danger); }

/* ============== EMPTY STATE ============== */
.empty {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--ink-muted);
    font-size: .9rem;
}
.empty .big-icon {
    font-size: 2.2rem;
    opacity: .4;
    margin-bottom: .6rem;
}

/* ============== MARKDOWN CONTENT ============== */
.md { font-size: .92rem; }
.md h1, .md h2, .md h3 { margin: 1.2rem 0 .5rem; }
.md h1 { font-size: 1.3rem; }
.md h2 { font-size: 1.1rem; }
.md h3 { font-size: 1rem; }
.md p { margin: 0 0 .9rem; }
.md ul, .md ol { padding-left: 1.3rem; margin-bottom: .9rem; }
.md code { background: var(--bg-input); padding: 2px 6px; border-radius: 4px; }
.md pre code { background: transparent; padding: 0; }
.md a { color: var(--accent); border-bottom: 1px dashed var(--accent-dim); }
.md blockquote { border-left: 3px solid var(--border-strong); padding: .3rem .9rem; color: var(--ink-2); margin: 0 0 .9rem; }
.md table { font-size: .86rem; margin-bottom: 1rem; }

/* ============== UTILITIES ============== */
.flex { display: flex; }
.flex.wrap { flex-wrap: wrap; }
.flex.center { align-items: center; justify-content: center; }
.flex.between { align-items: center; justify-content: space-between; }
.flex.gap { gap: .5rem; }
.flex.gap-lg { gap: 1rem; }

.text-mut { color: var(--ink-muted); }
.text-ink2 { color: var(--ink-2); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-sm { font-size: .78rem; }
.text-xs { font-size: .7rem; }
.text-mono { font-family: var(--fsm); }

.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.mt-lg { margin-top: 1.6rem; }
.mb-lg { margin-bottom: 1.6rem; }

/* ============== ICON ============== */
.icon { width: 1em; height: 1em; vertical-align: -.1em; fill: currentColor; }
.icon.lg { width: 1.3em; height: 1.3em; }

/* ============== MOBILE ============== */
@media (max-width: 820px) {
    .app { grid-template-columns: 1fr; }
    aside.sidebar {
        position: fixed; z-index: 50;
        width: 260px; left: -280px;
        transition: left var(--tr);
    }
    aside.sidebar.open { left: 0; }
    main.main { padding: 1rem 1rem 4rem; }
    .mobile-menu-btn { display: inline-flex !important; }
}
.mobile-menu-btn { display: none; }

/* ============================================================
   PARTNERS — colored cards, avatars, hover-lift
   ============================================================ */

.partner-card {
    display: block;
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-left: 3px solid hsl(var(--pc-hue, 240) 55% 55%);
    border-radius: var(--r);
    padding: 1rem 1.1rem;
    color: var(--ink);
    text-decoration: none;
    transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr), background var(--tr);
    position: relative;
    overflow: hidden;
}
.partner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, hsl(var(--pc-hue, 240) 60% 55% / .08), transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--tr);
}
.partner-card:hover {
    transform: translateY(-2px);
    border-color: hsl(var(--pc-hue, 240) 55% 55% / .5);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.partner-card:hover::before { opacity: 1; }

.pc-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .7rem;
}
.pc-avatar {
    width: 44px; height: 44px;
    flex: 0 0 44px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.02em;
    box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.1) inset;
}
.pc-avatar.lg {
    width: 56px; height: 56px;
    flex: 0 0 56px;
    border-radius: 13px;
    font-size: 1.4rem;
}
.pc-ident { min-width: 0; }
.pc-name {
    font-weight: 600;
    font-size: .98rem;
    letter-spacing: -.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc-company {
    font-size: .76rem;
    color: var(--ink-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.pc-ownership {
    font-size: .8rem;
    color: var(--ink-2);
    padding: .4rem .55rem;
    background: var(--bg-surface);
    border-radius: var(--r-sm);
    margin-bottom: .55rem;
}
.pc-foot {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border);
    font-size: .75rem;
}
.pc-attn {
    margin-top: .35rem;
    font-size: .72rem;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.mini-avatar {
    display: inline-flex;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5057d9);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    letter-spacing: -.02em;
}

/* ============================================================
   TIMELINE — comm_log vertical line with per-channel dots
   ============================================================ */

.timeline {
    position: relative;
    margin-left: .5rem;
    padding-left: 1.4rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--border-strong), var(--border));
    border-radius: 1px;
}
.tl-item {
    position: relative;
    padding: .55rem 0 1rem;
}
.tl-item:last-child { padding-bottom: .25rem; }
.tl-dot {
    position: absolute;
    left: -1.4rem;
    top: .7rem;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-2);
    font-size: .66rem;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-canvas);
    transition: border-color var(--tr), color var(--tr);
}
.tl-dot[data-channel="whatsapp"] { color: #25d366; border-color: rgba(37,211,102,.5); }
.tl-dot[data-channel="email"]    { color: var(--info); border-color: rgba(96,165,250,.5); }
.tl-dot[data-channel="call"]     { color: var(--accent); border-color: var(--accent-ring); }
.tl-dot[data-channel="meeting"]  { color: var(--warn); border-color: rgba(251,191,36,.5); }
.tl-dot[data-channel="telegram"] { color: #29b6f6; border-color: rgba(41,182,246,.5); }
.tl-dot[data-channel="slack"]    { color: #e01e5a; border-color: rgba(224,30,90,.5); }
.tl-dot[data-channel="discord"]  { color: #5865f2; border-color: rgba(88,101,242,.5); }
.tl-dot[data-channel="in-person"]{ color: var(--ok); border-color: rgba(74,222,128,.5); }
.tl-dot[data-dir="inbound"]      { background: var(--warn-dim); }
.tl-dot[data-dir="outbound"]     { background: var(--accent-dim); }
.tl-dot .icon { width: .78rem; height: .78rem; }

.tl-body {
    background: var(--bg-canvas);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .6rem .8rem;
    transition: border-color var(--tr-fast), background var(--tr-fast);
}
.tl-body:hover { border-color: var(--border-strong); background: var(--bg-surface); }

.dir-arrow { font-weight: 700; margin-right: .25rem; }
.dir-arrow.in  { color: var(--warn); }
.dir-arrow.out { color: var(--accent); }

/* ============================================================
   FIXES — overdue dot, danger-tint, file-drop, source block
   ============================================================ */

.pulse-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(239,68,68,.7);
    animation: pulse-dot 1.6s infinite cubic-bezier(.4,0,.6,1);
    margin-right: .4rem;
    vertical-align: baseline;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.danger-tint { background: rgba(239,68,68,.07) !important; }
.danger-tint > td:first-child { border-left: 3px solid var(--danger); }

.fix-table tbody tr { transition: background var(--tr-fast); }
.fix-table .pill { font-size: .62rem; padding: .14rem .45rem; }

.file-drop {
    position: relative;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--r);
    padding: 1.4rem 1rem;
    background: var(--bg-input);
    transition: border-color var(--tr-fast), background var(--tr-fast);
}
.file-drop:hover,
.file-drop:has(input:focus) { border-color: var(--accent); background: var(--bg-surface); }
.file-drop input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-drop-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    pointer-events: none;
}
.file-drop:has(input:not(:placeholder-shown)) .file-drop-info,
.file-drop:has(input[type=file]:valid) .file-drop-info { opacity: 1; }
.file-drop-name:not(:empty) {
    padding: .25rem .55rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-ring);
    border-radius: var(--r-sm);
}

.source-block {
    max-height: 480px;
    overflow: auto;
    font-size: .78rem;
    background: #141414;
    border-left: 3px solid var(--accent);
    padding: 1rem 1.2rem;
    color: #d6d6d6;
    white-space: pre-wrap;
    word-break: break-word;
}

