:root {
  --ink: #0f172a;
  --ink2: #475569;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --panel: #ffffff;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-ink: #ffffff;
  --brand-soft: #e0f2fe;
  --urgent: #dc2626;
  --urgent-soft: #fef2f2;
  --high: #d97706;
  --high-soft: #fffbeb;
  --med: #2563eb;
  --med-soft: #eff6ff;
  --low: #64748b;
  --low-soft: #f1f5f9;
  --done: #16a34a;
  --done-soft: #f0fdf4;
  --verify: #7c3aed;
  --verify-soft: #f5f3ff;
  --over: #be123c;
  --over-soft: #fff1f2;
  --fu: #0284c7;
  --fu-soft: #f0f9ff;
  --r: 8px;
  --side: 265px;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1 { font-size: 1.55rem; margin: 0 0 0.25rem; letter-spacing: -0.02em; font-weight: 800; color: #0f172a; }
h2 { font-size: 1.1rem; margin: 0; font-weight: 800; color: #1e293b; letter-spacing: -0.01em; }
h3 { font-size: 0.95rem; margin: 0; font-weight: 700; }
a { color: var(--brand); text-decoration: none; transition: color 0.15s ease; }
a:hover { text-decoration: underline; color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.muted { color: var(--ink2); }
.small { font-size: 0.8rem; }
.center { text-align: center; }
.right { margin-left: auto; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 0.6rem; }
.grow { flex: 1; min-width: 0; }

/* ---------- Shell & Sidebar ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, #091a2b 0%, #0d2842 100%);
  color: #cbd5e1;
  padding: 1.15rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 2px 0 14px rgba(0, 0, 0, 0.15);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.brand-logo-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.brand-subtitle {
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

.side a {
  color: #94a3b8;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.side a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  transform: translateX(2px);
}
.side a.on {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.side .sep { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 0.5rem 0; }
.side .who {
  margin-top: auto;
  padding: 0.85rem 0.85rem 0.4rem;
  font-size: 0.82rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.side .who b { color: #f8fafc; }

/* Developer Credit Box */
.dev-credit {
  margin-top: 0.9rem;
  padding: 0.7rem 0.85rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dev-credit .dev-label {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}
.dev-credit .dev-name {
  color: #38bdf8;
  font-size: 0.86rem;
  font-weight: 800;
  display: block;
}
.dev-credit .dev-role {
  display: inline-block;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 3px;
}

.badge {
  background: var(--urgent);
  color: #fff;
  border-radius: 99px;
  font-size: 0.7rem;
  padding: 0 0.45rem;
  min-width: 1.25rem;
  text-align: center;
  font-weight: 700;
}

/* ---------- Main Body & Top Bar ---------- */
.main { padding: 1.25rem 1.75rem 5rem; min-width: 0; }
.top {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.4rem;
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  z-index: 10;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.quick { flex: 1; display: flex; gap: 0.5rem; }
.quick input {
  flex: 1;
  padding: 0.68rem 1.05rem;
  border: 1px solid #cbd5e1;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  font-size: 0.92rem;
}
.quick input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
  outline: none;
}
.bell {
  position: relative;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.bell:hover { border-color: #0284c7; background: #f0f9ff; transform: scale(1.05); }
.bell .badge { position: absolute; top: -3px; right: -3px; }
.tabbar { display: none; }

/* ---------- Buttons & Inputs ---------- */
.btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  text-decoration: none;
  color: #1e293b;
  line-height: 1.25;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.btn.primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}
.btn.danger { color: var(--urgent); border-color: #fca5a5; background: #fef2f2; }
.btn.danger:hover { background: #fee2e2; }
.btn.sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; border-radius: 6px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--r);
  background: #ffffff;
  transition: all 0.18s ease;
  font-size: 0.9rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  outline: none;
}
textarea { min-height: 5.5rem; resize: vertical; }
label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.3rem; color: #1e293b; }
.field { margin-bottom: 0.9rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 600; cursor: pointer; }
.check input { width: auto; cursor: pointer; }

/* ---------- Panels & Dashboard Stats ---------- */
.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 1.3rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}
.panel > header {
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.panel > header h2 { font-size: 1.08rem; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.panel .body { padding: 1.2rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat {
  background: linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c), black 25%) 100%);
  border: 1px solid color-mix(in srgb, var(--c), transparent 30%);
  border-radius: 18px;
  padding: 1.5rem;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px -5px color-mix(in srgb, var(--c), transparent 50%), 
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  isolation: isolate;
  cursor: pointer;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.stat::after {
  content: '';
  position: absolute;
  bottom: -35px;
  right: -35px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.08;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
  z-index: -1;
}

.stat:hover {
  text-decoration: none;
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 22px 35px -10px color-mix(in srgb, var(--c), transparent 40%),
              0 10px 15px -5px rgba(0, 0, 0, 0.15);
  border-color: color-mix(in srgb, var(--c), white 30%);
}

.stat:hover::after {
  transform: scale(1.8) translate(-10px, -10px);
  opacity: 0.15;
}

.stat b {
  font-size: 2.6rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.stat span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

a.stat:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 5px 15px color-mix(in srgb, var(--c), transparent 60%);
}

/* ---------- Tasks & List View ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.trow {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem 0.9rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  border-left: 5px solid var(--pc, var(--low));
  align-items: flex-start;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.trow:hover { background: #f8fafc; transform: translateX(2px); }
.trow:last-child { border-bottom: 0; }
.trow.overdue { background: #fff5f5; }
.trow .t { font-weight: 800; color: #0f172a; font-size: 0.98rem; transition: color 0.15s ease; }
.trow .t:hover { color: #0284c7; }
.p-Urgent { --pc: var(--urgent); }
.p-High { --pc: var(--high); }
.p-Medium { --pc: var(--med); }
.p-Low { --pc: var(--low); }

.meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.83rem; color: var(--ink2); margin-top: 0.25rem; }
.acts { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.55rem; }

.pill {
  display: inline-block;
  border-radius: 99px;
  padding: 0.15rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--low-soft);
  color: var(--low);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill.Urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.pill.High { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }
.pill.Medium { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.pill.Low { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.pill.Overdue { background: #be123c; color: #ffffff; box-shadow: 0 2px 6px rgba(190, 18, 60, 0.3); }
.pill.Completed, .pill.Verified { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.pill.Submitted { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.pill.InProgress { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.pill.OnHold, .pill.PendingInformation { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }
.pill.Returned { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.pill.followup { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }

.bar { height: 7px; background: #e2e8f0; border-radius: 9px; overflow: hidden; min-width: 75px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #16a34a, #22c55e); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: top; font-size: 0.9rem; }
th { font-size: 0.78rem; color: var(--ink2); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; background: #f8fafc; }
.tablewrap { overflow-x: auto; }
.empty { padding: 1.6rem; color: var(--ink2); text-align: center; font-size: 0.94rem; }

/* Filter Chips & Form */
.filters {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.filters select, .filters input { width: auto; min-width: 135px; }
.chips { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 30px;
  padding: 0.35rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.chip:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-1px);
}
.chip.on {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border-color: #0284c7;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid #e2e8f0; margin-bottom: 1.2rem; overflow-x: auto; }
.tabs button, .tabs .tab { text-decoration: none; color: var(--ink2); background: none; border: 0; padding: 0.65rem 1.1rem; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs .tab.on, .tabs button.on { border-color: var(--brand); color: #0f172a; font-weight: 800; }

.tl { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 0.85rem 1rem; }
.tl li:before { content: ""; position: absolute; left: -1.45rem; top: 0.35rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.kv { display: grid; grid-template-columns: 145px 1fr; gap: 0.4rem 0.9rem; font-size: 0.92rem; }
.kv dt { color: var(--ink2); font-weight: 500; }
.kv dd { margin: 0; font-weight: 700; }
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 1.2rem; }
.comment { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }

/* ---------- Kanban & Calendar ---------- */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(235px, 1fr)); gap: 0.8rem; overflow-x: auto; }
.kcol { background: #f1f5f9; border-radius: 12px; padding: 0.65rem; min-height: 330px; border: 1px solid #e2e8f0; }
.kcol.over { outline: 2px dashed var(--brand); }
.kcol h3 { padding: 0.35rem 0.4rem 0.65rem; display: flex; justify-content: space-between; font-size: 0.92rem; color: #1e293b; font-weight: 800; }
.kcard { background: #ffffff; border: 1px solid #e2e8f0; border-left: 4px solid var(--pc); border-radius: 10px; padding: 0.65rem 0.8rem; margin-bottom: 0.65rem; cursor: grab; font-size: 0.9rem; box-shadow: 0 2px 6px rgba(0,0,0,0.04); transition: transform 0.15s ease; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.07); }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid #e2e8f0; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px -2px rgba(0,0,0,0.04); }
.cal .dh { background: #f1f5f9; padding: 0.45rem 0.7rem; font-size: 0.82rem; font-weight: 800; color: #334155; }
.cal .day { min-height: 105px; border-top: 1px solid #e2e8f0; border-left: 1px solid #e2e8f0; padding: 0.35rem; font-size: 0.8rem; overflow: hidden; }
.cal .day.dim { background: #f8fafc; color: #94a3b8; }
.cal .day.today { background: var(--brand-soft); }
.ev { display: block; border-radius: 4px; padding: 2px 0.45rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; background: var(--med-soft); color: var(--med); font-weight: 700; text-decoration: none; font-size: 0.76rem; }
.ev.followup { background: var(--fu-soft); color: var(--fu); }
.ev.reminder { background: #f1f5f9; color: #475569; }
.ev.meeting { background: var(--verify-soft); color: var(--verify); }
.ev.recurring { background: var(--low-soft); color: var(--low); }
.ev.overdue { background: var(--over-soft); color: var(--over); }
.ev.Urgent { background: var(--urgent-soft); color: var(--urgent); }

/* ---------- Modals & Toasts ---------- */
#modal-root .back { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal { background: #ffffff; border-radius: 16px; max-width: 590px; width: 100%; max-height: 92vh; overflow: auto; padding: 1.4rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); }
.modal h2 { margin-bottom: 1rem; }
.modal .foot { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.9rem; }
#toast-root { position: fixed; bottom: 1.3rem; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.toast { background: #0f172a; color: #ffffff; padding: 0.65rem 1.2rem; border-radius: 10px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); font-weight: 600; font-size: 0.92rem; }
.toast.err { background: var(--urgent); }

/* ---------- Login Screen Styling ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #0f172a 0%, #020617 100%);
  padding: 1.5rem;
}
.login {
  max-width: 430px;
  width: 100%;
  background: #ffffff;
  border-radius: 18px;
  padding: 2.3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.login-header { text-align: center; margin-bottom: 1.3rem; }
.login-logo { width: 84px; height: 84px; margin-bottom: 0.7rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2)); }
.login-header h1 { font-size: 1.65rem; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: -0.02em; }
.login-sub { font-size: 0.86rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 0.07em; margin: 0.25rem 0 0; }
.login-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}
.login-footer strong { color: #0284c7; }

.err { color: var(--urgent); font-size: 0.88rem; margin: 0.45rem 0; font-weight: 600; }
.preview { background: var(--brand-soft); border-radius: var(--r); padding: 0.65rem 0.9rem; font-size: 0.88rem; margin-top: 0.5rem; }
.unread { background: #f0f9ff; font-weight: 700; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 0.85rem 0.95rem 5.5rem; }
  .detail { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #091a2b; z-index: 20; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid rgba(255,255,255,0.1); }
  .tabbar a { flex: 1; text-align: center; color: #94a3b8; padding: 0.55rem 0.1rem; font-size: 0.7rem; text-decoration: none; }
  .tabbar a.on { color: #ffffff; font-weight: 700; background: #0d2842; }
  .kanban { grid-template-columns: repeat(6, 80vw); }
  .cal .day { min-height: 64px; }
  .cal .ev { font-size: 0.62rem; }
  .quick button { padding: 0.45rem 0.65rem; }
}
/* ---------- Stylish Multi-Select Check List Widget ---------- */
.stylish-assign-widget {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 0.2rem;
}

.stylish-assign-widget:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.stylish-assign-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stylish-assign-search {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.35rem 0.65rem !important;
  font-size: 0.82rem !important;
  background: #ffffff !important;
}

.stylish-assign-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.stylish-btn-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.stylish-btn-link:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.stylish-count-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #bae6fd;
  white-space: nowrap;
}

.stylish-check-list {
  max-height: 195px;
  overflow-y: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stylish-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  border: 1px solid #f1f5f9;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  margin-bottom: 0 !important;
}

.stylish-check-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.stylish-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.stylish-check-item.selected {
  background: #f0f9ff;
  border-color: #7dd3fc;
  box-shadow: 0 1px 5px rgba(2, 132, 199, 0.12);
}

.stylish-item-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25);
}

.stylish-item-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0284c7;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.stylish-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.stylish-item-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stylish-item-sub {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media print {
  .side, .top, .tabbar, .no-print, .acts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .panel { break-inside: avoid; }
  body { background: #ffffff; }
}

/* ---------- Flashing Pending / Private Task Menu Indicator ---------- */
@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px #ff4d4f); }
  50% { transform: scale(1.2); opacity: 0.85; filter: drop-shadow(0 0 8px #f59e0b); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px #ff4d4f); }
}

.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  margin-left: auto;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.75);
  animation: pulseGlow 1.2s infinite ease-in-out;
}

