/* ============================================================
   Project Tracker — refined UI
   Palette: deep ink + indigo/violet gradient + warm neutrals
   ============================================================ */

:root {
    --ink-900:#0b0f1c;
    --ink-800:#111729;
    --ink-700:#1a2038;
    --ink-500:#3a415a;
    --ink-400:#545b76;
    --ink-300:#7e859b;
    --ink-200:#c4c9d6;
    --line:#e6e8f0;
    --line-soft:#eef0f5;
    --paper:#ffffff;
    --bg:#f6f7fb;
    --bg-soft:#fbfbfd;

    --accent:#c42127;       /* Celebrate Festival crimson */
    --accent-2:#e4a72c;     /* warm gold */
    --accent-soft:#fdecec;
    --accent-ink:#7a1a1f;
    --cream:#fdf6ec;
    --cream-ink:#7a5a1a;

    --green:#10b981; --green-soft:#dcfce7; --green-ink:#047857;
    --amber:#f59e0b; --amber-soft:#fef3c7; --amber-ink:#a16207;
    --rose:#ef4444;  --rose-soft:#fee2e2;  --rose-ink:#b91c1c;
    --sky:#0ea5e9;   --sky-soft:#e0f2fe;   --sky-ink:#0369a1;

    --shadow-sm: 0 1px 2px rgba(17,23,41,.04), 0 1px 3px rgba(17,23,41,.05);
    --shadow-md: 0 4px 12px rgba(17,23,41,.06), 0 2px 4px rgba(17,23,41,.04);
    --shadow-lg: 0 20px 50px rgba(17,23,41,.12), 0 8px 20px rgba(17,23,41,.06);
    --shadow-pop: 0 10px 30px rgba(196,33,39,.30);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin:0; padding:0; }
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11","ss01","ss03";
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-800);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
/* Enforce 15px minimum everywhere */
.tiny, .muted.tiny, small, code, .nav a, .user-name, .user-role,
.brand-sub, .nav-section-label, .crumb, .kbd, .stat-label, .stat-hint,
.pill, .cal-tag, .table th, .feed-time, .feed-body, .comment-body,
.filters select, .form label, .form input, .form textarea, .form select,
.comment-form textarea, .login-card .sub, .search input,
.card-head .link, .link, .feature-desc, .feature-title, .cal-card-title,
.cal-card-meta, .cal-day-num, .hashtag, .attachment-meta, .cal-media-meta,
.deadlines a, .doc-list a, .kv, .kv dt, .kv dd,
.login-bullets li, .login-quote, .login-demo, .greet,
.flash, .btn, .btn-sm, .timeline li, .timeline li strong, .timeline li time,
.empty { font-size: 15px !important; }

/* Keep headings visibly larger */
h1 { font-size: 26px !important; }
h2 { font-size: 17px !important; }
h3 { font-size: 15px !important; }

h1,h2,h3,h4 { margin:0 0 6px; font-weight:600; color:var(--ink-900); letter-spacing:-0.01em; }
h1 { font-size: 26px; letter-spacing:-0.02em; }
h2 { font-size: 15px; font-weight:600; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing:0.06em; color:var(--ink-400); font-weight:600; margin-top:20px; }
p  { margin: 0 0 10px; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
code { background: var(--accent-soft); color: var(--accent-ink); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: var(--ink-900); color: #e6e9ef; padding: 16px 18px; border-radius: var(--r-md); overflow-x: auto; font-size: 12.5px; }
pre code { background: transparent; color: inherit; padding: 0; }
.muted { color: var(--ink-300); }
.tiny { font-size: 11.5px; }
.hidden { display: none; }
.inline { display: inline; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 244px; flex-shrink: 0;
    background: var(--ink-900);
    background-image: radial-gradient(1200px 400px at -10% -10%, rgba(196,33,39,.18), transparent 60%),
                      radial-gradient(800px 300px at 110% 110%, rgba(228,167,44,.14), transparent 60%);
    color: #c7cbd6;
    padding: 22px 14px 18px;
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh;
    border-right: 1px solid rgba(255,255,255,.04);
    overflow: hidden;   /* clip anything (e.g. logo img) that tries to bleed out */
    box-sizing: border-box;
}
.sidebar * { max-width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.brand-logo { display: block; padding: 2px 4px; line-height: 0; width: 100%; }
.sidebar .brand-logo img {
    display: block !important;
    width: 150px !important;
    height: auto !important;
    max-width: 100% !important;
}
.login-side .brand-logo {
    display: block; width: 220px; max-width: 60%;
}
.login-side .brand-logo img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: white; display: grid; place-items: center;
    box-shadow: 0 8px 20px rgba(196,33,39,.45), inset 0 1px 0 rgba(255,255,255,.15);
}
.brand-mark svg { width:18px; height:18px; }
.brand-name { color: #fff; font-weight: 600; font-size: 14px; letter-spacing:-0.01em; }
.brand-sub  { color: #6f7594; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

.nav-section-label {
    color: #515876; font-size: 10.5px; letter-spacing: .12em;
    text-transform: uppercase; font-weight: 600;
    padding: 0 12px 6px;
}
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 9px;
    color: #aab0bf; font-size: 13.2px; font-weight: 500;
    transition: background .14s ease, color .14s ease;
    position: relative;
}
.nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav a.active {
    background: linear-gradient(180deg, rgba(196,33,39,.22), rgba(228,167,44,.14));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.nav a.active::before {
    content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.nav-ico { width: 18px; height: 18px; opacity: .8; display:inline-grid; place-items:center; }
.nav-ico svg { width: 16px; height: 16px; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.workspace-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    padding: 12px; border-radius: 12px;
    display: flex; align-items: center; gap: 10px; color: #c7cbd6;
}
.workspace-card .dot { width:8px; height:8px; border-radius:50%; background: var(--green); box-shadow:0 0 0 3px rgba(16,185,129,.2); }
.workspace-card small { color:#7f869c; display:block; font-size:11px; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 0 32px 56px; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0 16px;
    margin-bottom: 22px;
    gap: 20px;
    border-bottom: 1px solid var(--line-soft);
}
.crumb {
    font-size: 12.5px; color: var(--ink-300); font-weight: 500;
    display: flex; align-items: center; gap: 6px;
}
.crumb strong { color: var(--ink-800); font-weight:600; }
.search {
    flex: 1; max-width: 420px; margin-left: 10px;
    position: relative;
}
.search input {
    width: 100%; padding: 9px 12px 9px 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font-size: 13px; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(196,33,39,.14); }
.search svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); width:16px; height:16px; color: var(--ink-300); }
.kbd { position:absolute; right:8px; top:50%; transform:translateY(-50%); font-size:11px; color: var(--ink-300); border:1px solid var(--line); padding: 1px 6px; border-radius: 5px; background: var(--bg-soft); }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
    width: 36px; height: 36px; border-radius: 9px;
    border: 1px solid var(--line); background: var(--paper);
    display: grid; place-items: center; color: var(--ink-400);
    cursor: pointer; transition: all .12s; position: relative;
}
.icon-btn:hover { color: var(--ink-800); border-color: var(--ink-200); }
.icon-btn svg { width:16px; height:16px; }
.icon-btn .badge { position:absolute; top:6px; right:6px; width:7px; height:7px; border-radius:50%; background: var(--rose); box-shadow: 0 0 0 2px var(--paper); }

.user { display: flex; align-items: center; gap: 10px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.user-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.user-role { font-size: 10.5px; color: var(--ink-300); line-height: 1.2; }
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white; font-weight: 600; display: grid; place-items: center; font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

.content { min-height: 60vh; }

/* ---------- Page head ---------- */
.page-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 24px;
}
.page-head h1 { margin-bottom: 6px; }
.page-head .muted { margin: 0; font-size: 13.5px; }
.page-head-actions { display: flex; gap: 8px; align-items: center; }

.greet {
    font-size: 13px; color: var(--ink-400); margin: 0 0 4px;
    display: inline-flex; gap: 6px; align-items: center;
}
.greet-wave { font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 15px; border-radius: 10px; border: 1px solid transparent;
    background: var(--paper); color: var(--ink-800); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all .14s; font-family: inherit;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-accent {
    background: linear-gradient(180deg, var(--accent), #a01a20);
    color: #fff; box-shadow: var(--shadow-pop);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(196,33,39,.40); color:#fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-500); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink-200); color: var(--ink-800); }
.btn-dark { background: var(--ink-900); color: #fff; }
.btn-dark:hover { background: var(--ink-700); color: #fff; }
.btn-block { width: 100%; }
.btn.danger { color: var(--rose-ink); border-color: var(--line); }
.btn.danger:hover { background: var(--rose-soft); border-color: #f5c5c5; }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ---------- Cards ---------- */
.card {
    background: var(--paper); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    padding: 22px;
    margin-bottom: 18px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.card-head h2 { margin: 0; }
.card-head .link { color: var(--ink-400); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.card-head .link:hover { color: var(--accent); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 18px 20px 16px;
    position: relative; overflow: hidden;
    transition: transform .14s, box-shadow .14s, border-color .14s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ink-200); }
.stat-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 10px; }
.stat-label { font-size: 11.5px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat-num { font-size: 32px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.02em; line-height:1; }
.stat-hint { font-size: 12px; color: var(--ink-300); margin-top: 6px; display:flex; align-items:center; gap:4px; }
.stat-hint.up { color: var(--green-ink); }
.stat-hint.down { color: var(--rose-ink); }
.stat-ico {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
}
.stat-ico.amber { background: var(--amber-soft); color: var(--amber-ink); }
.stat-ico.green { background: var(--green-soft); color: var(--green-ink); }
.stat-ico.sky   { background: var(--sky-soft);   color: var(--sky-ink); }
.stat-ico svg { width:16px; height:16px; }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-detail { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 20px; align-items: flex-start; }
@media (max-width: 1100px) { .grid-2, .grid-detail, .stats { grid-template-columns: 1fr; } .sidebar{ display:none; } .main{ padding: 0 18px 40px; } }

/* ---------- Pills ---------- */
.pill {
    display: inline-flex; align-items:center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.005em;
    line-height: 1.5;
}
.pill::before {
    content:""; width: 6px; height:6px; border-radius:50%; background: currentColor; opacity:.7;
}
.pill-gray  { background: #eef0f5; color: #4a5169; }
.pill-blue  { background: var(--accent-soft); color: var(--accent-ink); }
.pill-amber { background: var(--amber-soft); color: var(--amber-ink); }
.pill-rose  { background: var(--rose-soft);  color: var(--rose-ink); }
.pill-green { background: var(--green-soft); color: var(--green-ink); }
.pill-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.table th { font-weight: 600; font-size: 11px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .08em; background: var(--bg-soft); }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; transition: background .1s; }
.table tr.clickable:hover { background: var(--bg-soft); }
.table td strong { color: var(--ink-900); font-weight: 600; }
.table .task-title { display: flex; align-items: center; gap: 10px; }
.task-icon {
    width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink:0;
    background: var(--bg); color: var(--ink-400);
}
.task-icon svg { width:14px; height:14px; }
.task-icon.bug { background: var(--rose-soft); color: var(--rose-ink); }
.task-icon.feature { background: var(--accent-soft); color: var(--accent-ink); }
.task-icon.ui { background: var(--sky-soft); color: var(--sky-ink); }

/* ---------- Forms ---------- */
.form label { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 500; color: var(--ink-500); text-transform: uppercase; letter-spacing:.04em; }
.form input, .form textarea, .form select, .filters select, .comment-form textarea {
    width: 100%; display: block; margin-top: 6px;
    padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 13.5px; font-family: inherit;
    background: var(--paper); color: var(--ink-800);
    transition: border-color .15s, box-shadow .15s;
    text-transform: none; letter-spacing: 0;
}
.form input:focus, .form textarea:focus, .form select:focus, .filters select:focus, .comment-form textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(196,33,39,.14);
}
.form textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.filters { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.filters select { width: auto; min-width: 170px; margin-top: 0; }

/* ---------- Flash ---------- */
.flash {
    padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 18px; font-size: 13px;
    border: 1px solid transparent; display: flex; align-items: center; gap: 10px;
}
.flash::before {
    content:""; width:8px; height:8px; border-radius:50%; background: currentColor; flex-shrink:0;
}
.flash-success { background: var(--green-soft); color: var(--green-ink); border-color: #bbf7d0; }
.flash-error   { background: var(--rose-soft);  color: var(--rose-ink);  border-color: #fecaca; }
.flash-info    { background: var(--accent-soft); color: var(--accent-ink); border-color: #c7d2fe; }

/* ---------- Deliverables ---------- */
.deliverables { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.deliverable { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); transition: all .14s; }
.deliverable:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.deliverable-thumb {
    width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #1e293b 0%, var(--accent) 65%, var(--accent-2) 115%);
    color: white; display: grid; place-items: center; font-size: 22px; font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
    position: relative; overflow: hidden;
}
.deliverable-thumb::after {
    content:""; position:absolute; inset:0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 50%);
}
.deliverable-meta { flex: 1; min-width: 0; }
.deliverable-title { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-900); }

/* ---------- Deadlines ---------- */
.deadlines { list-style: none; padding: 0; margin: 0; }
.deadlines li { padding: 11px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.deadlines li:last-child { border-bottom: none; }
.deadlines a { font-weight: 500; color: var(--ink-900); }

/* ---------- Feed ---------- */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line-soft); align-items: flex-start; }
.feed li:last-child { border-bottom: none; }
.feed-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #64748b, #334155);
    color: white; font-weight: 600; display: grid; place-items: center; font-size: 11px;
    flex-shrink: 0;
}
.feed-body { flex: 1; font-size: 13px; color: var(--ink-500); line-height: 1.55; }
.feed-body strong { color: var(--ink-900); font-weight: 600; }
.feed-body .action { color: var(--accent-ink); font-weight: 500; }
.feed-time { font-size: 11.5px; color: var(--ink-300); white-space: nowrap; }

/* Timeline (vertical) */
.timeline { list-style:none; padding: 0; margin: 0; position: relative; }
.timeline::before { content:""; position:absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(180deg, var(--line), transparent); }
.timeline li { position: relative; padding: 6px 0 14px 36px; font-size: 13px; color: var(--ink-500); }
.timeline li::before {
    content:""; position: absolute; left: 7px; top: 10px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--paper); border: 2px solid var(--line);
}
.timeline li.done::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline li.active::before { border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li strong { color: var(--ink-900); display:block; font-size: 12.5px; }
.timeline li time { font-size: 11.5px; color: var(--ink-300); }

/* ---------- Features grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.feature-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    transition: all .18s ease;
    display:flex; flex-direction:column;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-thumb {
    height: 120px; display: grid; place-items: center; font-size: 44px; font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #0f172a, var(--accent) 60%, var(--accent-2) 115%);
    position: relative; overflow: hidden;
}
.feature-thumb::after {
    content:""; position:absolute; inset:0;
    background: radial-gradient(800px circle at 10% 0%, rgba(255,255,255,.15), transparent 40%);
}
.feature-body { padding: 16px 18px; flex:1; display:flex; flex-direction:column; gap:8px; }
.feature-title { font-weight: 600; font-size: 14px; color: var(--ink-900); }
.feature-desc { font-size: 12.5px; color: var(--ink-400); min-height: 34px; margin: 0; }

/* ---------- Docs ---------- */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { padding: 10px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line-soft); gap: 10px; }
.doc-list li:last-child { border-bottom: none; }
.doc-list a { font-weight: 500; color: var(--ink-900); display:flex; align-items:center; gap: 10px; }
.doc-list a:hover { color: var(--accent); }
.doc-list a::before { content:"❏"; color: var(--ink-300); font-size: 13px; }
.doc-article { max-width: 760px; padding: 32px 36px; line-height: 1.75; font-size: 14.5px; color: var(--ink-700); }
.doc-article h1 { margin: 0 0 16px; font-size: 28px; }
.doc-article h2 { font-size: 20px; margin: 28px 0 10px; }
.doc-article ul { padding-left: 22px; }
.doc-article li { margin: 4px 0; }

/* ---------- Key-value ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--ink-400); font-weight: 500; }
.kv dd { margin: 0; font-weight: 500; color: var(--ink-800); }

/* ---------- Comments ---------- */
.comment { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.comment:last-of-type { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-head strong { color: var(--ink-900); font-size: 13px; }
.comment-body { margin-left: 36px; font-size: 13.5px; color: var(--ink-700); line-height: 1.6; }
.comment-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.comment-form textarea { min-height: 64px; }
.comment-form button { align-self: flex-end; }

/* ---------- Attachments ---------- */
.attachments { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.attachment { display: block; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); transition: border-color .14s, transform .14s; }
.attachment:hover { border-color: var(--accent); transform: translateY(-1px); }
.attachment img { width: 100%; height: 110px; object-fit: cover; display: block; }
.attachment-file { height: 110px; display: grid; place-items: center; color: var(--ink-400); font-weight: 600; background: var(--bg); }
.attachment-meta { padding: 8px 11px; font-size: 11.5px; color: var(--ink-500); }

/* ---------- Media zone (create task + paste screenshots) ---------- */
.media-zone {
    border: 1.5px dashed var(--line);
    border-radius: var(--r-md);
    background: var(--bg-soft);
    padding: 22px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.media-zone:hover,
.media-zone:focus-within,
.media-zone.is-drop {
    border-color: var(--accent);
    background: var(--accent-soft);
    outline: none;
}
.media-zone-ico {
    width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px;
    display: grid; place-items: center;
    background: var(--paper); color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.media-zone-title { font-size: 15px; font-weight: 600; color: var(--ink-800); margin-bottom: 4px; }
.media-zone-hint { font-size: 12.5px; color: var(--ink-400); }

.media-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
    text-align: left;
}
.media-previews:empty { display: none; }
.media-preview {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--paper);
}
.media-preview img,
.media-preview video {
    display: block; width: 100%; height: 110px; object-fit: cover; background: #0b0f1c;
}
.media-preview-file {
    height: 110px; display: grid; place-items: center;
    background: var(--ink-900); color: var(--accent-2);
    font-weight: 700; letter-spacing: .08em; font-size: 13px;
}
.media-preview-meta {
    padding: 6px 10px; font-size: 11.5px; color: var(--ink-400);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-preview-remove {
    position: absolute; top: 6px; right: 6px;
    width: 24px; height: 24px; border-radius: 50%;
    border: none; background: rgba(0,0,0,.7); color: #fff;
    font-size: 18px; line-height: 22px; cursor: pointer;
    display: grid; place-items: center; transition: background .12s;
}
.media-preview-remove:hover { background: var(--accent); }

.upload-drop {
    border: 1.5px dashed var(--line); border-radius: var(--r-md);
    padding: 18px; text-align: center; color: var(--ink-400); font-size: 12.5px;
    transition: all .14s; background: var(--bg-soft);
}
.upload-drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Login (split panel) ---------- */
body.bare {
    background:
      radial-gradient(900px 500px at 8% 5%, rgba(196,33,39,.10), transparent 60%),
      radial-gradient(700px 400px at 92% 95%, rgba(228,167,44,.10), transparent 60%),
      var(--bg);
    min-height: 100vh;
}
.login-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
}
@media (max-width: 900px) {
    .login-split { grid-template-columns: 1fr; }
    .login-side { min-height: 260px; padding: 28px 24px !important; }
    .login-headline { font-size: 26px !important; }
}

.login-side {
    background: linear-gradient(155deg, #0b0f1c 0%, #3a0b10 45%, #7a1a1f 85%, #c42127 115%);
    color: #fff; padding: 0;
    position: relative; overflow: hidden;
    min-height: 100vh;
}
.login-side::before {
    content:""; position: absolute; border-radius: 50%; filter: blur(90px);
    width: 420px; height: 420px; background: rgba(228,167,44,.35);
    top: -120px; right: -120px; z-index: 0;
}
.login-side::after {
    content:""; position: absolute; border-radius: 50%; filter: blur(100px);
    width: 320px; height: 320px; background: rgba(196,33,39,.45);
    bottom: -100px; left: -60px; z-index: 0;
}
.login-side-inner {
    position: relative; z-index: 1;
    min-height: 100vh;
    padding: 44px 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    gap: 32px;
}
@media (max-width: 900px) { .login-side-inner { min-height: auto; padding: 28px 24px; } }

/* Top row: CF logo badge + Hiraya partner lockup */
.login-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px;
}
.cf-badge {
    width: 96px; height: 96px; border-radius: 22px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.3);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.cf-badge img { display: block; width: 100%; height: 100%; object-fit: contain; }

.login-partner {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 8px;
    text-align: right;
}
.login-partner span {
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255,255,255,.55); font-weight: 500;
}
.login-partner img {
    display: block; width: 150px; height: auto; max-width: 100%;
    opacity: .95;
}

/* Middle copy block — clearly separated from logos */
.login-copy { max-width: 460px; }
.kicker {
    display: inline-block;
    font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent-2);
    padding: 5px 10px; border-radius: 999px;
    background: rgba(228,167,44,.12);
    border: 1px solid rgba(228,167,44,.3);
    margin-bottom: 18px;
}
.login-headline {
    font-size: 36px; font-weight: 600; line-height: 1.18; letter-spacing: -0.02em;
    margin: 0 0 14px; color: #fff;
}
.login-sub {
    font-size: 15px; line-height: 1.65;
    color: rgba(255,255,255,.78);
    margin: 0 0 22px;
}
.login-bullets {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.login-bullets li {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 15px; color: rgba(255,255,255,.88);
}
.login-bullets li svg {
    width: 18px; height: 18px; color: var(--accent-2);
    flex-shrink: 0; margin-top: 2px;
}

.login-quote {
    font-size: 13px; color: rgba(255,255,255,.6);
    border-left: 2px solid rgba(228,167,44,.5);
    padding-left: 14px; max-width: 420px; line-height: 1.5;
}

.login-form-wrap { display: grid; place-items: center; padding: 40px 32px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; }
.login-card h1 { font-size: 26px; margin: 0 0 6px; }
.login-card .sub { color: var(--ink-400); margin: 0 0 22px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.empty {
    text-align:center; padding: 40px 20px; color: var(--ink-400);
}
.empty-ico {
    width:48px; height:48px; margin: 0 auto 12px;
    border-radius: 14px; background: var(--bg); display:grid; place-items:center;
    color: var(--ink-300);
}
.empty-ico svg { width: 22px; height: 22px; }

/* ---------- Calendar ---------- */
.cal-head { display:flex; align-items:center; justify-content:space-between; gap: 14px; margin-bottom: 14px; flex-wrap:wrap; }
.cal-legend { display:flex; gap: 8px; flex-wrap:wrap; }

.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
    background: var(--line);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden;
}
.cal-dow {
    background: var(--bg-soft);
    padding: 10px 12px;
    font-size: 11px; color: var(--ink-400); font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    text-align: left;
}
.cal-day {
    background: var(--paper);
    min-height: 130px;
    padding: 8px 8px 10px;
    display: flex; flex-direction: column; gap: 6px;
    position: relative;
}
.cal-day-empty { background: var(--bg-soft); }
.cal-day-today { background: linear-gradient(180deg, rgba(196,33,39,.06), var(--paper)); }
.cal-day-num {
    font-size: 12px; font-weight: 600; color: var(--ink-500);
    display: flex; align-items: center; gap: 5px;
}
.cal-today-dot { width:6px; height:6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(196,33,39,.18); }

.cal-card {
    display: flex; gap: 8px; align-items: center;
    padding: 5px 7px 5px 5px; border-radius: 8px;
    background: var(--bg-soft); border: 1px solid transparent;
    text-decoration: none; color: inherit;
    transition: all .12s;
}
.cal-card:hover { background: var(--paper); border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.cal-card-thumb {
    width: 30px; height: 30px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
    background: #e2e5ee; display: grid; place-items: center; color: var(--ink-300);
}
.cal-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cal-card-thumb.cal-card-video { background: linear-gradient(135deg, #b91c1c, #f87171); color: white; }
.cal-card-thumb.cal-card-placeholder { background: linear-gradient(135deg, #c7d2fe, #818cf8); color: white; }
.cal-card-body { flex: 1; min-width: 0; }
.cal-card-title {
    font-size: 11.5px; font-weight: 600; color: var(--ink-800);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}
.cal-card-meta { display: flex; gap: 4px; margin-top: 2px; }

.cal-add {
    margin-top: auto; padding: 4px; font-size: 11px; color: var(--ink-300);
    text-align: center; border-radius: 6px; border: 1px dashed transparent;
    opacity: 0; transition: all .15s;
}
.cal-day:hover .cal-add { opacity: 1; border-color: var(--line); }
.cal-add:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.cal-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 7px; border-radius: 4px;
    font-size: 10px; font-weight: 600; letter-spacing: .02em;
    line-height: 1.5;
}
.cal-tag-indigo { background: var(--accent-soft); color: var(--accent-ink); }
.cal-tag-rose   { background: var(--rose-soft);   color: var(--rose-ink); }
.cal-tag-amber  { background: var(--amber-soft);  color: var(--amber-ink); }
.cal-tag-gray   { background: #eef0f5; color: #4a5169; }

.cal-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cal-media { display: block; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); text-decoration: none; color: inherit; }
.cal-media:hover { border-color: var(--accent); }
.cal-media img, .cal-media video { display:block; width: 100%; height: 160px; object-fit: cover; background: #0b0f1c; }
.cal-media-meta { padding: 6px 10px; font-size: 11.5px; display: flex; justify-content: space-between; gap: 8px; }
.cal-media-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hashtags { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtag {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-ink);
    font-size: 12px; font-weight: 500;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

@media (max-width: 900px) { .cal-grid { grid-template-columns: repeat(3, 1fr); } .cal-dow:nth-child(n+4) { display:none; } .cal-day { min-height: 110px; } }
