/* ═══════════════ Workspace — night sky theme ═══════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #12102b;
  --bg-panel: #1a1740;
  --bg-card: #201c4d;
  --bg-card-2: #262158;
  --line: rgba(139, 128, 219, 0.18);
  --text: #eceafd;
  --text-dim: #9d97c9;
  --text-faint: #6f6a9e;
  --accent: #7c6cf0;
  --accent-2: #4f8df9;
  --red: #f06292;
  --orange: #f0a35c;
  --yellow: #e8c352;
  --green: #4fd1a5;
  --blue: #5c9df0;
  --gray: #8a86b0;
  --radius: 14px;
  --sidebar-w: 340px;
  font-size: 15px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: var(--accent-2); text-decoration: none; }

/* ─────────────── logo ─────────────── */
.logo-script {
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 18px rgba(124, 108, 240, 0.8);
  letter-spacing: 1px;
}
.logo-jp {
  margin-top: 6px;
  font-size: 1.05rem;
  color: #e8e4ff;
  letter-spacing: 4px;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.logo-jp span {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 6px;
  color: rgba(232, 228, 255, 0.65);
  text-transform: lowercase;
  margin-top: 3px;
}

/* ═══════════════ LOGIN ═══════════════ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0d0b2e 0%, #1b1550 35%, #3a2a7d 62%, #7b4fa8 82%, #c96f9b 94%, #e8927c 100%);
  overflow: hidden;
}
.login-sky { position: absolute; inset: 0; pointer-events: none; }
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 15%, #fff, transparent),
    radial-gradient(1px 1px at 45% 8%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.8px 1.8px at 70% 20%, #fff, transparent),
    radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.4px 1.4px at 10% 40%, #fff, transparent),
    radial-gradient(1px 1px at 35% 30%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.6px 1.6px at 60% 45%, #fff, transparent),
    radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.3px 1.3px at 25% 55%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,.5), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .7; } to { opacity: 1; } }
.comet {
  position: absolute;
  width: 340px; height: 3px;
  background: linear-gradient(90deg, transparent, #9fd8ff 60%, #fff);
  border-radius: 3px;
  filter: drop-shadow(0 0 8px #9fd8ff);
  transform: rotate(-35deg);
}
.comet::after {
  content: ""; position: absolute; right: -4px; top: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 18px 6px rgba(190, 235, 255, .9);
}
.comet.c1 { top: 22%; left: 55%; animation: cometMove 9s linear infinite; }
.comet.c2 { top: 45%; left: 20%; width: 220px; opacity: .7; animation: cometMove 13s linear infinite reverse; }
@keyframes cometMove {
  0% { transform: rotate(-35deg) translateX(0); opacity: 0; }
  15% { opacity: 1; } 70% { opacity: 1; }
  100% { transform: rotate(-35deg) translateX(-420px); opacity: 0; }
}

.login-card {
  position: relative; z-index: 2;
  width: min(400px, 92vw);
  padding: 42px 38px 34px;
  background: rgba(18, 15, 48, 0.55);
  border: 1px solid rgba(159, 216, 255, 0.18);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}
.login-logo { margin-bottom: 30px; }
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span {
  display: block; font-size: .8rem; color: var(--text-dim);
  margin-bottom: 6px; letter-spacing: .4px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(10, 8, 32, 0.6);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.22);
}
.login-error {
  background: rgba(240, 98, 146, .12);
  border: 1px solid rgba(240, 98, 146, .4);
  color: #ff9dbb;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: .85rem;
  margin-bottom: 14px;
}
.login-hint {
  margin-top: 26px;
  font-size: .78rem;
  color: rgba(232, 228, 255, .55);
  line-height: 1.7;
  letter-spacing: 1px;
}

/* ─────────────── buttons ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px;
  padding: 10px 18px;
  font-size: .92rem; font-weight: 600;
  color: #fff;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #7c6cf0, #4f8df9);
  border: none;
  box-shadow: 0 6px 22px rgba(124, 108, 240, 0.4);
}
.btn-success { background: linear-gradient(135deg, #2fae84, #4fd1a5); border: none; }
.btn-warn { background: linear-gradient(135deg, #d98b3f, #f0a35c); border: none; }
.btn-danger { background: linear-gradient(135deg, #c94f7c, #f06292); border: none; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 8px; }

/* ═══════════════ APP LAYOUT ═══════════════ */
.app { display: flex; min-height: 100vh; }

/* ─────────────── sidebar ─────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 50;
}
.sidebar-bg {
  position: absolute; inset: 0;
  background: url("/assets/banner1.png") center / cover no-repeat, linear-gradient(180deg, #0d0b2e, #3a2a7d);
}
.sidebar-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 11, 40, 0.55) 0%, rgba(13, 11, 40, 0.35) 30%, rgba(18, 16, 43, 0.72) 100%);
}
.sidebar-inner {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  padding: 30px 22px 22px;
}
.brand { padding-left: 8px; margin-bottom: 34px; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(236, 234, 253, 0.88);
  font-size: .95rem; font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  width: 100%; text-align: left;
  transition: background .15s;
  position: relative;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255, 255, 255, 0.09); }
.nav-item.active {
  background: rgba(236, 234, 253, 0.16);
  border-color: rgba(236, 234, 253, 0.22);
  backdrop-filter: blur(6px);
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  background: rgba(240, 98, 146, .9);
  color: #fff; font-size: .68rem; font-weight: 700;
  border-radius: 20px; padding: 2px 7px;
}

.sidebar-footer { margin-top: auto; }
.user-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(10, 8, 32, 0.5);
  border: 1px solid rgba(236, 234, 253, 0.14);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  margin-bottom: 10px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg, #7c6cf0, #f06292);
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.avatar.has-img { color: transparent; }
.user-name { font-weight: 600; font-size: .92rem; }
.user-role { font-size: .74rem; color: var(--text-dim); }
.logout-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(236, 234, 253, 0.75);
  font-size: .9rem;
  transition: background .15s;
}
.logout-btn svg { width: 17px; height: 17px; }
.logout-btn:hover { background: rgba(240, 98, 146, 0.18); color: #ffb3cb; }

/* ─────────────── main ─────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 26px 34px 40px;
  min-width: 0;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 24px; position: relative;
}
.greeting h2 { font-size: 1.45rem; }
.greeting p { color: var(--text-dim); font-size: .86rem; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px;
  width: 300px;
}
.search-box svg { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: .88rem; min-width: 0;
}
.search-box kbd {
  font-size: .66rem; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px;
}
.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-panel); border: 1px solid var(--line);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); }
.notif-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff;
  font-size: .64rem; font-weight: 700;
  border-radius: 20px; padding: 2px 6px;
  border: 2px solid var(--bg);
}
.avatar-top { width: 40px; height: 40px; }

.notif-panel {
  position: absolute; top: 52px; right: 54px;
  width: 360px; max-height: 420px; overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  z-index: 100;
  padding: 10px;
}
.notif-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  padding: 11px 12px; border-radius: 10px;
  font-size: .84rem; line-height: 1.45;
}
.notif-item:hover { background: var(--bg-card-2); }
.notif-item.unread { background: rgba(124, 108, 240, .12); }
.notif-item .notif-time { color: var(--text-faint); font-size: .72rem; display: block; margin-top: 2px; }
.notif-empty { padding: 26px; text-align: center; color: var(--text-faint); font-size: .86rem; }

/* ─────────────── hero status card ─────────────── */
.hero {
  position: relative;
  display: flex; align-items: center; gap: 26px;
  background: url("/assets/banner2.png") center 32% / cover no-repeat, #241a5e;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 24px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16, 13, 42, 0.88) 0%, rgba(16, 13, 42, 0.62) 36%, rgba(16, 13, 42, 0.2) 64%, rgba(16, 13, 42, 0.05) 100%);
  pointer-events: none;
}
.hero-text h3, .hero-quote { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); }
.hero > * { position: relative; z-index: 2; }
.status-ring {
  width: 108px; height: 108px; border-radius: 50%;
  padding: 6px;
  background: conic-gradient(#4fd1a5, #4f8df9, #4fd1a5);
  flex-shrink: 0;
  animation: spinring 6s linear infinite;
}
@keyframes spinring { to { transform: rotate(360deg); } }
.status-ring-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: #1c1650;
  display: flex; align-items: center; justify-content: center;
  animation: spinring 6s linear infinite reverse;
}
.status-ring-inner svg { width: 44px; height: 44px; color: #4fd1a5; }
.hero-text .hero-label { font-size: .82rem; color: var(--text-dim); letter-spacing: .5px; }
.hero-text h3 { font-size: 1.7rem; margin: 4px 0 6px; }
.hero-text .hero-sub { color: var(--text-dim); font-size: .88rem; margin-bottom: 14px; }
.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 8, 32, 0.45);
  border: 1px solid rgba(236, 234, 253, 0.14);
  border-radius: 9px;
  padding: 7px 13px;
  font-size: .8rem; color: var(--text);
  backdrop-filter: blur(4px);
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero-quote {
  margin-left: auto; text-align: right;
  font-size: .85rem; color: rgba(236, 234, 253, .85);
  line-height: 1.9; letter-spacing: .5px;
  max-width: 300px;
}

/* ─────────────── stat cards ─────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  border-radius: 16px;
  padding: 18px 18px 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-label { font-size: .82rem; color: var(--text-dim); }
.stat-value { font-size: 1.9rem; font-weight: 700; margin: 2px 0; }
.stat-delta { font-size: .74rem; color: var(--text-faint); }
.stat-spark { display: block; width: 100%; height: 34px; margin-top: 6px; }

.stat-card.tone-purple { background: linear-gradient(160deg, #262158, #201c4d); }
.stat-card.tone-blue   { background: linear-gradient(160deg, #1d2a5e, #1a2148); border-color: rgba(92,157,240,.25); }
.stat-card.tone-orange { background: linear-gradient(160deg, #3a2b1e, #2b2118); border-color: rgba(240,163,92,.25); }
.stat-card.tone-green  { background: linear-gradient(160deg, #16362e, #142a24); border-color: rgba(79,209,165,.25); }
.stat-card.tone-red    { background: linear-gradient(160deg, #3a1e2c, #2b1822); border-color: rgba(240,98,146,.25); }
.tone-purple .stat-icon { background: rgba(124,108,240,.2); color: #a99cf5; }
.tone-blue   .stat-icon { background: rgba(92,157,240,.2); color: #8ebbf5; }
.tone-orange .stat-icon { background: rgba(240,163,92,.2); color: #f5c08e; }
.tone-green  .stat-icon { background: rgba(79,209,165,.2); color: #86e2c4; }
.tone-red    .stat-icon { background: rgba(240,98,146,.2); color: #f591b3; }

/* ─────────────── dashboard grid ─────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-head h3 { font-size: 1.05rem; }

/* ─────────────── issue rows ─────────────── */
.issue-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
}
.issue-row:hover { background: var(--bg-card); }
.issue-row + .issue-row { border-top: 1px solid rgba(139, 128, 219, 0.08); }
.issue-thumb {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  overflow: hidden; flex-shrink: 0;
}
.issue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.issue-thumb svg { width: 18px; height: 18px; }
.issue-code {
  font-size: .7rem; color: var(--text-dim);
  background: var(--bg-card-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 8px;
  white-space: nowrap; flex-shrink: 0;
  font-family: Consolas, monospace;
}
.issue-main { flex: 1; min-width: 0; }
.issue-title { font-weight: 600; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-meta { font-size: .76rem; color: var(--text-faint); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.issue-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600;
  border-radius: 8px; padding: 5px 11px;
  white-space: nowrap; flex-shrink: 0;
}
.badge svg { width: 11px; height: 11px; }
.badge.p-urgent { background: rgba(240,98,146,.16); color: #ff8fb4; border: 1px solid rgba(240,98,146,.35); }
.badge.p-high   { background: rgba(240,163,92,.16); color: #f8bd85; border: 1px solid rgba(240,163,92,.35); }
.badge.p-medium { background: rgba(232,195,82,.14); color: #efd382; border: 1px solid rgba(232,195,82,.3); }
.badge.p-low    { background: rgba(79,209,165,.14); color: #8ce4c7; border: 1px solid rgba(79,209,165,.3); }
.badge.s-pending     { background: rgba(240,163,92,.16); color: #f8bd85; border: 1px solid rgba(240,163,92,.35); }
.badge.s-in_progress { background: rgba(92,157,240,.18); color: #9cc4f8; border: 1px solid rgba(92,157,240,.4); }
.badge.s-completed   { background: rgba(79,209,165,.16); color: #8ce4c7; border: 1px solid rgba(79,209,165,.35); }
.badge.s-closed      { background: rgba(138,134,176,.16); color: #b6b3d4; border: 1px solid rgba(138,134,176,.35); }

/* ─────────────── donut + activity ─────────────── */
.side-col { display: flex; flex-direction: column; gap: 20px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: .82rem; }
.legend-row .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-row .lval { margin-left: auto; color: var(--text-dim); font-size: .78rem; }

.act-item {
  display: flex; gap: 11px;
  padding: 10px 4px;
  font-size: .82rem; line-height: 1.45;
}
.act-item + .act-item { border-top: 1px solid rgba(139, 128, 219, 0.08); }
.act-icon { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.act-time { margin-left: auto; color: var(--text-faint); font-size: .72rem; white-space: nowrap; }
.act-main { flex: 1; min-width: 0; color: var(--text-dim); }
.act-main b { color: var(--text); font-weight: 600; }

/* ═══════════════ ISSUES LIST PAGE ═══════════════ */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h2 { font-size: 1.35rem; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text-dim);
  border-radius: 20px;
  padding: 7px 15px;
  font-size: .8rem; font-weight: 500;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-faint);
}
.empty-state .big { font-size: 2.6rem; margin-bottom: 12px; }

/* ═══════════════ CREATE ISSUE ═══════════════ */
.create-wrap { max-width: 760px; }
.priority-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prio-option {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem; font-weight: 600;
  transition: all .15s;
}
.prio-option .prio-ico { font-size: 1.15rem; display: block; margin-bottom: 6px; }
.prio-option.selected.p-urgent { background: rgba(240,98,146,.18); border-color: var(--red); color: #ff9dbb; }
.prio-option.selected.p-high   { background: rgba(240,163,92,.18); border-color: var(--orange); color: #f8bd85; }
.prio-option.selected.p-medium { background: rgba(232,195,82,.15); border-color: var(--yellow); color: #efd382; }
.prio-option.selected.p-low    { background: rgba(79,209,165,.15); border-color: var(--green); color: #8ce4c7; }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: .88rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(124, 108, 240, 0.07);
  color: var(--text-dim);
}
.dropzone svg { width: 30px; height: 30px; margin-bottom: 8px; color: var(--accent); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumb {
  position: relative;
  width: 90px; height: 90px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff;
  border: none; font-size: .72rem;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════ ISSUE DETAIL ═══════════════ */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.detail-desc { color: var(--text-dim); line-height: 1.75; font-size: .93rem; white-space: pre-wrap; margin-top: 10px; }
.detail-images { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.detail-images img {
  width: 140px; height: 105px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
  cursor: zoom-in; transition: transform .15s;
}
.detail-images img:hover { transform: scale(1.04); }

.kv { display: flex; flex-direction: column; gap: 13px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; font-size: .86rem; }
.kv-row .k { color: var(--text-faint); }
.admin-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }

/* comments */
.comment {
  display: flex; gap: 13px;
  padding: 15px 0;
}
.comment + .comment { border-top: 1px solid rgba(139, 128, 219, 0.08); }
.comment .avatar { width: 34px; height: 34px; font-size: .8rem; }
.comment.by-admin .avatar { background: linear-gradient(135deg, #4f8df9, #4fd1a5); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.comment-head .who { font-weight: 600; font-size: .88rem; }
.comment-head .tag {
  font-size: .64rem; font-weight: 700; letter-spacing: .5px;
  border-radius: 5px; padding: 2px 7px;
  background: rgba(92,157,240,.2); color: #9cc4f8;
}
.comment-head .when { color: var(--text-faint); font-size: .74rem; margin-left: auto; }
.comment-text { color: var(--text-dim); font-size: .89rem; line-height: 1.65; white-space: pre-wrap; }
.comment-imgs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.comment-imgs img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

.comment-box { margin-top: 16px; }
.comment-box textarea {
  width: 100%; min-height: 84px; resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text); font-size: .9rem;
  outline: none;
}
.comment-box textarea:focus { border-color: var(--accent); }
.comment-box-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }

.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-dim); font-size: .86rem;
  background: none; border: none; padding: 0;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); }

.closed-note {
  background: rgba(138,134,176,.1);
  border: 1px solid rgba(138,134,176,.3);
  color: var(--text-dim);
  border-radius: 12px; padding: 13px 16px;
  font-size: .86rem; margin-top: 16px;
  display: flex; align-items: center; gap: 10px;
}

/* ═══════════════ misc ═══════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 6, 24, 0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 12px; }
.lightbox-close {
  position: absolute; top: 22px; right: 26px;
  background: rgba(255,255,255,.12); color: #fff;
  border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 1rem;
}

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 12px;
  font-size: .9rem;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  z-index: 400;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

.placeholder-page { text-align: center; padding: 90px 20px; color: var(--text-faint); }
.placeholder-page .big { font-size: 3rem; margin-bottom: 14px; }
.placeholder-page h3 { color: var(--text-dim); margin-bottom: 6px; }

/* ═══════════════ MUSIC PLAYER ═══════════════ */
.sidebar-inner { overflow-y: auto; }
.music-player {
  margin: 16px 0 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(10, 8, 32, 0.55);
  border: 1px solid rgba(236, 234, 253, 0.16);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.mp-empty { text-align: center; color: rgba(236,234,253,.7); font-size: .82rem; line-height: 1.6; padding: 8px; }
.mp-empty code { background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 5px; font-size: .78rem; }
.mp-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.mp-art {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #7c6cf0, #f06292);
  box-shadow: 0 0 16px rgba(124,108,240,.5);
}
.mp-art.spin { animation: spinring 8s linear infinite; }
.mp-info { min-width: 0; flex: 1; }
.mp-title { font-weight: 700; font-size: .9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { font-size: .68rem; color: rgba(236,234,253,.6); letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }

input[type="range"].mp-seek, input[type="range"].mp-vol {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 5px; outline: none; cursor: pointer;
  background: rgba(255,255,255,.18);
}
input[type="range"].mp-seek { margin-top: 2px; }
input[type="range"].mp-vol { margin-top: 10px; height: 4px; }
input[type="range"].mp-seek::-webkit-slider-thumb,
input[type="range"].mp-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px rgba(159,216,255,.9); cursor: pointer;
}
input[type="range"].mp-seek::-moz-range-thumb,
input[type="range"].mp-vol::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%; background: #fff; cursor: pointer;
}
.mp-times { display: flex; justify-content: space-between; font-size: .68rem; color: rgba(236,234,253,.6); margin-top: 5px; }
.mp-controls { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 8px; }
.mp-btn {
  background: none; border: none; color: rgba(236,234,253,.85);
  font-size: 1.05rem; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.mp-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.mp-btn.active { color: #9fd8ff; }
.mp-play {
  background: linear-gradient(135deg, #7c6cf0, #4f8df9);
  color: #fff; width: 44px; height: 44px; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(124,108,240,.5);
}
.mp-play:hover { filter: brightness(1.12); background: linear-gradient(135deg, #7c6cf0, #4f8df9); }
.mp-art { padding: 0; border: none; cursor: pointer; }
.mp-art:hover { filter: brightness(1.12); }
.mp-list-toggle { background: none; border: none; color: rgba(236,234,253,.7); font-size: 1rem; padding: 4px 6px; border-radius: 7px; flex-shrink: 0; }
.mp-list-toggle:hover { color: #fff; background: rgba(255,255,255,.12); }
.mp-list { max-height: 168px; overflow-y: auto; margin: 2px 0 10px; display: flex; flex-direction: column; gap: 2px; background: rgba(0,0,0,.28); border-radius: 10px; padding: 6px; }
.mp-track { display: flex; align-items: center; gap: 9px; background: none; border: none; color: rgba(236,234,253,.85); text-align: left; width: 100%; padding: 8px 9px; border-radius: 8px; font-size: .8rem; }
.mp-track:hover { background: rgba(255,255,255,.1); }
.mp-track.active { background: rgba(124,108,240,.28); color: #fff; font-weight: 600; }
.mp-track-ico { flex-shrink: 0; }
.mp-track-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* assignees (create form) */
.assignee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; }
.assignee-opt { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--bg-card); border-radius: 11px; padding: 8px 11px; color: var(--text-dim); transition: border-color .15s, background .15s; }
.assignee-opt .avatar { width: 30px; height: 30px; font-size: .82rem; }
.assignee-opt.sel { border-color: var(--accent); background: rgba(124,108,240,.16); color: #fff; }
.assignee-name { font-size: .85rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignee-check { margin-left: auto; color: #b6acff; font-weight: 800; opacity: 0; flex-shrink: 0; }
.assignee-opt.sel .assignee-check { opacity: 1; }

/* assignees (detail) */
.kv-assignees { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.kv-assignees .k { color: var(--text-faint); font-size: .86rem; display: block; margin-bottom: 9px; }
.assignee-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.assignee-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px 3px 3px; font-size: .82rem; font-weight: 500; }
.assignee-chip .avatar { width: 24px; height: 24px; font-size: .68rem; }
.assignee-none { color: var(--text-faint); font-size: .84rem; }

/* calendar month/year selects */
.cal-nav { flex-wrap: wrap; align-items: center; }
.cal-select { background: var(--bg-panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: .82rem; font-family: inherit; outline: none; cursor: pointer; }
.cal-select:focus { border-color: var(--accent); }

/* ═══════════════ CALENDAR ═══════════════ */
.cal-nav { display: flex; gap: 8px; }
.cal-grid-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.cal-panel { padding: 18px; }
.cal-month-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.cal-lunar-year { font-size: .85rem; color: var(--text-dim); font-weight: 500; }
.cal-weekhead { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-weekhead div { text-align: center; font-size: .74rem; color: var(--text-dim); font-weight: 600; padding: 4px 0; }
.cal-weekhead div.sun { color: #ff8fb4; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  position: relative; min-height: 74px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-card); color: var(--text);
  padding: 6px 7px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px;
  transition: background .15s, border-color .15s;
}
.cal-cell:hover { background: var(--bg-card-2); border-color: var(--accent); }
.cal-cell.dim { opacity: .38; }
.cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-cell.sel { background: rgba(124,108,240,.22); border-color: var(--accent); }
.cal-cell.has-hol .cal-daynum { color: #ff9dbb; }
.cal-daynum { display: flex; align-items: baseline; justify-content: space-between; font-weight: 700; font-size: .95rem; }
.cal-lunar { font-size: .64rem; color: var(--text-faint); font-weight: 500; }
.cal-lunar.lm { color: #f0a35c; font-weight: 700; }
.cal-holname { font-size: .6rem; color: #ff9dbb; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cal-dot.hol { background: #ff8fb4; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .74rem; color: var(--text-dim); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

.cal-sel-lunar { font-size: .85rem; color: var(--text-dim); margin-bottom: 8px; }
.cal-sel-hol { font-size: .84rem; color: #ff9dbb; background: rgba(240,98,146,.1); border: 1px solid rgba(240,98,146,.25); border-radius: 9px; padding: 8px 11px; margin-bottom: 10px; }
.cal-day-events { display: flex; flex-direction: column; gap: 8px; }
.ev-item { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; padding: 9px 11px; }
.ev-main { flex: 1; min-width: 0; }
.ev-title { font-weight: 600; font-size: .86rem; }
.ev-shared { font-size: .6rem; background: rgba(124,108,240,.25); color: #b6acff; border-radius: 5px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.ev-meta { font-size: .72rem; color: var(--text-faint); margin-top: 3px; }
.ev-note { font-size: .78rem; color: var(--text-dim); margin-top: 4px; white-space: pre-wrap; }
.ev-del { background: none; border: none; color: var(--text-faint); font-size: .8rem; padding: 2px 5px; border-radius: 6px; flex-shrink: 0; }
.ev-del:hover { background: rgba(240,98,146,.18); color: #ff9dbb; }
.ev-kind-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-kind { border: 1px solid var(--line); background: var(--bg-card); color: var(--text-dim); border-radius: 9px; padding: 8px 11px; font-size: .8rem; font-weight: 600; }
.ev-kind.sel { border-color: var(--kc); color: #fff; background: color-mix(in srgb, var(--kc) 22%, transparent); }
.ev-remind { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-dim); margin-top: 8px; cursor: pointer; }
.ev-remind input { width: 16px; height: 16px; accent-color: var(--accent); }
.ev-vis-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-vis { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-dim); border-radius: 10px; padding: 9px 11px; font-size: .84rem; font-weight: 600; }
.ev-vis small { font-size: .68rem; font-weight: 400; color: var(--text-faint); }
.ev-vis.sel { border-color: var(--accent); background: rgba(124,108,240,.16); color: #fff; }
.ev-vis.sel small { color: rgba(236,234,253,.7); }
.ev-vis-badge { font-size: .6rem; font-weight: 700; border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.ev-vis-badge.shared { background: rgba(124,108,240,.25); color: #b6acff; }
.ev-vis-badge.private { background: rgba(138,134,176,.2); color: #b6b3d4; }
.ev-vis-toggle { margin-top: 7px; background: none; border: 1px solid var(--line); color: var(--text-dim); border-radius: 7px; padding: 4px 9px; font-size: .72rem; }
.ev-vis-toggle:hover { border-color: var(--accent); color: #fff; background: rgba(124,108,240,.12); }

/* ═══════════════ REPORTS ═══════════════ */
.rp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.rp-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.rp-card.accent-green { background: linear-gradient(160deg, #16362e, #142a24); border-color: rgba(79,209,165,.3); }
.rp-card.accent-blue { background: linear-gradient(160deg, #1d2a5e, #1a2148); border-color: rgba(92,157,240,.3); }
.rp-card.accent-orange { background: linear-gradient(160deg, #3a2b1e, #2b2118); border-color: rgba(240,163,92,.3); }
.rp-card-label { font-size: .82rem; color: var(--text-dim); }
.rp-card-val { font-size: 2.1rem; font-weight: 800; margin: 4px 0; }
.rp-card-sub { font-size: .74rem; color: var(--text-faint); }
.rp-progress { height: 7px; border-radius: 6px; background: rgba(255,255,255,.12); margin-top: 8px; overflow: hidden; }
.rp-progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4f8df9, #4fd1a5); }

.rp-chart-legend { display: flex; gap: 16px; font-size: .78rem; color: var(--text-dim); }
.rp-chart-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.rp-chart-legend .sw.created { background: #7c6cf0; }
.rp-chart-legend .sw.resolved { background: #4fd1a5; }
.rp-chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.rp-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.rp-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; }
.rp-bar { width: 42%; max-width: 22px; border-radius: 5px 5px 0 0; position: relative; min-height: 3px; transition: height .3s; display: flex; justify-content: center; }
.rp-bar.created { background: linear-gradient(180deg, #8b7cf5, #6a5ae0); }
.rp-bar.resolved { background: linear-gradient(180deg, #6fe0bd, #3fae84); }
.rp-bar span { position: absolute; top: -16px; font-size: .64rem; color: var(--text-dim); }
.rp-mlabel { font-size: .68rem; color: var(--text-faint); text-align: center; line-height: 1.2; }
.rp-mlabel small { display: block; opacity: .7; }
.rp-status { display: flex; flex-direction: column; gap: 12px; }
.rp-srow { display: flex; align-items: center; gap: 12px; }
.rp-slabel { width: 92px; font-size: .84rem; color: var(--text-dim); flex-shrink: 0; }
.rp-sbar { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.rp-sfill { height: 100%; border-radius: 6px; transition: width .3s; }
.rp-sval { width: 76px; text-align: right; font-size: .82rem; flex-shrink: 0; }
.rp-sval small { color: var(--text-faint); }

/* ═══════════════ SETTINGS ═══════════════ */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.set-span { grid-column: 1 / -1; }
.set-profile { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.set-avatar {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #7c6cf0, #f06292);
  background-size: cover; background-position: center;
}
.set-avatar.has-img { color: transparent; }
.set-name { font-size: 1.15rem; font-weight: 700; }
.set-role { font-size: .8rem; color: var(--text-dim); margin: 3px 0 10px; }
.set-av-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.set-inline { display: flex; gap: 12px; align-items: flex-end; }
.set-inline .field { margin-bottom: 0; }

.online-list { display: flex; flex-direction: column; gap: 8px; }
.online-row, .admin-user-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 11px; }
.admin-user-row { margin-bottom: 8px; }
.online-info, .admin-user-info { flex: 1; min-width: 0; }
.online-name, .admin-user-name { font-weight: 600; font-size: .9rem; }
.online-sub, .admin-user-sub { font-size: .74rem; color: var(--text-faint); margin-top: 2px; }
.admin-user-role { font-size: .64rem; font-weight: 700; letter-spacing: .5px; background: rgba(124,108,240,.22); color: #b6acff; border-radius: 5px; padding: 1px 6px; margin-left: 5px; }
.online-dot { font-size: .76rem; font-weight: 600; white-space: nowrap; }
.online-dot.on { color: #6fe0bd; }
.online-dot.off { color: var(--text-faint); }
.admin-pw { width: 160px; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: rgba(10,8,32,.6); color: var(--text); font-size: .84rem; outline: none; }
.admin-pw:focus { border-color: var(--accent); }
.online-lastseen { font-size: .72rem; color: var(--text-faint); margin-top: 3px; }
.online-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.online-actions .btn-danger { padding: 6px 11px; }
@media (max-width: 620px) {
  .online-row { flex-wrap: wrap; }
  .online-actions { width: 100%; justify-content: space-between; margin-top: 4px; }
}
.create-user-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.create-user-form .field { margin-bottom: 0; }
.create-user-form .btn { grid-column: 1 / -1; justify-self: start; }
.cu-hint { font-size: .76rem; color: var(--text-faint); margin-top: 12px; line-height: 1.5; }
@media (max-width: 560px) { .create-user-form { grid-template-columns: 1fr; } }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #322c6b; border-radius: 6px; }

/* ─────────────── responsive ─────────────── */
@media (max-width: 1450px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .rp-cards { grid-template-columns: repeat(2, 1fr); }
  .cal-grid-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .set-grid { grid-template-columns: 1fr; }
  .rp-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 250px; }
  .hero-quote { display: none; }
  .search-box { width: 200px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar { position: relative; width: 100%; height: auto; }
  .sidebar-inner { padding: 20px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .main { margin-left: 0; padding: 18px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .priority-grid { grid-template-columns: repeat(2, 1fr); }
}
