:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #6c7588;
  --subtle: #96a0b3;
  --line: #e3e8f0;
  --line-dark: #d4dbe7;
  --nav: #111827;
  --nav-soft: #1d2738;
  --primary: #4f64e8;
  --primary-dark: #3c50d4;
  --primary-soft: #eef0ff;
  --danger: #c83945;
  --danger-soft: #fff0f1;
  --warning: #a46900;
  --warning-soft: #fff6dc;
  --success: #187a50;
  --success-soft: #eaf8f1;
  --blue: #3b67d6;
  --blue-soft: #eaf0ff;
  --purple: #7654c4;
  --purple-soft: #f2edff;
  --green: #19775d;
  --green-soft: #e8f7f1;
  --shadow: 0 12px 34px rgba(27, 39, 63, .07);
  --shadow-soft: 0 5px 18px rgba(27, 39, 63, .05);
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: -.01em;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea { color: var(--text); }
textarea { resize: vertical; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 274px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 274px;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #f8fafc;
  background: var(--nav);
  border-right: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 5px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark, .auth-logo {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-weight: 900; letter-spacing: -.05em;
  background: linear-gradient(145deg, #6c78ff, #35b9c9);
  box-shadow: 0 9px 26px rgba(79,100,232,.3);
}
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; color: #94a0b4; font-size: 12px; margin-top: 1px; }
.account-card { display: flex; gap: 10px; align-items: center; margin: 16px 0 20px; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #243050; background: #dbe2f6; font-weight: 800; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 13px; }
.account-copy span { color: #98a4b7; font-size: 11px; margin-top: 2px; }
.nav-section { display: grid; gap: 5px; margin-bottom: 19px; }
.nav-label { margin: 0 8px 5px; color: #707d92; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.nav-link { min-height: 44px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; border-radius: 11px; color: #bcc6d5; transition: .18s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-link.active { color: #fff; background: #27334a; box-shadow: inset 3px 0 0 #7584ff; }
.nav-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.07); font-size: 14px; }
.project-dot { flex: 0 0 auto; width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 900; letter-spacing: -.04em; }
.project-dot.small { width: 25px; height: 25px; border-radius: 7px; font-size: 9px; }
.project-dot.blue, .project-logo.blue { color: var(--blue); background: var(--blue-soft); }
.project-dot.purple, .project-logo.purple { color: var(--purple); background: var(--purple-soft); }
.project-dot.green, .project-logo.green { color: var(--green); background: var(--green-soft); }
.nav-project-copy { min-width: 0; }
.nav-project-copy strong, .nav-project-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-project-copy strong { font-size: 13px; color: inherit; }
.nav-project-copy small { color: #7f8ca1; font-size: 9px; margin-top: 1px; }
.sidebar-spacer { flex: 1; min-height: 20px; }
.sidebar-actions { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-text-link, .sidebar-text-button { color: #96a1b3; font-size: 11px; }
.sidebar-text-link:hover, .sidebar-text-button:hover { color: #fff; }
.sidebar-text-button { padding: 0; border: 0; background: transparent; }
.sidebar-footnote { margin: 4px 5px 0; color: #637086; font-size: 10px; }
.main-content { grid-column: 2; min-width: 0; padding: 31px clamp(22px, 3.2vw, 46px) 70px; }
.mobile-bar, .sidebar-overlay { display: none; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.page-header.compact { align-items: center; }
.page-header h1 { margin: 0; font-size: clamp(27px, 3vw, 38px); line-height: 1.16; letter-spacing: -.045em; }
.page-header p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button { min-height: 40px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--text); background: #fff; box-shadow: 0 2px 8px rgba(31,41,55,.025); font-size: 13px; font-weight: 750; transition: .15s ease; }
.button:hover { transform: translateY(-1px); border-color: #bfc8d6; box-shadow: 0 5px 14px rgba(31,41,55,.06); }
.button.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.danger { color: var(--danger); background: #fff; border-color: #ebc5ca; }
.button.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.button.small { min-height: 33px; padding: 6px 10px; font-size: 11px; }
.button.wide { width: 100%; }
.text-link { color: var(--primary); font-size: 12px; font-weight: 750; }
.text-link:hover { text-decoration: underline; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; min-width: 210px; padding: 7px; display: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.dropdown.open .dropdown-menu { display: grid; }
.dropdown-menu a { padding: 9px 10px; display: flex; align-items: center; gap: 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.dropdown-menu a:hover { background: var(--panel-soft); }

.flash { position: fixed; top: 20px; right: 24px; z-index: 100; max-width: 430px; padding: 12px 14px; display: flex; align-items: center; gap: 14px; border-radius: 11px; border: 1px solid #ccd5ff; color: #35439a; background: #f0f2ff; box-shadow: var(--shadow); font-size: 13px; }
.flash.success { color: var(--success); border-color: #b9e5d1; background: var(--success-soft); }
.flash.error { color: var(--danger); border-color: #efc6cb; background: var(--danger-soft); }
.flash button { margin-left: auto; padding: 0; border: 0; color: inherit; background: transparent; font-size: 18px; }
.flash.hiding { opacity: 0; transform: translateY(-8px); transition: .25s; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 31px; }
.kpi-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-soft); }
.kpi-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.kpi-card strong { display: block; margin: 5px 0 2px; font-size: 28px; line-height: 1; letter-spacing: -.05em; }
.kpi-card small { display: block; color: var(--subtle); font-size: 9px; }
.kpi-card.accent { border-color: #cbd1ff; background: linear-gradient(145deg, #fff, #f3f4ff); }
.kpi-card.warning { border-color: #f0ddb0; background: linear-gradient(145deg, #fff, #fff9e8); }
.kpi-card.danger { border-color: #efc9ce; background: linear-gradient(145deg, #fff, #fff2f3); }
.kpi-card.danger strong { color: var(--danger); }
.section-block { margin-top: 31px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.section-title-row h2, .panel-header h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.project-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-summary { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); transition: .16s ease; }
.project-summary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.project-summary.blue:hover { border-color: #c5d2f7; }
.project-summary.purple:hover { border-color: #d8caf8; }
.project-summary.green:hover { border-color: #bfe1d4; }
.project-summary-top { display: flex; align-items: center; gap: 11px; }
.project-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 12px; font-weight: 900; }
.project-logo.large { width: 52px; height: 52px; border-radius: 15px; font-size: 14px; }
.project-summary-top div { min-width: 0; }
.project-summary-top strong, .project-summary-top small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-summary-top strong { font-size: 14px; }
.project-summary-top small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.project-summary-top .arrow { margin-left: auto; color: var(--subtle); }
.project-stats { margin: 18px 0 15px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.project-stats div { padding: 12px 4px; text-align: center; border-right: 1px solid var(--line); }
.project-stats div:last-child { border-right: 0; }
.project-stats span, .project-stats strong { display: block; }
.project-stats span { color: var(--muted); font-size: 9px; }
.project-stats strong { margin-top: 2px; font-size: 18px; }
.risk-number { color: var(--danger); }
.progress-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.progress-row strong { color: var(--text); }
.progress-track, .card-progress, .mini-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.progress-track { margin-top: 7px; }
.progress-track i, .card-progress i, .mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.project-summary.purple .progress-track i { background: var(--purple); }
.project-summary.green .progress-track i { background: var(--green); }
.next-deadline { margin-top: 13px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 10px; }
.next-deadline > span { color: var(--muted); }
.next-deadline > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.next-deadline.muted { color: var(--subtle); }

.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-soft); }
.dashboard-columns { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 16px; }
.panel-header { padding: 18px 19px 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.panel-count { padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #f0f2f6; font-size: 10px; font-weight: 750; }
.work-list { padding: 0 10px 10px; }
.work-row { padding: 11px 9px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); border-radius: 8px; }
.work-row:hover { background: var(--panel-soft); }
.work-main { min-width: 0; }
.work-main strong, .work-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-main strong { font-size: 12px; }
.work-main small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.due { display: inline-flex; align-items: center; white-space: nowrap; font-style: normal; font-size: 10px; font-weight: 800; }
.due.danger { color: var(--danger); }
.due.warning { color: var(--warning); }
.due.normal { color: var(--primary); }
.due.done { color: var(--success); }
.due.muted { color: var(--subtle); }
.risk-chip, .priority, .stage-pill { display: inline-flex; align-items: center; width: max-content; white-space: nowrap; border-radius: 999px; font-size: 9px; font-weight: 750; }
.risk-chip { padding: 4px 7px; }
.risk-높음 { color: var(--danger); background: var(--danger-soft); }
.risk-보통 { color: var(--warning); background: var(--warning-soft); }
.risk-정상 { color: var(--success); background: var(--success-soft); }
.priority { padding: 3px 7px; }
.priority-높음 { color: var(--danger); background: var(--danger-soft); }
.priority-보통 { color: #526076; background: #eef1f5; }
.priority-낮음 { color: var(--success); background: var(--success-soft); }
.stage-pill { padding: 5px 8px; color: #48536b; background: #eff2f6; }
.attention-list { padding: 0 12px 12px; display: grid; gap: 8px; }
.attention-card { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.attention-card:hover { border-color: var(--line-dark); background: #fff; }
.attention-top { display: flex; align-items: center; justify-content: space-between; }
.mini-project { font-size: 9px; font-weight: 900; }
.mini-project.blue { color: var(--blue); }.mini-project.purple { color: var(--purple); }.mini-project.green { color: var(--green); }
.attention-card > strong { display: block; margin-top: 7px; font-size: 12px; }
.attention-card p { margin: 4px 0 9px; color: var(--muted); font-size: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.attention-card > div:last-child { display: flex; gap: 9px; color: var(--subtle); font-size: 9px; }
.empty-state { min-height: 130px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.empty-state p { margin: 0; font-size: 12px; }
.empty-state.success div { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-soft); font-weight: 900; }
.empty-state.large { min-height: 65vh; }
.empty-state.large h1 { margin: 4px 0 0; font-size: 27px; }
.empty-state.large p { max-width: 520px; font-size: 13px; }
.empty-icon { font-size: 42px; }
.activity-preview { padding: 7px 15px; }
.activity-row { min-height: 42px; display: grid; grid-template-columns: 90px 100px 110px minmax(0,1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.activity-row:last-child { border-bottom: 0; }
.activity-row .activity-time { color: var(--subtle); }
.activity-row em { color: var(--muted); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.project-heading { display: flex; align-items: center; gap: 14px; }
.detail-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.view-toolbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.view-tabs { display: flex; gap: 4px; }
.view-tab { padding: 10px 13px 11px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 12px; font-weight: 750; }
.view-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.archive-toggle { padding-bottom: 7px; display: flex; align-items: center; gap: 4px; }
.archive-toggle a { padding: 5px 8px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.archive-toggle a.active { color: var(--text); background: #e9edf3; }
.filter-bar { min-height: 57px; margin-bottom: 15px; padding: 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.filter-bar select, .filter-bar input { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-dark); border-radius: 9px; outline: none; background: #fff; font-size: 11px; }
.filter-bar select:focus, .filter-bar input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #97a4ef; box-shadow: 0 0 0 3px rgba(79,100,232,.1); }
.search-field { flex: 1 1 260px; min-width: 180px; position: relative; }
.search-field span { position: absolute; left: 11px; top: 7px; color: var(--subtle); }
.search-field input { width: 100%; padding-left: 29px; }
.result-count { margin-left: auto; padding: 0 8px; color: var(--muted); font-size: 10px; }
.kanban-wrap { min-width: 0; }
.kanban-board { padding-bottom: 15px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.kanban-column { flex: 0 0 282px; scroll-snap-align: start; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #eef1f6; }
.kanban-column > header { padding: 2px 3px 10px; display: flex; justify-content: space-between; color: #48536b; font-size: 11px; font-weight: 800; }
.kanban-column > header strong { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 999px; background: #fff; font-size: 9px; }
.kanban-dropzone { min-height: 145px; display: grid; align-content: start; gap: 8px; border-radius: 11px; transition: .15s; }
.kanban-dropzone.drag-over { padding: 5px; outline: 2px dashed #8b99ec; background: rgba(255,255,255,.55); }
.kanban-card { border: 1px solid #dfe4ec; border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(31,41,55,.04); transition: .15s; }
.kanban-card:hover { transform: translateY(-1px); border-color: #c8d0dd; box-shadow: 0 7px 18px rgba(31,41,55,.08); }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card.dragging { opacity: .45; transform: rotate(1deg); }
.kanban-card.high-risk { border-left: 3px solid var(--danger); }
.card-link { display: block; padding: 13px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.kanban-card h3 { margin: 9px 0 4px; font-size: 13px; line-height: 1.3; letter-spacing: -.025em; }
.kanban-card p { margin: 0; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { margin-top: 12px; display: flex; justify-content: space-between; gap: 7px; color: var(--subtle); font-size: 9px; }
.card-progress { margin-top: 9px; height: 4px; }
.drop-empty { min-height: 74px; display: grid; place-items: center; border: 1px dashed #d4dae4; border-radius: 10px; color: #9ba5b5; font-size: 9px; }
.kanban-hint { margin: 1px 3px 0; color: var(--subtle); font-size: 9px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 810px; }
.data-table th { padding: 12px 14px; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; letter-spacing: .04em; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 11px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfe; }
.data-table td small { display: block; max-width: 330px; margin-top: 3px; color: var(--subtle); font-size: 9px; }
.table-title { font-weight: 800; }
.table-title:hover { color: var(--primary); }
.calendar-panel { overflow: hidden; }
.calendar-header { padding: 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.calendar-header h2 { margin: 0; font-size: 17px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-weekdays { color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); text-align: center; font-size: 9px; font-weight: 800; }
.calendar-weekdays span { padding: 8px; border-right: 1px solid var(--line); }
.calendar-day { min-height: 125px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-day.outside { color: #b4bdca; background: #fafbfc; }
.calendar-day.today { box-shadow: inset 0 0 0 2px #8996ec; }
.day-number { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 700; }
.calendar-day.today .day-number { color: #fff; background: var(--primary); }
.calendar-items { margin-top: 5px; display: grid; gap: 4px; }
.calendar-item { padding: 5px 6px; border-left: 2px solid #aeb8ca; border-radius: 6px; background: #f4f6f9; }
.calendar-item:hover { background: #eef1f6; }
.calendar-item strong, .calendar-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-item strong { font-size: 8px; }.calendar-item small { color: var(--muted); font-size: 7px; }
.risk-border-높음 { border-left-color: var(--danger); }.risk-border-보통 { border-left-color: #d3951d; }.risk-border-정상 { border-left-color: var(--success); }

.editor-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.65fr); gap: 16px; align-items: start; }
.form-panel { padding: 20px; }
.form-section-title { margin-bottom: 18px; display: flex; align-items: flex-start; gap: 11px; }
.form-section-title > span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 900; }
.form-section-title h2 { margin: 0; font-size: 16px; }.form-section-title p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-stack { display: grid; gap: 14px; }
.field { min-width: 0; display: grid; gap: 6px; }
.field > span { color: #4d586d; font-size: 10px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; outline: none; font-size: 12px; }
.field textarea { line-height: 1.55; }
.field.full, .form-actions.full { grid-column: 1 / -1; }
.field-help { color: var(--subtle); font-size: 9px; }
.form-actions { display: flex; align-items: center; gap: 8px; }
.sticky-form-card { position: sticky; top: 25px; grid-column: 2; grid-row: 1 / span 2; }
.form-submit-box { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-submit-box small { display: block; margin-top: 8px; color: var(--subtle); font-size: 9px; text-align: center; }
.auto-name-preview { margin-bottom: 16px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #dbe0ff; border-radius: 11px; color: #4a579c; background: #f2f4ff; }
.auto-name-preview span { font-size: 10px; font-weight: 700; }.auto-name-preview strong { font-size: 18px; letter-spacing: -.03em; }
.narrow-panel { max-width: 720px; margin: 0 auto; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-soft); }
.notice { margin-bottom: 18px; padding: 13px; display: grid; gap: 3px; border-radius: 10px; font-size: 11px; }
.notice.warning { color: #765310; background: var(--warning-soft); border: 1px solid #edd8a2; }
.notice span { opacity: .85; }
.form-error { padding: 11px 12px; border: 1px solid #edc3c8; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 11px; }

.detail-header h1 { max-width: 850px; }
.detail-header > div:first-child > p:last-child { max-width: 850px; }
.detail-kpis { margin-bottom: 16px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.detail-kpis article { min-height: 100px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-soft); }
.detail-kpis article > span { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.detail-kpis article > strong { display: block; margin-top: 7px; font-size: 14px; }
.detail-kpis article > small { display: block; margin-top: 3px; color: var(--subtle); font-size: 9px; }
.mini-progress { margin-top: 12px; }
.detail-columns { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.58fr); gap: 16px; align-items: start; }
.detail-main, .detail-side { min-width: 0; display: grid; gap: 16px; }
.detail-panel { padding-bottom: 18px; }
.detail-list { margin: 0; padding: 0 19px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 20px; }
.detail-list > div { padding: 11px 0; border-top: 1px solid var(--line); }
.detail-list .full { grid-column: 1/-1; }
.detail-list .blocked { margin-top: 8px; padding: 12px; border: 1px solid #f0c6cb; border-radius: 9px; color: var(--danger); background: var(--danger-soft); }
.detail-list dt { color: var(--muted); font-size: 9px; }.detail-list dd { margin: 3px 0 0; font-size: 11px; font-weight: 650; white-space: pre-line; }
.cycle-timeline { padding: 2px 19px 15px; display: grid; }
.cycle-card { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px; }
.cycle-card:not(:last-child)::before { content: ""; position: absolute; top: 32px; bottom: 0; left: 16px; width: 1px; background: var(--line-dark); }
.cycle-marker { position: relative; z-index: 1; width: 33px; height: 33px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px #cfd5ff; font-size: 11px; font-weight: 900; }
.cycle-body { margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.cycle-top { display: flex; justify-content: space-between; gap: 10px; }
.cycle-top > div { display: flex; align-items: center; gap: 8px; }.cycle-top strong { font-size: 12px; }
.cycle-body > p { margin: 8px 0; font-size: 11px; white-space: pre-line; }
.cycle-meta { display: flex; flex-wrap: wrap; gap: 5px 11px; color: var(--muted); font-size: 8px; }
.validation-metrics { margin-top: 11px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.validation-metrics div { padding: 8px; text-align: center; border-right: 1px solid var(--line); }.validation-metrics div:last-child { border-right: 0; }
.validation-metrics span, .validation-metrics strong { display: block; }.validation-metrics span { color: var(--muted); font-size: 8px; }.validation-metrics strong { margin-top: 2px; font-size: 11px; }
.add-cycle { margin: 4px 19px 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.add-cycle summary { padding: 12px; color: var(--primary); background: #f8f9ff; font-size: 11px; font-weight: 800; cursor: pointer; }
.add-cycle form { padding: 16px; }
.action-panel { padding: 18px; }
.action-panel h2 { margin: 0 0 13px; font-size: 17px; }
.next-action-stage, .next-action-owner, .next-action-due { padding: 9px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); font-size: 10px; }
.action-panel .button { margin-top: 13px; }
.mini-activity-list { padding: 0 18px; display: grid; }
.mini-activity-list > div { padding: 9px 0; border-top: 1px solid var(--line); }
.mini-activity-list span { color: var(--subtle); font-size: 8px; }.mini-activity-list strong { margin-left: 7px; font-size: 9px; }.mini-activity-list p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.danger-zone { padding: 17px; border-color: #efcdd1; background: #fffafb; }
.danger-zone h2 { margin: 0; color: var(--danger); font-size: 14px; }.danger-zone p { margin: 4px 0 13px; color: var(--muted); font-size: 9px; }
.muted-text { color: var(--muted); font-size: 10px; }

.admin-grid { display: grid; grid-template-columns: minmax(280px,.62fr) minmax(0,1.38fr); gap: 16px; align-items: start; }
.create-user-card { position: sticky; top: 24px; }
.project-checks { margin: 0; padding: 11px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; }
.project-checks legend { padding: 0 5px; color: var(--muted); font-size: 9px; font-weight: 750; }
.project-checks label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 650; }
.project-checks input { accent-color: var(--primary); }
.project-checks.compact { grid-template-columns: repeat(3, 1fr); }
.user-list { display: grid; gap: 12px; }
.user-card { padding: 17px; }
.user-card.inactive { opacity: .68; }
.user-card-head { display: flex; align-items: center; gap: 11px; }
.large-avatar { width: 42px; height: 42px; }
.user-card-head h2 { margin: 0; font-size: 15px; }.user-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.account-status { margin-left: auto; padding: 4px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.account-status.active { color: var(--success); background: var(--success-soft); }.account-status.inactive { color: var(--danger); background: var(--danger-soft); }
.admin-account-note { margin-top: 14px; padding: 12px; display: grid; gap: 2px; border-radius: 9px; color: #49568d; background: var(--primary-soft); font-size: 10px; }.admin-account-note span { opacity: .8; }
.user-permission-form { margin-top: 14px; display: grid; grid-template-columns: minmax(150px,.55fr) minmax(260px,1fr) auto; align-items: end; gap: 10px; }
.switch-row { align-self: center; display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; }
.switch-row input { display: none; }
.switch { width: 32px; height: 18px; padding: 2px; border-radius: 999px; background: #c8ced8; transition: .15s; }
.switch::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .15s; }
.switch-row input:checked + .switch { background: var(--primary); }.switch-row input:checked + .switch::after { transform: translateX(14px); }
.password-reset { margin-top: 11px; border-top: 1px solid var(--line); }
.password-reset summary { padding-top: 10px; color: var(--muted); font-size: 9px; cursor: pointer; }
.password-reset form { margin-top: 8px; display: flex; gap: 7px; }.password-reset input { flex: 1; min-height: 33px; padding: 6px 9px; border: 1px solid var(--line-dark); border-radius: 8px; font-size: 10px; }
.compact-filter { width: max-content; max-width: 100%; }
.activity-table { min-width: 920px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(430px,.85fr); background: #0f1726; }
.auth-intro { padding: clamp(45px,7vw,100px); display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 20% 10%, rgba(92,112,255,.26), transparent 37%), radial-gradient(circle at 80% 80%, rgba(38,190,190,.15), transparent 34%); }
.auth-badge { width: max-content; padding: 6px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #aeb9d0; background: rgba(255,255,255,.055); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.auth-intro h1 { max-width: 760px; margin: 26px 0 18px; font-size: clamp(36px,5vw,68px); line-height: 1.08; letter-spacing: -.055em; }
.auth-intro > p { max-width: 650px; margin: 0; color: #a9b4c8; font-size: clamp(13px,1.4vw,17px); line-height: 1.75; }
.auth-process { margin-top: 45px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.auth-process span { padding: 8px 11px; border-radius: 8px; color: #d9dfeb; background: rgba(255,255,255,.075); font-size: 11px; font-weight: 700; }.auth-process i { color: #6e7d97; font-style: normal; }
.auth-card-wrap { padding: 35px; display: grid; place-items: center; background: #f5f7fb; }
.auth-card { width: min(100%, 420px); padding: 32px; display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,38,.16); }
.auth-card h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }.auth-card > div:nth-child(2) p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.login-help { padding: 11px; display: grid; gap: 3px; border-radius: 9px; color: #5d6680; background: #f3f5f9; font-size: 9px; }
.login-help code { color: var(--primary); font-size: 10px; font-weight: 800; }

@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .detail-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .user-permission-form { grid-template-columns: 1fr 1.3fr; }
  .user-permission-form > .button, .switch-row { justify-self: start; }
}
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: .22s ease; box-shadow: 18px 0 45px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 35; display: none; background: rgba(7,11,20,.45); }
  .sidebar-overlay.open { display: block; }
  .mobile-bar { position: sticky; top: 0; z-index: 30; height: 54px; padding: 0 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
  .mobile-bar strong { font-size: 12px; }.mobile-bar span { color: var(--muted); font-size: 9px; }
  .mobile-menu { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .main-content { padding: 25px 20px 60px; }
  .project-summary-grid, .dashboard-columns { grid-template-columns: 1fr; }
  .editor-layout { grid-template-columns: 1fr; }
  .sticky-form-card { position: static; grid-column: auto; grid-row: auto; }
  .detail-columns { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: repeat(2,1fr); }
  .admin-grid { grid-template-columns: 1fr; }.create-user-card { position: static; }
  .auth-page { grid-template-columns: 1fr; }.auth-intro { min-height: 46vh; padding: 55px 35px; }.auth-card-wrap { padding: 30px 20px; }
}
@media (max-width: 720px) {
  .page-header { display: grid; }.header-actions { justify-content: flex-start; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .project-heading { align-items: flex-start; }
  .view-toolbar { display: grid; overflow-x: auto; }.view-tabs { overflow-x: auto; }.archive-toggle { justify-content: flex-start; }
  .filter-bar { align-items: stretch; flex-wrap: wrap; }.search-field { flex-basis: 100%; }.filter-bar select { flex: 1; }.result-count { width: 100%; margin: 0; padding: 3px; }
  .work-row { grid-template-columns: auto minmax(0,1fr) auto; }.work-row .risk-chip { display: none; }
  .detail-side { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }.detail-list .full { grid-column: auto; }
  .project-checks.compact { grid-template-columns: 1fr; }
  .user-permission-form { grid-template-columns: 1fr; }
  .calendar-day { min-height: 90px; padding: 4px; }.calendar-item small { display: none; }.calendar-item { padding: 4px; }
  .activity-row { grid-template-columns: 72px 80px 90px minmax(0,1fr); }
  .auth-intro h1 { font-size: 38px; }.auth-card { padding: 24px; }
}
@media (max-width: 480px) {
  .main-content { padding-inline: 14px; }
  .kpi-grid { gap: 8px; }.kpi-card { padding: 13px; }.kpi-card strong { font-size: 23px; }
  .project-summary { padding: 15px; }
  .detail-kpis { grid-template-columns: 1fr 1fr; }
  .validation-metrics { grid-template-columns: 1fr; }.validation-metrics div { border-right: 0; border-bottom: 1px solid var(--line); }.validation-metrics div:last-child { border-bottom: 0; }
  .calendar-weekdays span { padding-inline: 2px; }.calendar-day { min-height: 74px; }.calendar-item strong { font-size: 7px; }
  .auth-intro { padding: 42px 22px; }.auth-process { margin-top: 28px; }.auth-card-wrap { padding: 18px 12px; }.auth-card { border-radius: 16px; }
}

.demo-banner { margin: -4px 0 17px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #d6dcfb; border-radius: 12px; color: #47558d; background: #f2f4ff; }
.demo-banner div { min-width: 0; }
.demo-banner strong, .demo-banner span { display: block; }
.demo-banner strong { font-size: 11px; }
.demo-banner span { margin-top: 2px; color: #6e78a1; font-size: 9px; }
.demo-banner form { flex: 0 0 auto; }
@media (max-width: 640px) { .demo-banner { align-items: flex-start; flex-direction: column; } }

/* v1.2 · editable project settings */
.project-stats.dynamic {
  grid-template-columns: repeat(var(--metric-count, 3), minmax(52px, 1fr));
  overflow-x: auto;
}
.project-stats.dynamic div { min-width: 52px; }
.project-stats .metric-danger strong { color: var(--danger); }
.project-stats .metric-warning strong { color: var(--warning); }
.project-stats .metric-success strong { color: var(--success); }

.settings-notice {
  margin: -4px 0 18px;
  color: #41518a;
  background: var(--primary-soft);
  border: 1px solid #d8ddfb;
}
.settings-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.settings-project-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.settings-project-card.blue { border-top: 3px solid var(--blue); }
.settings-project-card.purple { border-top: 3px solid var(--purple); }
.settings-project-card.green { border-top: 3px solid var(--green); }
.settings-project-head { display: flex; align-items: flex-start; gap: 12px; }
.settings-project-head > div { min-width: 0; }
.settings-project-head .eyebrow { margin-bottom: 2px; }
.settings-project-head h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  letter-spacing: -.035em;
}
.settings-project-head > div > span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.settings-card-meta {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.settings-card-meta div { padding: 11px 5px; text-align: center; border-right: 1px solid var(--line); }
.settings-card-meta div:last-child { border-right: 0; }
.settings-card-meta span, .settings-card-meta strong { display: block; }
.settings-card-meta span { color: var(--muted); font-size: 8px; }
.settings-card-meta strong { margin-top: 2px; font-size: 16px; }
.settings-metric-preview { min-height: 37px; padding: 11px 0 2px; display: flex; flex-wrap: wrap; gap: 5px; }
.settings-metric-preview span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #4b5872;
  background: #f0f2f6;
  font-size: 8px;
  font-weight: 750;
}
.settings-card-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }

.settings-layout { display: grid; gap: 18px; }
.settings-panel { padding: 22px; }
.settings-section-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.settings-section-header h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.settings-section-header > div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.settings-basic-grid { max-width: 1050px; }
.settings-divider { height: 1px; margin: 24px 0; background: var(--line); }
.settings-subheading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.settings-subheading h3 { margin: 0; font-size: 15px; }
.settings-subheading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.settings-limit { padding: 4px 8px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 800; }
.metric-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.metric-editor-head, .metric-editor-row {
  display: grid;
  grid-template-columns: 56px minmax(130px, .55fr) minmax(240px, 1fr);
  align-items: center;
}
.metric-editor-head { min-height: 36px; color: var(--muted); background: #f8fafc; font-size: 9px; font-weight: 800; }
.metric-editor-head span { padding: 8px 11px; }
.metric-editor-row { min-height: 50px; border-top: 1px solid var(--line); }
.metric-editor-row strong { padding: 0 14px; color: var(--subtle); font-size: 10px; }
.metric-editor-row input, .metric-editor-row select {
  min-width: 0;
  min-height: 36px;
  margin: 6px 9px 6px 0;
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: #fff;
  outline: none;
  font-size: 11px;
}
.metric-editor-row input:focus, .metric-editor-row select:focus,
.stage-editor-row input:focus { border-color: #97a4ef; box-shadow: 0 0 0 3px rgba(79,100,232,.1); }
.settings-example {
  margin-top: 11px;
  padding: 10px 12px;
  display: flex;
  gap: 9px;
  border-radius: 9px;
  color: #56607b;
  background: #f6f7fa;
  font-size: 9px;
}
.settings-example strong { flex: 0 0 auto; color: var(--primary); }

.workflow-help-grid {
  margin-bottom: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.workflow-help-grid div { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; }
.workflow-help-grid strong, .workflow-help-grid span { display: block; }
.workflow-help-grid strong { font-size: 10px; }
.workflow-help-grid span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.stage-editor { overflow-x: auto; }
.stage-editor-head, .stage-editor-row {
  min-width: 860px;
  display: grid;
  grid-template-columns: 64px minmax(220px, 1fr) repeat(5, 88px);
  align-items: center;
}
.stage-editor-head {
  min-height: 36px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
  font-size: 8px;
  font-weight: 800;
}
.stage-editor-head span:nth-child(2) { text-align: left; }
.stage-editor-list { min-width: 860px; border-inline: 1px solid var(--line); }
.stage-editor-row { min-height: 53px; padding: 6px 7px; border-bottom: 1px solid var(--line); transition: .15s; }
.stage-editor-row:has(.stage-delete input:checked), .stage-editor-row.marked-delete { opacity: .48; background: #fff6f6; }
.stage-editor-row input[type="number"], .stage-editor-row .stage-name {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  outline: none;
  font-size: 11px;
}
.stage-order { width: 48px; text-align: center; }
.stage-name { width: calc(100% - 10px); }
.stage-check, .stage-delete { display: grid; place-items: center; gap: 2px; color: var(--muted); font-size: 7px; cursor: pointer; }
.stage-check input, .stage-delete input { width: 16px; height: 16px; accent-color: var(--primary); }
.stage-delete { color: var(--danger); }
.stage-delete input { accent-color: var(--danger); }
.stage-editor > .button { margin-top: 10px; }
.settings-warning { margin: 14px 0 0; }

@media (max-width: 1240px) {
  .settings-project-grid { grid-template-columns: 1fr; }
  .workflow-help-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .settings-section-header { display: grid; }
  .settings-section-header .button { width: max-content; }
  .metric-editor { overflow-x: auto; }
  .metric-editor-head, .metric-editor-row { min-width: 620px; }
  .workflow-help-grid { grid-template-columns: 1fr; }
  .settings-example { display: grid; }
  .full-on-mobile { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .settings-panel { padding: 15px; }
  .settings-card-meta { grid-template-columns: repeat(2, 1fr); }
  .settings-card-meta div:nth-child(2) { border-right: 0; }
  .settings-card-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* v1.3 · dynamic projects, dashboard cards and editable terminology */
:root {
  --teal: #167c82;
  --teal-soft: #e7f7f7;
  --orange: #b46718;
  --orange-soft: #fff3e4;
  --rose: #b54d68;
  --rose-soft: #fdeef3;
}
.project-dot.teal, .project-logo.teal { color: var(--teal); background: var(--teal-soft); }
.project-dot.orange, .project-logo.orange { color: var(--orange); background: var(--orange-soft); }
.project-dot.rose, .project-logo.rose { color: var(--rose); background: var(--rose-soft); }
.mini-project.teal { color: var(--teal); }
.mini-project.orange { color: var(--orange); }
.mini-project.rose { color: var(--rose); }
.project-summary.teal:hover { border-color: #addfe1; }
.project-summary.orange:hover { border-color: #ecd0ad; }
.project-summary.rose:hover { border-color: #ebbecb; }
.project-summary.teal .progress-track i { background: var(--teal); }
.project-summary.orange .progress-track i { background: var(--orange); }
.project-summary.rose .progress-track i { background: var(--rose); }
.settings-project-card.teal { border-top: 3px solid var(--teal); }
.settings-project-card.orange { border-top: 3px solid var(--orange); }
.settings-project-card.rose { border-top: 3px solid var(--rose); }
.nav-empty { margin: 2px 10px; color: #6f7b8f; font-size: 10px; }

.kpi-grid.dynamic-kpis { grid-template-columns: repeat(var(--kpi-count, 6), minmax(0, 1fr)); }
.kpi-card.success { border-color: #b9e5d1; background: linear-gradient(145deg, #fff, #effaf5); }
.kpi-card.success strong { color: var(--success); }
.project-empty-state { min-height: 180px; border: 1px dashed var(--line-dark); border-radius: var(--radius-lg); background: rgba(255,255,255,.5); }

.settings-management-section { margin-top: 25px; }
.split-actions { justify-content: space-between; align-items: center; }
.split-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.ghost-danger { color: var(--danger); background: #fff; border-color: #efc6cb; }
.removed-projects-section { padding-top: 6px; }
.removed-project-list { display: grid; gap: 10px; }
.removed-project-row { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; opacity: .86; }
.removed-project-copy { min-width: 0; }
.removed-project-copy strong, .removed-project-copy span { display: block; }
.removed-project-copy strong { font-size: 13px; }
.removed-project-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.project-create-form { max-width: 1180px; }
.project-template-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.project-template-option { cursor: pointer; }
.project-template-option input { position: absolute; opacity: 0; pointer-events: none; }
.template-card { min-height: 126px; padding: 16px; display: grid; align-content: start; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfd; transition: .16s ease; }
.template-card strong { font-size: 13px; }
.template-card small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.project-template-option:hover .template-card { border-color: #bdc6e8; background: #fff; }
.project-template-option input:checked + .template-card { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(79,100,232,.09); }
.field small { display: block; margin-top: 4px; color: var(--subtle); font-size: 8px; }

.dashboard-settings-layout { display: grid; grid-template-columns: 1fr; }
.full-width-settings { min-width: 0; }
.metric-editor-head.global, .metric-editor-row.global { grid-template-columns: 50px minmax(130px,.55fr) minmax(160px,.75fr) minmax(240px,1.1fr) minmax(105px,.45fr); }
.ui-text-groups { display: grid; gap: 15px; }
.ui-text-group { margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfd; }
.ui-text-group legend { padding: 0 7px; font-size: 14px; font-weight: 850; }
.ui-text-group > p { margin: -2px 0 13px; color: var(--muted); font-size: 10px; }
.ui-text-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.sticky-settings-actions { position: sticky; bottom: 12px; z-index: 5; margin-top: 20px; padding: 10px; justify-content: flex-end; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }

@media (max-width: 1380px) {
  .project-template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ui-text-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi-grid.dynamic-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .metric-editor.global { overflow-x: auto; }
  .metric-editor-head.global, .metric-editor-row.global { min-width: 1000px; }
  .ui-text-grid { grid-template-columns: 1fr; }
  .removed-project-row { grid-template-columns: auto minmax(0,1fr); }
  .removed-project-row form { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .project-template-grid { grid-template-columns: 1fr; }
  .kpi-grid.dynamic-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-actions { align-items: stretch; flex-direction: column; }
  .split-actions form .button { width: 100%; }
}

/* --------------------------------------------------------------------------
   v1.4 · Team Foundation / Invitation / Assignment / Notification / PWA
   -------------------------------------------------------------------------- */
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 999px; color: #fff; background: #e34f5f; font-size: 10px; box-shadow: 0 4px 12px rgba(227,79,95,.3);
}
.sidebar-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
.mobile-bell { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); }
.mobile-bell em { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; color: #fff; background: var(--danger); font-size: 9px; font-style: normal; }
.mobile-bottom-nav { display: none; }

.auth-secondary-link { display: block; margin-top: 4px; color: var(--primary); text-align: center; font-size: 12px; font-weight: 750; }
.signup-security-note { margin-top: 28px; padding: 16px; display: grid; gap: 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.07); }
.signup-security-note strong { font-size: 13px; }
.signup-security-note span { color: rgba(255,255,255,.68); font-size: 11px; }
.signup-card { width: min(620px, 100%); }
.invite-summary-inline { padding: 11px 13px; display: flex; justify-content: space-between; gap: 12px; border-radius: 11px; color: #35439a; background: var(--primary-soft); font-size: 11px; }
.invite-summary-inline strong, .invite-summary-inline span { display: block; }
.approval-wait-card { padding: 16px; display: grid; gap: 4px; border: 1px solid #f0ddb0; border-radius: 13px; color: #7e5704; background: var(--warning-soft); }
.approval-wait-card.approved { color: var(--success); border-color: #b9e5d1; background: var(--success-soft); }
.approval-wait-card span { font-size: 11px; }
.signup-complete-card { gap: 17px; text-align: center; }

.new-invite-result { margin-bottom: 22px; padding: 21px; display: grid; grid-template-columns: minmax(220px,.8fr) minmax(300px,1fr); gap: 13px 24px; align-items: center; border: 1px solid #bac8ff; border-radius: 18px; background: linear-gradient(135deg,#fff,#eef2ff); box-shadow: var(--shadow-soft); }
.new-invite-result > div:first-child { grid-row: 1 / 3; }
.new-invite-result h2 { margin: 0; }
.new-invite-result p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.invite-code-copy, .invite-link-copy { min-width: 0; display: flex; gap: 8px; }
.invite-code-copy code, .invite-link-copy code { min-width: 0; flex: 1; padding: 11px 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 800; }
.invite-code-copy code { font-size: 17px; letter-spacing: .08em; }
.invite-link-copy code { color: var(--muted); font-size: 10px; }
.collaboration-admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.permission-matrix { margin: 0; padding: 13px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.permission-matrix legend { padding: 0 5px; font-size: 11px; font-weight: 800; }
.permission-matrix > label { display: grid; grid-template-columns: minmax(0,1fr) minmax(118px,.55fr); gap: 10px; align-items: center; }
.permission-matrix > label > span { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.permission-matrix select { width: 100%; min-height: 35px; padding: 6px 8px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; font-size: 10px; }
.team-management-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.team-admin-card { padding: 18px; }
.team-admin-card.inactive { opacity: .68; }
.team-card-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; }
.team-card-head h3 { margin: 0; font-size: 15px; }
.team-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.team-logo, .team-mini-icon { display: inline-grid; place-items: center; color: #12636b; background: #dff5f4; font-weight: 850; }
.team-logo { width: 42px; height: 42px; border-radius: 13px; }
.team-mini-icon { width: 25px; height: 25px; border-radius: 8px; font-size: 10px; }
.compact-switch { margin: 0; }
.mini-avatar { flex: 0 0 auto; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; color: #3d4b69; background: #e5eaf5; font-size: 9px; font-style: normal; font-weight: 800; }
.responsive-table-panel { overflow: hidden; }
.invite-table td strong, .invite-table td small { display: block; }
.invite-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.invite-scope-list { display: flex; flex-wrap: wrap; gap: 4px; }
.invite-scope-list span { padding: 3px 6px; border-radius: 7px; color: #59647a; background: #f1f3f7; font-size: 9px; }
.form-help { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.user-admin-grid { align-items: start; }
.user-status-stack { margin-left: auto; display: grid; justify-items: end; gap: 5px; }
.user-status-stack small { color: var(--subtle); font-size: 8px; }
.approval-status { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: #eef1f6; font-size: 9px; font-weight: 800; }
.approval-status.status-pending { color: var(--warning); background: var(--warning-soft); }
.approval-status.status-rejected { color: var(--danger); background: var(--danger-soft); }
.approval-status.status-approved { color: var(--success); background: var(--success-soft); }
.pending-approval-actions { margin: 13px 0; padding: 13px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 9px; align-items: center; border: 1px solid #f0ddb0; border-radius: 12px; background: var(--warning-soft); }
.pending-approval-actions strong, .pending-approval-actions span { display: block; }
.pending-approval-actions strong { font-size: 11px; }
.pending-approval-actions span { margin-top: 3px; color: #806221; font-size: 9px; }
.user-toggle-row { display: flex; flex-wrap: wrap; gap: 18px; }

.task-summary-strip { margin-bottom: 16px; padding: 13px 15px; display: flex; align-items: center; gap: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-soft); }
.task-summary-strip > div { min-width: 75px; display: grid; gap: 1px; }
.task-summary-strip span { color: var(--muted); font-size: 9px; }
.task-summary-strip strong { font-size: 19px; }
.task-summary-strip .button { margin-left: auto; }
.task-filter-bar label:not(.search-field) { min-width: 180px; display: grid; gap: 4px; }
.task-filter-bar label > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.task-list-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.task-card { position: relative; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.task-card.priority-높음 { border-top: 3px solid var(--danger); }
.task-card.status-done { opacity: .72; }
.task-card-main { flex: 1; padding: 17px; display: flex; flex-direction: column; }
.task-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-card h2 { margin: 14px 0 6px; font-size: 15px; line-height: 1.35; }
.task-card-main > p { min-height: 42px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.task-scope-chip, .task-status-chip { padding: 4px 7px; border-radius: 999px; color: #5c6680; background: #eef1f6; font-size: 9px; font-weight: 800; }
.task-status-chip.status-open { color: #3751b4; background: #edf1ff; }
.task-status-chip.status-done { color: var(--success); background: var(--success-soft); }
.task-status-chip.status-cancelled { color: var(--muted); background: #eff1f4; }
.task-assignee-row { margin-top: 16px; padding: 10px; display: flex; align-items: center; gap: 8px; border-radius: 11px; background: #f7f9fc; }
.task-assignee-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.task-card-foot { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 5px; }
.task-card-foot span { padding: 4px 6px; border-radius: 6px; color: var(--muted); background: #f2f4f8; font-size: 8px; }
.task-quick-action { padding: 0 17px 15px; }
.task-empty-state { grid-column: 1 / -1; min-height: 260px; border: 1px dashed var(--line-dark); border-radius: 18px; background: rgba(255,255,255,.6); }
.task-edit-layout { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
.task-edit-layout > .panel { height: 100%; }
.scope-selector { display: grid; gap: 8px; }
.scope-selector label { cursor: pointer; }
.scope-selector input { position: absolute; opacity: 0; }
.scope-selector label > span { padding: 12px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfd; transition: .15s; }
.scope-selector label > span strong { font-size: 11px; }
.scope-selector label > span small { color: var(--muted); font-size: 9px; }
.scope-selector input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(79,100,232,.08); }
.scope-dependent[hidden] { display: none !important; }
.project-wide-preview { padding: 13px; display: flex; gap: 10px; align-items: center; border: 1px solid #cbd6f6; border-radius: 12px; background: #f5f8ff; }
.project-wide-preview strong, .project-wide-preview p { display: block; }
.project-wide-preview p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.reminder-options { margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; border: 1px solid var(--line); border-radius: 12px; }
.reminder-options legend { padding: 0 5px; font-size: 11px; font-weight: 800; }
.reminder-options label { padding: 8px; display: flex; gap: 7px; align-items: center; border-radius: 8px; background: #f7f9fc; font-size: 10px; }
.input-with-suffix { display: flex; align-items: center; }
.input-with-suffix input { border-radius: 10px 0 0 10px !important; }
.input-with-suffix span { align-self: stretch; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); background: #f5f7fa; font-size: 10px; }
.notification-limit-note { padding: 13px; border: 1px solid #f0ddb0; border-radius: 12px; background: var(--warning-soft); }
.notification-limit-note strong { font-size: 10px; }
.notification-limit-note p { margin: 5px 0 0; color: #765d26; font-size: 9px; line-height: 1.65; }
.sticky-form-actions { grid-column: 1 / -1; position: sticky; bottom: 12px; z-index: 6; padding: 11px; display: flex; justify-content: flex-end; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }

.task-detail-grid { grid-template-columns: minmax(0,1fr) minmax(280px,.36fr); }
.detail-main-panel { padding: 20px; }
.detail-section + .detail-section { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.detail-section h2 { margin: 0 0 12px; font-size: 17px; }
.notes-box { padding: 16px; border-radius: 12px; color: #4c576d; background: #f7f9fc; white-space: pre-wrap; font-size: 12px; line-height: 1.75; }
.assignee-feature-card { padding: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.assignee-feature-card strong { font-size: 13px; }
.assignee-feature-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.recipient-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.recipient-chip-list > span { padding: 6px 9px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; }
.recipient-chip-list em { color: var(--warning); font-size: 8px; font-style: normal; }
.detail-side-stack { display: grid; align-content: start; gap: 14px; }
.meta-card { padding: 17px; }
.meta-card h3 { margin: 0 0 10px; }
.meta-card dl { margin: 14px 0 0; display: grid; gap: 9px; }
.meta-card dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.meta-card dt { color: var(--muted); }
.meta-card dd { margin: 0; text-align: right; font-weight: 700; }
.task-due-large { display: block; font-size: 21px; letter-spacing: -.035em; }
.reminder-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.reminder-chip-list span { padding: 6px 8px; border-radius: 8px; color: #3c50a1; background: var(--primary-soft); font-size: 9px; font-weight: 750; }

.notification-capability-banner { margin-bottom: 16px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 14px; align-items: center; border: 1px solid #cbd6f6; border-radius: 14px; background: #f5f8ff; }
.notification-capability-banner strong, .notification-capability-banner span { display: block; }
.notification-capability-banner strong { font-size: 11px; }
.notification-capability-banner div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.capability-chip { padding: 5px 8px; border-radius: 999px; color: #3650a5; background: #e6ecff; font-size: 9px; font-weight: 800; }
.notification-center-list { display: grid; gap: 9px; }
.notification-row { padding: 13px 15px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-soft); }
.notification-row.unread { border-color: #c5cff8; background: linear-gradient(135deg,#fff,#f5f7ff); }
.notification-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 10px; }
.notification-copy { min-width: 0; }
.notification-copy > div { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.notification-copy strong { font-size: 12px; }
.notification-copy p { margin: 4px 0; color: #536077; font-size: 11px; }
.notification-copy small { color: var(--subtle); font-size: 8px; }
.notification-empty { min-height: 280px; border: 1px dashed var(--line-dark); border-radius: 18px; background: rgba(255,255,255,.6); }

.dashboard-task-panel { overflow: hidden; }
.dashboard-task-row { padding: 12px 15px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.dashboard-task-row:last-child { border-bottom: 0; }
.dashboard-task-row:hover { background: #fafbfe; }
.dashboard-task-row strong, .dashboard-task-row small { display: block; }
.dashboard-task-row strong { font-size: 11px; }
.dashboard-task-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.task-due-inline { color: #45506a; font-size: 10px; font-weight: 750; }
.panel-header-actions { display: flex; align-items: center; gap: 10px; }
.linked-task-list { border-top: 1px solid var(--line); }
.linked-task-row { padding: 11px 16px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); }
.linked-task-row:last-child { border-bottom: 0; }
.linked-task-row:hover { background: #fafbfe; }
.linked-task-row strong, .linked-task-row small { display: block; }
.linked-task-row strong { font-size: 10px; }
.linked-task-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.linked-task-row > span:nth-child(3) { color: var(--muted); font-size: 9px; }
.linked-task-row em { color: var(--subtle); font-style: normal; }
.quick-stage-field { margin: 12px 0 0; }

@media (max-width: 1180px) {
  .task-list-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task-edit-layout { grid-template-columns: 1fr 1fr; }
  .task-edit-layout > .panel:last-of-type { grid-column: 1 / -1; }
  .team-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .collaboration-admin-grid { grid-template-columns: 1fr; }
  .new-invite-result { grid-template-columns: 1fr; }
  .new-invite-result > div:first-child { grid-row: auto; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .detail-side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .main-content { padding-bottom: 28px; }
  .mobile-bottom-nav {
    position: fixed; z-index: 45; inset: auto 0 0; height: calc(62px + env(safe-area-inset-bottom));
    padding: 5px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4,1fr);
    border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(27,39,63,.08); backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav a, .mobile-bottom-nav button { padding: 5px; display: grid; justify-items: center; align-content: center; gap: 1px; border: 0; color: var(--muted); background: transparent; }
  .mobile-bottom-nav .active { color: var(--primary); }
  .mobile-bottom-nav span { font-size: 17px; line-height: 1; }
  .mobile-bottom-nav small { font-size: 9px; font-weight: 750; }
  .task-list-grid { grid-template-columns: 1fr; }
  .task-edit-layout { display: grid; grid-template-columns: 1fr; }
  .task-edit-layout > .panel:last-of-type { grid-column: auto; }
  .sticky-form-actions { bottom: 70px; }
  .task-summary-strip { align-items: stretch; flex-wrap: wrap; }
  .task-summary-strip .button { width: 100%; margin-left: 0; }
  .task-filter-bar label:not(.search-field) { min-width: 0; width: 100%; }
  .detail-side-stack { grid-template-columns: 1fr; }
  .notification-row { grid-template-columns: auto minmax(0,1fr); }
  .notification-row form { grid-column: 2; }
  .dashboard-task-row { grid-template-columns: auto minmax(0,1fr); }
  .task-due-inline { grid-column: 2; }
  .pending-approval-actions { grid-template-columns: 1fr 1fr; }
  .pending-approval-actions > div { grid-column: 1 / -1; }
  .new-invite-result { padding: 17px; }
  .invite-code-copy, .invite-link-copy { flex-direction: column; }
  .permission-matrix > label { grid-template-columns: 1fr; }
  .linked-task-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .linked-task-row > span:nth-child(3) { grid-column: 2; }
  .linked-task-row em { grid-column: 3; grid-row: 1 / 3; }
}

@media (max-width: 560px) {
  .reminder-options { grid-template-columns: 1fr; }
  .team-card-head { grid-template-columns: auto minmax(0,1fr); }
  .team-card-head .compact-switch { grid-column: 1 / -1; }
  .notification-capability-banner { align-items: flex-start; flex-direction: column; }
  .task-card-main { padding: 15px; }
  .task-quick-action { padding-inline: 15px; }
  .invite-table thead { display: none; }
  .invite-table, .invite-table tbody, .invite-table tr, .invite-table td { display: block; width: 100%; }
  .invite-table tr { padding: 12px; border-bottom: 1px solid var(--line); }
  .invite-table td { padding: 6px 0; border: 0; }
  .invite-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--subtle); font-size: 8px; font-weight: 800; }
}

/* v1.4 local silent launcher */
.local-shutdown-button { color: #fca5a5; }
.local-shutdown-button:hover { color: #fff; background: rgba(239,68,68,.16); }
.shutdown-page { max-width: 680px; margin: 12vh auto 0; text-align: center; padding: 54px 34px; }
.shutdown-page .shutdown-icon { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 22px; background: #e9f9f1; color: #16845b; font-size: 32px; font-weight: 800; }
.shutdown-page h1 { margin: 8px 0 14px; }
.shutdown-page p:last-child { color: var(--muted); line-height: 1.75; }
.shutdown-page code { background: #eef2f7; border-radius: 7px; padding: 3px 7px; color: #27364e; }


/* v1.5 · one-step workflow controls on kanban cards */
.card-stage-actions {
  padding: 0 10px 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.card-stage-button {
  min-width: 0;
  min-height: 32px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  color: #374151;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  transition: .14s ease;
}
.card-stage-button:hover:not(:disabled) {
  color: var(--primary);
  border-color: #aeb9ec;
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.card-stage-button:focus-visible {
  outline: 3px solid rgba(79,100,232,.18);
  outline-offset: 1px;
}
.card-stage-button:disabled {
  cursor: not-allowed;
  color: #a7afbc;
  border-color: #edf0f4;
  background: #f6f7f9;
  opacity: .66;
}
.kanban-card.stage-updating {
  opacity: .72;
  box-shadow: 0 0 0 3px rgba(79,100,232,.09);
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 720px) {
  .card-stage-button { min-height: 38px; font-size: 11px; }
}

/* --------------------------------------------------------------------------
   v1.7 · Overview Board / wrapped workflow columns
   -------------------------------------------------------------------------- */
.board-display-toolbar {
  margin-bottom: 12px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
}
.board-display-copy { min-width: 190px; margin-right: auto; }
.board-display-copy strong,
.board-display-copy span { display: block; }
.board-display-copy strong { color: #344157; font-size: 10px; }
.board-display-copy span { margin-top: 2px; color: var(--subtle); font-size: 8px; }
.board-layout-segment,
.board-column-segment {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fa;
}
.board-layout-segment button,
.board-column-segment button,
.board-default-button {
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  color: #687388;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  transition: .14s ease;
}
.board-layout-segment button:hover,
.board-column-segment button:hover,
.board-default-button:hover { color: var(--primary); background: #fff; }
.board-layout-segment button[aria-pressed="true"],
.board-column-segment button[aria-pressed="true"] {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 10px rgba(79,100,232,.22);
}
.board-column-segment > span { padding: 0 5px 0 4px; color: var(--subtle); font-size: 8px; font-weight: 800; white-space: nowrap; }
.board-column-segment button { min-width: 29px; padding-inline: 7px; }
.board-column-segment.is-hidden { display: none; }
.board-default-button { border: 1px solid var(--line); background: #fff; }

/* Default: wrapped grid that shows the whole workflow without horizontal scrolling. */
.kanban-board.board-layout-overview,
.kanban-board.board-layout-wide {
  display: grid;
  grid-template-columns: repeat(var(--board-columns, 4), minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.kanban-board.board-layout-overview .kanban-column,
.kanban-board.board-layout-wide .kanban-column {
  min-width: 0;
  width: auto;
  flex: none;
  scroll-snap-align: none;
}
.kanban-board.board-layout-overview .kanban-dropzone,
.kanban-board.board-layout-wide .kanban-dropzone { min-height: 122px; }

/* Overview mode keeps cards dense enough for four or five columns. */
.kanban-board.board-layout-overview .kanban-column { padding: 9px; }
.kanban-board.board-layout-overview .kanban-column > header { padding-bottom: 8px; }
.kanban-board.board-layout-overview .card-link { padding: 11px 11px 9px; }
.kanban-board.board-layout-overview .kanban-card h3 { margin-top: 7px; font-size: 12px; }
.kanban-board.board-layout-overview .card-meta { margin-top: 9px; }
.kanban-board.board-layout-overview .card-progress { margin-top: 7px; }
.kanban-board.board-layout-overview .card-stage-actions { padding: 0 8px 8px; gap: 5px; }
.kanban-board.board-layout-overview .card-stage-button { min-height: 29px; padding: 5px 7px; font-size: 9px; }

/* Wide mode is also wrapped, but intentionally limits a row to three columns. */
.kanban-board.board-layout-wide { --board-columns: 3 !important; gap: 14px; }
.kanban-board.board-layout-wide .kanban-column { padding: 11px; }
.kanban-board.board-layout-wide .card-link { padding: 14px; }

/* Optional legacy kanban mode. */
.kanban-board.board-layout-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 15px;
}
.kanban-board.board-layout-scroll .kanban-column {
  flex: 0 0 282px;
  min-width: 282px;
  scroll-snap-align: start;
}

/* Project settings: visual board-layout selector. */
.board-default-editor { display: grid; gap: 12px; }
.board-layout-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.board-layout-option { position: relative; cursor: pointer; }
.board-layout-option > input { position: absolute; opacity: 0; pointer-events: none; }
.board-layout-option-card {
  min-height: 148px;
  padding: 15px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfd;
  transition: .15s ease;
}
.board-layout-option-card strong { color: #344157; font-size: 12px; }
.board-layout-option-card small { color: var(--muted); font-size: 9px; line-height: 1.55; }
.board-layout-option:hover .board-layout-option-card { border-color: #bdc6e8; background: #fff; }
.board-layout-option > input:checked + .board-layout-option-card {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(79,100,232,.09);
}
.board-layout-option > input:focus-visible + .board-layout-option-card { outline: 3px solid rgba(79,100,232,.2); outline-offset: 2px; }
.board-layout-mini {
  align-self: end;
  height: 43px;
  padding: 5px;
  display: grid;
  gap: 4px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.board-layout-mini b { display: block; border-radius: 3px; background: #dce2ef; }
.board-layout-mini.overview { grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(2,1fr); }
.board-layout-mini.wide { grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(2,1fr); }
.board-layout-mini.scroll { grid-template-columns: repeat(5,42%); grid-template-rows: 1fr; }
.board-column-default { max-width: 410px; }

@media (max-width: 1500px) {
  .kanban-board.board-layout-overview.board-columns-5 { --board-columns: 4 !important; }
}
@media (max-width: 1240px) {
  .kanban-board.board-layout-overview { --board-columns: 3 !important; }
  .board-layout-option-grid { grid-template-columns: 1fr; }
  .board-layout-option-card { min-height: 118px; grid-template-columns: minmax(160px,.7fr) minmax(0,1fr); grid-template-rows: auto 1fr; column-gap: 14px; }
  .board-layout-option-card small { grid-column: 1; }
  .board-layout-mini { grid-column: 2; grid-row: 1 / 3; align-self: stretch; height: auto; }
}
@media (max-width: 980px) {
  .kanban-board.board-layout-overview,
  .kanban-board.board-layout-wide { --board-columns: 2 !important; }
  .board-display-copy { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .board-display-toolbar { align-items: stretch; }
  .board-layout-segment { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .board-layout-segment button { white-space: normal; }
  .board-column-segment { width: 100%; justify-content: center; }
  .board-default-button { width: 100%; }
  .kanban-board.board-layout-overview,
  .kanban-board.board-layout-wide { --board-columns: 1 !important; }
  .kanban-board.board-layout-overview .card-stage-button,
  .kanban-board.board-layout-wide .card-stage-button { min-height: 38px; font-size: 11px; }
}
@media (max-width: 520px) {
  .board-layout-option-card { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto 48px; }
  .board-layout-option-card small,
  .board-layout-mini { grid-column: 1; grid-row: auto; }
}

/* --------------------------------------------------------------------------
   v1.10 · Team Chat Dock + minimize / restore controls
   -------------------------------------------------------------------------- */
.sidebar-chat-launcher {
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
}
.chat-launch-button {
  width: 100%; min-height: 45px; padding: 7px; display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: center;
  border: 0; border-radius: 10px; color: #f7f9fc; background: transparent; text-align: left;
}
.chat-launch-button:hover, .chat-launch-button[aria-expanded="true"] { background: rgba(255,255,255,.075); }
.chat-launch-icon, .chat-dock-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  color: #dcfdf7; background: rgba(30,178,151,.2); font-size: 15px; font-weight: 900;
}
.chat-launch-copy { min-width: 0; }
.chat-launch-copy strong, .chat-launch-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-launch-copy strong { font-size: 12px; }
.chat-launch-copy small { color: #8e9aaf; font-size: 9px; margin-top: 1px; }
.chat-unread-badge, .chat-team-shortcuts em, .chat-room-badge, .mobile-chat-button em {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 99px; color: #fff; background: #e34f5f; font-size: 9px; font-style: normal; font-weight: 850;
}
.chat-team-shortcuts { display: grid; gap: 3px; margin-top: 4px; }
.chat-team-shortcuts > button {
  min-width: 0; width: 100%; padding: 5px 7px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 7px; align-items: center; border: 0; border-radius: 8px; color: #9da9ba; background: transparent; text-align: left;
}
.chat-team-shortcuts > button:hover { color: #fff; background: rgba(255,255,255,.055); }
.chat-team-shortcuts > button > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: #bdf5e7; background: rgba(25,119,93,.22); font-size: 9px; font-weight: 900; }
.chat-team-shortcuts strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.chat-team-shortcuts p { margin: 3px 5px 1px; color: #6f7b90; font-size: 9px; }

.team-chat-dock {
  position: fixed; z-index: 38; top: 14px; bottom: 14px; left: 286px; width: min(500px, calc(100vw - 304px));
  display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 24px 65px rgba(15,23,42,.22);
  opacity: 0; visibility: hidden; transform: translateX(-16px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
body.chat-dock-open .team-chat-dock { opacity: 1; visibility: visible; transform: translateX(0); }
.chat-dock-header {
  min-height: 62px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg,#fff,#fafbfd);
}
.chat-dock-heading {
  min-width: 0; padding: 0; display: flex; align-items: center; gap: 10px;
  border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer;
}
.chat-dock-heading:focus-visible { outline: 3px solid rgba(79,100,232,.18); outline-offset: 4px; border-radius: 10px; }
.chat-dock-heading-copy { min-width: 0; }
.chat-dock-header strong, .chat-dock-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-dock-header strong { font-size: 14px; }
.chat-dock-header small { color: var(--muted); font-size: 9px; margin-top: 1px; }
.chat-dock-header-actions { display: flex; gap: 5px; }
.chat-dock-header-actions a, .chat-dock-header-actions button {
  width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); background: #fff; font-size: 15px;
}
.chat-dock-header-actions a:hover, .chat-dock-header-actions button:hover { color: var(--primary); border-color: #bdc7ef; }
.chat-dock-unread-badge {
  min-width: 22px; height: 22px; padding: 0 6px; display: none; place-items: center;
  border-radius: 99px; color: #fff; background: #e34f5f; font-size: 9px; font-style: normal; font-weight: 850;
}
.team-chat-dock.is-minimized {
  top: auto; bottom: 14px; width: min(360px, calc(100vw - 304px)); height: 60px;
  grid-template-rows: 1fr; border-radius: 15px;
}
.team-chat-dock.is-minimized .chat-dock-header { min-height: 60px; padding: 9px 11px; border-bottom: 0; }
.team-chat-dock.is-minimized .chat-dock-body { display: none; }
.team-chat-dock.is-minimized .chat-dock-unread-badge:not([hidden]) { display: grid; }
.team-chat-dock.is-minimized .chat-dock-heading { flex: 1; }
.team-chat-dock.is-minimized .chat-dock-header-actions a { display: none; }
.chat-dock-body { min-height: 0; display: grid; grid-template-columns: 168px minmax(0,1fr); }
.chat-channel-pane { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); border-right: 1px solid var(--line); background: #f8fafc; }
.chat-team-selector-wrap { padding: 12px; border-bottom: 1px solid var(--line); }
.chat-team-selector-wrap label { display: block; margin: 0 0 5px; color: var(--subtle); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.chat-team-selector-wrap select { width: 100%; height: 34px; padding: 5px 8px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; font-size: 10px; font-weight: 750; }
.chat-room-tree { min-height: 0; padding: 8px; overflow-y: auto; }
.chat-loading { padding: 18px 8px; color: var(--subtle); font-size: 9px; text-align: center; }
.chat-tree-group { margin: 3px 0; }
.chat-tree-group > summary {
  padding: 6px 7px; display: flex; align-items: center; gap: 5px; border-radius: 7px; color: #667086;
  list-style: none; cursor: pointer; font-size: 9px; font-weight: 800;
}
.chat-tree-group > summary::-webkit-details-marker { display: none; }
.chat-tree-group > summary::before { content: "›"; width: 11px; color: #9ba5b5; transition: .14s; }
.chat-tree-group[open] > summary::before { transform: rotate(90deg); }
.chat-tree-group > summary:hover { color: var(--text); background: #eef2f7; }
.chat-tree-children { margin-left: 8px; padding-left: 5px; border-left: 1px solid #e2e7ef; }
.chat-room-button {
  width: 100%; min-width: 0; padding: 7px 7px; display: grid; grid-template-columns: 15px minmax(0,1fr) auto;
  gap: 5px; align-items: center; border: 0; border-radius: 8px; color: #697489; background: transparent; text-align: left;
}
.chat-room-button:hover { color: var(--text); background: #eef2f7; }
.chat-room-button.active { color: #314294; background: #e9edff; }
.chat-room-button > span:first-child { font-size: 11px; font-weight: 900; }
.chat-room-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750; }
.chat-room-badge { min-width: 17px; height: 17px; padding: 0 4px; font-size: 8px; }
.chat-tree-root-label { margin: 10px 7px 4px; color: #a0a9b8; font-size: 8px; font-weight: 850; letter-spacing: .07em; }

.chat-conversation-pane { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; background: #fff; }
.chat-room-header { min-height: 55px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.chat-room-header > div { min-width: 0; }
.chat-room-header strong, .chat-room-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-room-header strong { font-size: 13px; }
.chat-room-header small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.chat-mobile-back { display: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.chat-message-list { min-height: 0; padding: 15px 13px; overflow-y: auto; scroll-behavior: smooth; background: linear-gradient(180deg,#fbfcfe,#fff 18%); }
.chat-empty-conversation, .chat-membership-empty { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.chat-empty-conversation > span, .chat-membership-empty > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 20px; font-weight: 900; }
.chat-empty-conversation strong, .chat-membership-empty strong { color: var(--text); font-size: 13px; }
.chat-empty-conversation p, .chat-membership-empty p { max-width: 260px; margin: 0; font-size: 9px; }
.chat-message { margin: 0 0 12px; display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 8px; align-items: start; }
.chat-message.own { grid-template-columns: minmax(0,1fr); justify-items: end; }
.chat-message-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #33405a; background: #e3e9f3; font-size: 10px; font-weight: 850; }
.chat-message-main { min-width: 0; max-width: 86%; }
.chat-message-meta { margin-bottom: 3px; display: flex; align-items: baseline; gap: 6px; }
.chat-message-meta strong { font-size: 9px; }
.chat-message-meta time, .chat-message-edited { color: var(--subtle); font-size: 7px; }
.chat-message-bubble { padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; color: #273146; background: #fff; box-shadow: 0 3px 10px rgba(27,39,63,.04); font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.own .chat-message-main { display: grid; justify-items: end; }
.chat-message.own .chat-message-meta { justify-content: flex-end; }
.chat-message.own .chat-message-bubble { color: #2f3b8d; border-color: #ccd4ff; border-radius: 12px 4px 12px 12px; background: #eef1ff; }
.chat-message.deleted .chat-message-bubble { color: var(--subtle); border-style: dashed; background: #fafbfc; font-style: italic; }
.chat-message-actions { margin-top: 3px; display: flex; gap: 5px; opacity: 0; transition: .12s; }
.chat-message:hover .chat-message-actions, .chat-message:focus-within .chat-message-actions { opacity: 1; }
.chat-message-actions button { padding: 1px 4px; border: 0; color: var(--subtle); background: transparent; font-size: 7px; }
.chat-message-actions button:hover { color: var(--primary); text-decoration: underline; }
.chat-message-reactions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.chat-message.own .chat-message-reactions { justify-content: flex-end; }
.chat-reaction-item { position: relative; }
.chat-reaction-chip { min-height: 22px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: #526078; background: #fff; font-size: 9px; line-height: 1; }
.chat-reaction-chip:hover, .chat-reaction-chip.active { color: var(--primary); border-color: #aeb9ff; background: #eef1ff; }
.chat-reaction-people { position: absolute; z-index: 40; bottom: calc(100% + 5px); left: 0; display: none; min-width: max-content; max-width: 240px; padding: 5px 7px; border-radius: 6px; color: #fff; background: #263047; box-shadow: 0 6px 18px rgba(24,32,52,.24); font-size: 8px; white-space: normal; }
.chat-message.own .chat-reaction-people { right: 0; left: auto; }
.chat-reaction-item:hover .chat-reaction-people, .chat-reaction-item:focus-within .chat-reaction-people { display: block; }
.chat-reaction-picker { position: relative; }
.chat-reaction-picker > summary { padding: 1px 4px; color: var(--subtle); font-size: 7px; cursor: pointer; list-style: none; }
.chat-reaction-picker > summary::-webkit-details-marker { display: none; }
.chat-reaction-picker[open] > summary { color: var(--primary); }
.chat-reaction-picker > div { position: absolute; z-index: 45; bottom: calc(100% + 4px); left: 0; display: grid; grid-template-columns: repeat(6, 27px); gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgba(24,32,52,.18); }
.chat-message.own .chat-reaction-picker > div { right: 0; left: auto; }
.chat-reaction-picker > div button { width: 27px; height: 27px; padding: 0; border-radius: 6px; font-size: 15px; text-decoration: none !important; }
.chat-reaction-picker > div button:hover { background: #eef1ff; }
.chat-reaction-picker input { grid-column: 1 / -1; width: 174px; min-height: 30px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 9px; }
.chat-message-forwarded { min-width: 180px; margin-bottom: 5px; padding: 7px 8px; border-left: 3px solid #8795ef; border-radius: 5px; background: rgba(80,99,220,.08); }
.chat-message-forwarded small, .chat-message-forwarded strong, .chat-message-forwarded span { display: block; }
.chat-message-forwarded small { color: var(--subtle); font-size: 7px; }
.chat-message-forwarded strong { margin-top: 2px; color: #3e4b8d; font-size: 8px; }
.chat-message-forwarded span { margin-top: 2px; font-size: 9px; white-space: pre-wrap; }
.chat-forward-dialog { width: min(390px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(16,25,45,.3); }
.chat-forward-dialog::backdrop { background: rgba(18,28,48,.42); }
.chat-forward-dialog form { padding: 22px; }
.chat-forward-dialog h3 { margin: 0; font-size: 18px; }
.chat-forward-dialog p { margin: 7px 0 14px; color: var(--muted); font-size: 12px; }
.chat-forward-dialog select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.chat-forward-dialog form > div { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }
.chat-date-divider { margin: 13px 0; display: flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 7px; }
.chat-date-divider::before, .chat-date-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.chat-load-older { margin: 6px auto 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 8px; }
.chat-composer { padding: 10px; display: grid; gap: 7px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer[hidden], .chat-load-older[hidden], .chat-membership-empty[hidden] { display: none !important; }
.chat-composer-row { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: end; }
.chat-input-wrap { position: relative; min-width: 0; }
.chat-composer textarea { box-sizing: border-box; width: 100%; min-height: 58px; max-height: 150px; padding: 11px 12px; display: block; border: 1px solid var(--line-dark); border-radius: 10px; outline: none; resize: vertical; font-size: 10px; line-height: 1.45; }
.chat-composer textarea:focus { border-color: #9aa9ef; box-shadow: 0 0 0 3px rgba(79,100,232,.1); }
.chat-composer button { align-self: end; min-width: 48px; height: 40px; border: 0; border-radius: 10px; color: #fff; background: var(--primary); font-size: 10px; font-weight: 800; }
.chat-composer-row > button { min-width: 62px; height: 58px; }
.chat-composer button:disabled { opacity: .5; cursor: wait; }
.chat-reply-compose {
  min-width: 0; padding: 7px 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-left: 3px solid var(--primary); border-radius: 8px; color: #46516a; background: #f2f5ff;
}
.chat-reply-compose[hidden], .chat-mention-menu[hidden] { display: none !important; }
.chat-reply-compose > div { min-width: 0; }
.chat-reply-compose strong, .chat-reply-compose span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reply-compose strong { color: var(--primary); font-size: 8px; }
.chat-reply-compose span { margin-top: 1px; font-size: 9px; }
.chat-reply-compose > button { min-width: 24px; width: 24px; height: 24px; align-self: center; padding: 0; color: var(--muted); background: transparent; font-size: 14px; }
.chat-message-reply {
  width: 100%; margin-bottom: 5px; padding: 6px 8px; display: block; overflow: hidden;
  border: 0; border-left: 3px solid #aeb9e8; border-radius: 6px; color: #56617a; background: rgba(239,242,250,.9); text-align: left;
}
.chat-message-reply strong, .chat-message-reply span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-message-reply strong { color: #40509b; font-size: 8px; }
.chat-message-reply span { margin-top: 1px; font-size: 8px; }
.chat-message-reply:hover { background: #e7ebf7; }
.chat-message.highlight { animation: chat-message-highlight 1.8s ease; }
@keyframes chat-message-highlight { 0%,35% { filter: drop-shadow(0 0 6px rgba(79,100,232,.45)); } 100% { filter: none; } }
.chat-mention { padding: 0 2px; border-radius: 4px; color: #3448af; background: #e9edff; font-weight: 800; }
.chat-mention.is-me { color: #0b765f; background: #dff8f0; }
.chat-mention-menu {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(100% + 5px); max-height: 220px; padding: 5px;
  overflow-y: auto; border: 1px solid var(--line-dark); border-radius: 10px; background: #fff; box-shadow: 0 14px 35px rgba(15,23,42,.18);
}
.chat-mention-option { width: 100%; min-height: 38px; padding: 6px 8px; display: flex; gap: 7px; align-items: center; border: 0; border-radius: 7px; color: var(--text); background: transparent; text-align: left; }
.chat-mention-option:hover, .chat-mention-option.active { color: var(--primary); background: var(--primary-soft); }
.chat-mention-option strong { font-size: 9px; }
.chat-mention-option span { color: var(--muted); font-size: 8px; }
.chat-membership-empty { position: absolute; inset: 0; padding: 25px; background: #fff; z-index: 3; }

.app-notification-toast-stack { position: fixed; z-index: 90; top: 18px; right: 18px; width: min(350px, calc(100vw - 28px)); display: grid; gap: 8px; pointer-events: none; }
.app-notification-toast { padding: 13px 14px; display: grid; gap: 4px; border: 1px solid #c8d1f6; border-radius: 13px; color: var(--text); background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.2); pointer-events: auto; cursor: pointer; animation: app-toast-in .18s ease-out; }
.app-notification-toast strong { font-size: 11px; }
.app-notification-toast span { color: var(--muted); font-size: 9px; line-height: 1.5; }
@keyframes app-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav-notification-badge { min-width: 15px; height: 15px; padding: 0 4px; display: inline-grid; place-items: center; border-radius: 99px; color: #fff; background: #e34f5f; font-size: 7px; font-style: normal; }

.chat-home-guide { min-height: 260px; padding: 34px; display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 26px; align-items: center; }
.chat-home-visual { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 28px; color: #fff; background: linear-gradient(145deg,#20a584,#4f64e8); box-shadow: 0 18px 40px rgba(32,165,132,.22); font-size: 44px; font-weight: 900; }
.chat-home-guide h2 { margin: 0; font-size: 22px; }
.chat-home-guide p { max-width: 720px; margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.chat-access-rule-grid { margin-bottom: 26px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.chat-access-rule-grid article { padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.chat-access-rule-grid article > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 900; }
.chat-access-rule-grid strong { display: block; font-size: 12px; }
.chat-access-rule-grid p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.chat-admin-team { scroll-margin-top: 18px; }
.chat-team-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.chat-team-stats span, .chat-team-stats em { padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 9px; font-style: normal; }
.chat-team-stats strong { color: var(--text); }
.chat-team-stats em { color: var(--danger); border-color: #efc9cd; background: var(--danger-soft); }
.chat-admin-create-grid, .chat-structure-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.chat-admin-create-grid { margin-bottom: 14px; }
.chat-admin-create-grid h3 { margin: 0; font-size: 15px; }
.chat-default-switch { align-self: end; min-height: 42px; }
.chat-structure-panel { overflow: hidden; }
.chat-admin-list { padding: 8px 14px 14px; display: grid; gap: 6px; }
.chat-admin-row { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; overflow: hidden; }
.chat-admin-row.inactive { opacity: .62; }
.chat-admin-row > summary { min-height: 44px; padding: 9px 11px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; list-style: none; cursor: pointer; }
.chat-admin-row > summary::-webkit-details-marker { display: none; }
.chat-admin-row > summary:hover { background: #f4f6fa; }
.chat-admin-row > summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.chat-admin-row > summary small { color: var(--subtle); font-size: 8px; }
.chat-depth-line, .chat-room-hash { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--purple); background: var(--purple-soft); font-size: 10px; font-weight: 900; }
.chat-room-hash { color: var(--green); background: var(--green-soft); }
.chat-inline-editor { padding: 13px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-inline-editor .full { grid-column: 1 / -1; }
.chat-inline-editor > .button { align-self: end; }
.chat-inline-switches { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; grid-column: 1 / -1; }

@media (max-width: 1319px) {
  .team-chat-dock { width: min(470px, calc(100vw - 300px)); }
}
@media (max-width: 980px) {
  .team-chat-dock { left: 12px; right: 12px; width: auto; top: 66px; bottom: 74px; z-index: 50; }
  .team-chat-dock.is-minimized { top: auto; left: 12px; right: auto; bottom: 74px; width: min(360px, calc(100vw - 24px)); height: 58px; }
  body.chat-dock-open { overflow: hidden; }
  body.chat-dock-open.chat-dock-minimized { overflow: auto; }
  .sidebar-chat-launcher { margin-bottom: 10px; }
  .chat-access-rule-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .mobile-bottom-nav { grid-template-columns: repeat(5,1fr); }
  .mobile-chat-button small { position: relative; }
  .mobile-chat-button em { position: absolute; top: -14px; right: -13px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 7px; }
  .team-chat-dock { inset: 0 0 calc(62px + env(safe-area-inset-bottom)) 0; border: 0; border-radius: 0; }
  .team-chat-dock.is-minimized {
    inset: auto 10px calc(70px + env(safe-area-inset-bottom)) 10px;
    width: auto; height: 56px; border: 1px solid var(--line); border-radius: 14px;
  }
  .chat-dock-header { min-height: 56px; padding-top: max(10px, env(safe-area-inset-top)); }
  .team-chat-dock.is-minimized .chat-dock-header { min-height: 56px; padding: 8px 10px; }
  .chat-dock-body { grid-template-columns: 1fr; position: relative; overflow: hidden; }
  .chat-channel-pane, .chat-conversation-pane { position: absolute; inset: 0; transition: transform .2s ease; }
  .chat-channel-pane { border-right: 0; transform: translateX(0); }
  .chat-conversation-pane { transform: translateX(100%); }
  .team-chat-dock.mobile-room-open .chat-channel-pane { transform: translateX(-100%); }
  .team-chat-dock.mobile-room-open .chat-conversation-pane { transform: translateX(0); }
  .chat-mobile-back { display: grid; place-items: center; }
  .chat-team-selector-wrap { padding: 13px 16px; }
  .chat-room-tree { padding: 10px 14px; }
  .chat-room-button { min-height: 44px; padding: 10px; }
  .chat-room-button strong { font-size: 12px; }
  .chat-tree-group > summary { min-height: 38px; font-size: 11px; }
  .chat-message-list { padding: 15px 12px; }
  .chat-message-bubble { font-size: 12px; }
  .chat-composer textarea { font-size: 12px; }
  .chat-home-guide { grid-template-columns: 1fr; text-align: center; }
  .chat-home-visual { margin: 0 auto; }
  .chat-admin-create-grid, .chat-structure-grid { grid-template-columns: 1fr; }
  .chat-inline-editor { grid-template-columns: 1fr; }
  .chat-inline-editor .full, .chat-inline-switches { grid-column: auto; }
}
@media (max-width: 480px) {
  .chat-dock-header-actions a, .chat-dock-header-actions button { width: 30px; height: 30px; }
  .chat-message-main { max-width: 91%; }
  .chat-admin-row > summary { grid-template-columns: auto minmax(0,1fr); }
  .chat-admin-row > summary small { grid-column: 2; }
}

/* --------------------------------------------------------------------------
   v1.10 · Team chat drag ordering
   -------------------------------------------------------------------------- */
.chat-sort-hint {
  margin: 2px 3px 9px; padding: 8px 9px; display: grid;
  grid-template-columns: 22px minmax(0,1fr); gap: 0 7px; align-items: center;
  border: 1px solid #d8def8; border-radius: 9px; color: #59647a; background: #f1f4ff;
}
.chat-sort-hint > span {
  grid-row: 1 / span 2; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 7px; color: #4054c6; background: #e0e6ff; font-size: 12px; font-weight: 900;
}
.chat-sort-hint strong { font-size: 8px; letter-spacing: .04em; }
.chat-sort-hint small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7b8599; font-size: 7px; }
.chat-sort-container { min-width: 0; border-radius: 8px; transition: background .12s ease, box-shadow .12s ease; }
.chat-group-sort-container { min-height: 4px; }
.chat-room-sort-container { min-height: 7px; }
.chat-room-sort-item {
  min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center;
  border-radius: 8px; transition: opacity .12s ease, transform .12s ease, box-shadow .12s ease;
}
.chat-room-sort-item:not(.is-sortable) { grid-template-columns: minmax(0,1fr); }
.chat-sort-handle {
  width: 22px; height: 28px; margin-left: 1px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 7px; color: #a0a9b8; background: transparent;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.chat-sort-handle:hover, .chat-sort-handle:focus-visible { color: #4054c6; background: #e8ecff; outline: none; }
.chat-sort-handle:active { cursor: grabbing; }
.chat-tree-group > summary .chat-sort-handle { flex: 0 0 auto; width: 20px; height: 24px; margin-left: -2px; }
.chat-tree-group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sort-drop-placeholder {
  min-height: 27px; margin: 2px 1px; padding: 6px 8px; display: grid; place-items: center;
  border: 1px dashed #cdd5e3; border-radius: 8px; color: #9aa4b6; background: rgba(255,255,255,.55);
  font-size: 7px; text-align: center;
}
.chat-sort-drop-placeholder[hidden] { display: none !important; }
.chat-sort-target {
  background: rgba(79,100,232,.08);
  box-shadow: inset 0 0 0 2px rgba(79,100,232,.28);
}
.chat-sort-target > .chat-sort-drop-placeholder { color: #4054c6; border-color: #8fa0ef; background: #edf0ff; }
[data-chat-sort-item].is-dragging {
  z-index: 2; opacity: .48; pointer-events: none; transform: scale(.985);
  box-shadow: 0 10px 24px rgba(27,39,63,.12);
}
body.chat-order-dragging { user-select: none; -webkit-user-select: none; }
body.chat-order-dragging, body.chat-order-dragging * { cursor: grabbing !important; }
.chat-sort-saving { pointer-events: none; opacity: .72; }
.chat-sort-toast {
  position: absolute; z-index: 8; left: 50%; bottom: 14px; max-width: calc(100% - 28px);
  padding: 8px 12px; border-radius: 10px; color: #fff; background: #24314f;
  box-shadow: 0 10px 24px rgba(15,23,42,.22); font-size: 9px; font-weight: 750;
  opacity: 0; visibility: hidden; transform: translate(-50%,8px); transition: .16s ease;
}
.chat-sort-toast.show { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.chat-sort-toast.error { background: #a93442; }

/* v1.11 · Central server connection and remote-change feedback */
.sidebar-footnote { display: grid; gap: 5px; }
.connection-status { display: inline-flex; align-items: center; gap: 5px; color: var(--subtle); }
.connection-status i { width: 7px; height: 7px; border-radius: 50%; background: #a4adbb; box-shadow: 0 0 0 3px rgba(164,173,187,.13); }
.connection-status[data-state="online"] { color: #17836c; }
.connection-status[data-state="online"] i { background: #20a584; box-shadow: 0 0 0 3px rgba(32,165,132,.14); }
.connection-status[data-state="offline"], .connection-status[data-state="reconnecting"] { color: #b25a2d; }
.connection-status[data-state="offline"] i, .connection-status[data-state="reconnecting"] i { background: #df7c42; box-shadow: 0 0 0 3px rgba(223,124,66,.14); }

/* v1.12 · Account-linked reviewers and calendar history deadlines */
.collaborator-picker { position: relative; }
.collaborator-picker > summary { min-height: 42px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; cursor: pointer; list-style: none; }
.collaborator-picker > summary::-webkit-details-marker { display: none; }
.collaborator-picker > summary span { color: var(--muted); font-size: 9px; font-weight: 750; }
.collaborator-picker > summary strong { color: var(--primary); font-size: 10px; }
.collaborator-picker[open] > summary { border-color: #9aa9ef; box-shadow: 0 0 0 3px rgba(79,100,232,.1); }
.collaborator-options { position: absolute; z-index: 25; top: calc(100% + 5px); left: 0; right: 0; max-height: 250px; padding: 7px; display: grid; gap: 4px; overflow-y: auto; border: 1px solid var(--line-dark); border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(28,39,64,.16); }
.collaborator-options label { padding: 8px 9px; display: flex; align-items: center; gap: 9px; border-radius: 7px; cursor: pointer; }
.collaborator-options label:hover { background: #f3f5ff; }
.collaborator-options input { width: 16px; height: 16px; accent-color: var(--primary); }
.collaborator-options strong, .collaborator-options small { display: block; }
.collaborator-options strong { font-size: 10px; }.collaborator-options small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.collaborator-options p { margin: 4px; color: var(--muted); font-size: 9px; }
.collaborator-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.collaborator-chip { padding: 5px 8px; display: inline-flex; gap: 5px; border: 1px solid #d9def8; border-radius: 999px; color: #4b5683; background: #f4f6ff; font-size: 9px; }
.collaborator-chip strong { color: var(--primary); }.collaborator-note { color: var(--muted); font-size: 9px; }
.calendar-item.cycle-deadline { border-left-color: #6f61d7; background: #f3f0ff; }
.calendar-item.cycle-deadline:hover { background: #ebe6ff; }
.dashboard-task-row.deadline-cycle { background: linear-gradient(90deg,#f7f4ff,#fff); }
.remote-change-notice {
  position: fixed; z-index: 90; right: 18px; bottom: 18px; max-width: min(390px,calc(100vw - 36px));
  padding: 11px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #cbd4f5;
  border-radius: 12px; color: #314294; background: #f2f4ff; box-shadow: 0 14px 36px rgba(28,42,84,.18);
  font-size: 10px; font-weight: 750;
}
.remote-change-notice button { padding: 6px 9px; border: 0; border-radius: 8px; color: #fff; background: var(--primary); font-size: 9px; font-weight: 800; white-space: nowrap; }
.mobile-bottom-nav.no-chat { grid-template-columns: repeat(4,1fr); }

@media (max-width: 720px) {
  .chat-sort-hint { padding: 9px 10px; }
  .chat-sort-hint strong { font-size: 10px; }
  .chat-sort-hint small { font-size: 8px; }
  .chat-sort-handle { width: 30px; height: 40px; font-size: 16px; }
  .chat-tree-group > summary .chat-sort-handle { width: 28px; height: 34px; }
  .chat-sort-drop-placeholder { min-height: 38px; font-size: 9px; }
  .chat-sort-toast { bottom: 18px; font-size: 11px; }
}

/* v1.14 question assignment */
.assignment-page-header { margin-bottom: 16px; }
.assignment-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.assignment-summary article { padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-soft); }
.assignment-summary span, .assignment-summary strong { display: block; }
.assignment-summary span { color: var(--muted); font-size: 9px; font-weight: 750; }
.assignment-summary strong { margin-top: 6px; color: #25304a; font-size: 21px; }
.assignment-table-panel { padding: 0; overflow: hidden; }
.assignment-table td { vertical-align: top; }
.assignment-table td:nth-child(3) { min-width: 190px; }
.assignment-table td:nth-child(8) { min-width: 170px; white-space: normal; }
.assignment-assignees { display: flex; flex-wrap: wrap; gap: 3px; }
.assignment-assignees span { padding: 3px 6px; border: 1px solid #d9def8; border-radius: 999px; color: #465287; background: #f4f6ff; font-size: 8px; }
.assignment-assignees em { color: var(--danger); font-size: 8px; font-style: normal; }
.assignment-status { padding: 4px 7px; display: inline-flex; border-radius: 999px; color: #445170; background: #edf0f5; font-size: 8px; font-weight: 800; white-space: nowrap; }
.assignment-status.status-완료 { color: #237258; background: #e4f6ef; }
.assignment-status.status-출제-중, .assignment-status.status-수정 { color: #8a5b10; background: #fff3d9; }
.assignment-status.status-제출, .assignment-status.status-검토 { color: #4252a6; background: #ebeeff; }
.assignment-form { padding: 18px; }
.assignment-form-section { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.assignment-form-section .panel-header { margin-bottom: 13px; }
.assignment-user-grid { margin-bottom: 13px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.assignment-user-grid label { padding: 9px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.assignment-user-grid label:has(input:checked) { border-color: #9ba8f2; background: #f0f2ff; }
.assignment-user-grid input { width: 16px; height: 16px; accent-color: var(--primary); }
.assignment-user-grid strong, .assignment-user-grid small { display: block; }
.assignment-user-grid strong { font-size: 10px; }.assignment-user-grid small { color: var(--muted); font-size: 8px; }
.assignment-danger { margin-top: 14px; }
.assignment-import-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.6fr); gap: 14px; align-items: start; }
.assignment-import-form, .assignment-import-guide { padding: 20px; }
.assignment-file-drop { margin: 12px 0 16px; min-height: 220px; display: grid; place-items: center; align-content: center; gap: 6px; border: 2px dashed #cbd3ef; border-radius: 14px; text-align: center; background: #f8f9ff; cursor: pointer; }
.assignment-file-drop:hover { border-color: #8494e7; background: #f1f3ff; }
.assignment-file-drop > span { color: var(--primary); font-size: 34px; }
.assignment-file-drop strong { font-size: 14px; }.assignment-file-drop p { margin: 0; color: var(--muted); font-size: 9px; }
.assignment-file-drop input { margin-top: 10px; max-width: 100%; }
.assignment-import-guide ol { margin: 14px 0; padding-left: 20px; color: #4b5871; font-size: 10px; line-height: 1.8; }
.assignment-import-note { padding: 10px; border-radius: 8px; color: #40509b; background: #eef1ff; font-size: 9px; }
.assignment-import-warning { margin-bottom: 14px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 20px; border-color: #efcaca; background: #fff8f8; }
.assignment-import-warning strong { color: #a83c48; font-size: 11px; }.assignment-import-warning p, .assignment-import-warning span { color: #855c61; font-size: 9px; }
.assignment-preview-panel { padding: 18px; }
.assignment-preview-list { display: grid; gap: 8px; }
.assignment-preview-list details { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.assignment-preview-list summary { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; background: #f8f9fc; }
.assignment-preview-list summary strong, .assignment-preview-list summary span { display: block; }
.assignment-preview-list summary strong { font-size: 11px; }.assignment-preview-list summary span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.assignment-preview-list summary em { color: var(--primary); font-size: 9px; font-style: normal; font-weight: 800; }
.assignment-import-commit { position: sticky; bottom: 12px; margin-top: 14px; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid #bfc9f5; border-radius: 12px; background: #f2f4ff; box-shadow: 0 12px 32px rgba(32,46,93,.18); }
.assignment-import-commit p { margin: 0; color: #4b5789; font-size: 9px; }

@media (max-width: 900px) {
  .assignment-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assignment-user-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assignment-import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .assignment-summary { grid-template-columns: 1fr 1fr; }
  .assignment-user-grid { grid-template-columns: 1fr; }
  .assignment-import-commit { position: static; display: block; }
  .assignment-import-commit button { margin-top: 10px; width: 100%; }
}
