:root {
  --navy-950: #061c2c;
  --navy-900: #082f49;
  --navy-800: #0c3d5c;
  --navy-700: #155e75;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-100: #cffafe;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --green-600: #059669;
  --green-100: #d1fae5;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --yellow-600: #ca8a04;
  --yellow-100: #fef3c7;
  --slate-950: #0f172a;
  --slate-900: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(2, 20, 34, .18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  background: var(--slate-100);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--slate-500);
  background: radial-gradient(circle at 50% 30%, #e0f2fe 0, #f8fafc 34%, #eef2f7 100%);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--white);
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  box-shadow: 0 8px 20px rgba(8, 47, 73, .2);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

.brand-mark.large {
  width: 76px;
  height: 76px;
  border-radius: 22px;
}

.brand-mark.large svg {
  width: 52px;
  height: 52px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(480px, 1.05fr);
  background: var(--white);
}

.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 48px clamp(36px, 6vw, 92px);
  color: var(--white);
  background:
    radial-gradient(circle at 80% 18%, rgba(34, 211, 238, .28), transparent 28%),
    linear-gradient(145deg, #0b4866 0%, #082f49 46%, #061c2c 100%);
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 50%;
}

.login-visual::before {
  width: 560px;
  height: 560px;
  right: -250px;
  bottom: -180px;
}

.login-visual::after {
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: -60px;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(80px, 15vh, 150px);
}

.login-brand .brand-mark {
  color: var(--navy-900);
  background: var(--cyan-100);
  box-shadow: none;
}

.login-brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: .08em;
}

.login-brand span {
  display: block;
  margin-top: 2px;
  color: #bae6fd;
  font-size: 12px;
  letter-spacing: .12em;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 540px;
}

.login-copy .eyebrow {
  margin-bottom: 16px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.login-copy h1 span {
  color: #67e8f9;
}

.login-copy > p {
  max-width: 470px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.login-principles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 48px;
}

.login-principle {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
}

.login-principle i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #67e8f9;
  background: rgba(255, 255, 255, .08);
  font-style: normal;
  font-weight: 700;
}

.login-panel-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 42px 28px;
  background:
    linear-gradient(rgba(241, 245, 249, .86), rgba(248, 250, 252, .98)),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(148, 163, 184, .12) 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(148, 163, 184, .12) 39px 40px);
}

.login-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -.02em;
}

.login-card .subtext {
  margin: 0 0 28px;
  color: var(--slate-500);
}

.form-group {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.form-group label {
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 650;
}

.form-group .hint {
  color: var(--slate-400);
  font-size: 12px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
  border-radius: 11px;
  outline: none;
  background: var(--white);
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--cyan-600);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, .12);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--slate-400);
}

.input-icon {
  position: relative;
}

.input-icon .input {
  padding-left: 42px;
}

.input-icon svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--slate-400);
  transform: translateY(-50%);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 650;
  transition: transform .14s, border-color .14s, background-color .14s, color .14s;
}

.btn:hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: var(--white);
  border-color: var(--navy-900);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}

.btn-primary:hover {
  color: var(--white);
  border-color: var(--navy-800);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
}

.btn-accent {
  color: var(--white);
  border-color: var(--orange-600);
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
}

.btn-accent:hover {
  color: var(--white);
  border-color: var(--orange-600);
  background: var(--orange-600);
}

.btn-danger {
  color: var(--red-600);
  border-color: #fecaca;
  background: #fff5f5;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.btn-small {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  min-height: 48px;
}

.btn svg,
.icon-button svg {
  width: 17px;
  height: 17px;
}

.login-submit {
  margin-top: 8px;
}

.demo-accounts {
  margin-top: 24px;
  padding: 14px;
  border: 1px dashed var(--slate-300);
  border-radius: 12px;
  color: var(--slate-500);
  background: var(--slate-50);
  font-size: 12px;
}

.demo-accounts strong {
  display: block;
  margin-bottom: 5px;
  color: var(--slate-700);
}

.demo-accounts code {
  color: var(--navy-700);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.form-message {
  min-height: 20px;
  margin-top: 13px;
  color: var(--red-600);
  font-size: 13px;
}

.form-message.success {
  color: var(--green-600);
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px 18px;
  color: #dbeafe;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, .16), transparent 30%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 24px;
}

.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
  color: var(--navy-900);
  background: linear-gradient(135deg, #cffafe, #67e8f9);
  box-shadow: none;
}

.sidebar-brand strong {
  display: block;
  color: var(--white);
  font-size: 18px;
  letter-spacing: .08em;
}

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: #93c5fd;
  font-size: 10px;
  letter-spacing: .08em;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: #bfdbfe;
  border-radius: 11px;
  transition: color .16s, background-color .16s;
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, .07);
}

.nav-link.active {
  color: var(--white);
  background: rgba(6, 182, 212, .18);
  box-shadow: inset 3px 0 0 #22d3ee;
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  padding: 2px 7px;
  color: #fff;
  border-radius: 999px;
  background: var(--orange-500);
  font-size: 10px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.install-card {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
}

.install-card p {
  margin: 0 0 10px;
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.55;
}

.install-card .btn {
  width: 100%;
  min-height: 34px;
  color: #cffafe;
  border-color: rgba(103, 232, 249, .3);
  background: rgba(6, 182, 212, .12);
  box-shadow: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: var(--white);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--cyan-500), var(--cyan-600));
  font-size: 13px;
  font-weight: 750;
}

.avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.avatar.navy {
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
}

.avatar.orange {
  background: linear-gradient(145deg, var(--orange-500), var(--orange-600));
}

.sidebar-user-text {
  min-width: 0;
}

.sidebar-user-text strong,
.sidebar-user-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-text strong {
  color: var(--white);
  font-size: 13px;
}

.sidebar-user-text span {
  color: #93c5fd;
  font-size: 11px;
}

.main-area {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 0 clamp(18px, 3vw, 34px);
  border-bottom: 1px solid rgba(226, 232, 240, .85);
  background: rgba(248, 250, 252, .9);
  backdrop-filter: blur(15px);
}

.topbar-left,
.topbar-actions,
.inline-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-brand {
  display: none;
}

.topbar-title {
  color: var(--slate-500);
  font-size: 13px;
}

.topbar-title strong {
  color: var(--slate-900);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  border-radius: 11px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--red-600);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.icon-button:hover {
  color: var(--navy-700);
  border-color: var(--slate-300);
}

.page {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 34px) 60px;
  animation: page-in .25s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 2px 0 6px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.page-head p {
  margin: 0;
  color: var(--slate-500);
}

.eyebrow {
  margin: 0;
  color: var(--cyan-600);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 19px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--slate-100);
}

.kpi-card.danger::after { background: var(--red-100); }
.kpi-card.warning::after { background: var(--yellow-100); }
.kpi-card.success::after { background: var(--green-100); }
.kpi-card.info::after { background: var(--cyan-100); }

.kpi-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  color: var(--navy-700);
  border-radius: 10px;
  background: var(--slate-100);
}

.kpi-card.danger .kpi-icon { color: var(--red-600); background: var(--red-100); }
.kpi-card.warning .kpi-icon { color: var(--yellow-600); background: var(--yellow-100); }
.kpi-card.success .kpi-icon { color: var(--green-600); background: var(--green-100); }
.kpi-card.info .kpi-icon { color: var(--cyan-600); background: var(--cyan-100); }

.kpi-icon svg {
  width: 19px;
  height: 19px;
}

.kpi-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 3px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.kpi-label {
  position: relative;
  z-index: 1;
  color: var(--slate-500);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 19px 14px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.015em;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--slate-500);
  font-size: 12px;
}

.panel-body {
  padding: 0 19px 19px;
}

.panel-body.padded {
  padding-top: 4px;
}

.panel-link {
  color: var(--cyan-600);
  font-size: 12px;
  font-weight: 650;
}

.attention-list,
.activity-list,
.simple-list {
  display: grid;
  gap: 10px;
}

.attention-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 12px;
  background: var(--slate-50);
}

.attention-dot {
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: var(--slate-300);
}

.attention-item.red .attention-dot { background: var(--red-500, #ef4444); }
.attention-item.yellow .attention-dot { background: #eab308; }
.attention-item.green .attention-dot { background: #10b981; }

.attention-item strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-item span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-meta {
  color: var(--slate-500);
  font-size: 11px;
  text-align: right;
}

.risk-badge,
.status-pill,
.priority-pill,
.gate-pill,
.dept-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.risk-red,
.priority-urgent {
  color: #b91c1c;
  background: #fee2e2;
}

.risk-yellow,
.priority-high {
  color: #a16207;
  background: #fef3c7;
}

.risk-green,
.status-done,
.gate-passed {
  color: #047857;
  background: #d1fae5;
}

.status-doing,
.gate-doing,
.priority-normal {
  color: #0369a1;
  background: #e0f2fe;
}

.status-todo,
.gate-pending {
  color: var(--slate-600);
  background: var(--slate-100);
}

.gate-blocked,
.status-blocked {
  color: #b91c1c;
  background: #fee2e2;
}

.dept-市场商务部 { color: #9a3412; background: #ffedd5; }
.dept-技术工程部 { color: #075985; background: #e0f2fe; }
.dept-供应采购部 { color: #4c1d95; background: #ede9fe; }
.dept-维修室 { color: #854d0e; background: #fef9c3; }
.dept-管理层 { color: #0f766e; background: #ccfbf1; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--slate-100);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--slate-500);
  background: var(--slate-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background-color .14s;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.project-cell strong,
.owner-cell strong {
  display: block;
  font-size: 13px;
}

.project-cell span,
.owner-cell span {
  display: block;
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 11px;
}

.progress-cell {
  display: grid;
  gap: 6px;
  min-width: 130px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 10px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-600));
}

.progress-bar.red { background: linear-gradient(90deg, #f87171, #dc2626); }
.progress-bar.yellow { background: linear-gradient(90deg, #facc15, #ca8a04); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: min(100%, 300px);
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--slate-400);
  transform: translateY(-50%);
}

.search-box .input {
  padding-left: 38px;
  background: var(--slate-50);
}

.toolbar .select {
  width: auto;
  min-width: 120px;
  background: var(--slate-50);
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.project-card {
  position: relative;
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #bae6fd;
  box-shadow: var(--shadow-md);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--slate-300);
}

.project-card.risk-red::before { background: var(--red-600); }
.project-card.risk-yellow::before { background: #eab308; }
.project-card.risk-green::before { background: var(--green-600); }

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-card-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.project-card-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 12px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.meta-item span,
.detail-meta span {
  display: block;
  margin-bottom: 3px;
  color: var(--slate-400);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.meta-item strong,
.detail-meta strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-risk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 12px;
}

.project-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--slate-100);
}

.owner-stack {
  display: flex;
  align-items: center;
}

.owner-stack .avatar {
  margin-left: -7px;
  border: 2px solid var(--white);
}

.owner-stack .avatar:first-child {
  margin-left: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 30px;
  color: var(--slate-500);
  text-align: center;
}

.empty-state svg {
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--slate-300);
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--slate-700);
}

.section-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 15px;
  padding: 4px;
  border-radius: 12px;
  background: var(--slate-100);
  width: fit-content;
}

.section-tab {
  min-height: 35px;
  padding: 6px 13px;
  color: var(--slate-500);
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.section-tab.active {
  color: var(--navy-900);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-column {
  min-width: 260px;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 2px 3px;
}

.kanban-head h3 {
  margin: 0;
  font-size: 14px;
}

.kanban-head span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  color: var(--slate-600);
  background: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.task-card.overdue {
  border-color: #fecaca;
  box-shadow: inset 3px 0 0 var(--red-600);
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.task-card h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.task-project {
  margin: 0;
  color: var(--slate-500);
  font-size: 11px;
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 11px;
}

.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.task-summary-cell {
  padding: 11px;
  border: 1px solid var(--slate-200);
  border-radius: 11px;
  background: var(--slate-50);
  text-align: center;
}

.task-summary-cell span {
  display: block;
  color: var(--slate-500);
  font-size: 10px;
}

.task-summary-cell strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.task-summary-cell.danger {
  border-color: #fecaca;
  background: #fff5f5;
}

.task-summary-cell.danger strong {
  color: var(--red-600);
}

.project-task-preview {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.project-task-preview-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  color: inherit;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  background: var(--white);
  text-align: left;
}

.project-task-preview-item:hover {
  border-color: #bae6fd;
  background: #f8fdff;
}

.project-task-preview-item span {
  color: var(--cyan-600);
  font-size: 10px;
  font-weight: 750;
}

.project-task-preview-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-preview-item em {
  color: var(--slate-500);
  font-size: 10px;
  font-style: normal;
}

.task-summary-latest {
  display: grid;
  gap: 3px;
  margin-top: 11px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f0f9ff;
}

.task-summary-latest strong {
  color: var(--navy-700);
  font-size: 11px;
}

.task-summary-latest span,
.text-danger {
  color: var(--slate-500);
  font-size: 11px;
}

.text-danger {
  color: var(--red-600) !important;
}

.task-modal-list {
  display: grid;
  gap: 12px;
}

.task-modal-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
}

.task-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-modal-head strong,
.task-modal-head span {
  display: block;
}

.task-modal-head > div > strong {
  font-size: 13px;
}

.task-modal-head > div > span {
  margin-top: 3px;
  color: var(--slate-400);
  font-size: 10px;
}

.task-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.task-modal-grid > div {
  min-width: 0;
  padding: 8px;
  border-radius: 9px;
  background: var(--slate-50);
}

.task-modal-grid span,
.task-modal-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-modal-grid span {
  color: var(--slate-400);
  font-size: 9px;
}

.task-modal-grid strong {
  margin-top: 2px;
  color: var(--slate-700);
  font-size: 11px;
}

.task-modal-people {
  color: var(--slate-600);
  font-size: 11px;
}

.task-feedback {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f0f9ff;
  color: var(--slate-600);
  font-size: 11px;
}

.task-feedback strong {
  color: var(--navy-700);
  font-size: 11px;
}

.task-feedback em {
  color: var(--orange-600);
  font-style: normal;
  font-weight: 700;
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--slate-100);
}

.detail-header {
  position: relative;
  overflow: hidden;
  padding: 22px;
  color: var(--white);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 15%, rgba(34, 211, 238, .22), transparent 28%),
    linear-gradient(140deg, var(--navy-900), var(--navy-950));
  box-shadow: var(--shadow-md);
}

.detail-header::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -170px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
}

.detail-header-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-header h1 {
  margin: 7px 0 7px;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.035em;
}

.detail-header p {
  margin: 0;
  color: #cbd5e1;
}

.detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-badges .status-pill,
.detail-badges .risk-badge {
  border: 1px solid rgba(255, 255, 255, .12);
}

.detail-header-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-header-grid .meta-item {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  background: rgba(255, 255, 255, .055);
}

.detail-header-grid .meta-item span {
  color: #93c5fd;
}

.detail-header-grid .meta-item strong {
  color: var(--white);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr);
  gap: 18px;
  margin-top: 18px;
}

.gate-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.gate-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 130px;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.gate-card::after {
  content: "";
  position: absolute;
  top: 21px;
  right: -10px;
  width: 10px;
  height: 1px;
  background: var(--slate-300);
}

.gate-card:last-child::after {
  display: none;
}

.gate-card.current {
  border: 2px solid var(--cyan-500);
  background: #ecfeff;
  box-shadow: 0 8px 22px rgba(6, 182, 212, .18);
}

.gate-card.current strong {
  color: #0369a1;
  font-weight: 800;
}

.gate-current-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  color: #0369a1;
  border-radius: 999px;
  background: #cffafe;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  vertical-align: middle;
}

.gate-card.passed {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.gate-card.doing {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.gate-card.blocked {
  border-color: #fecaca;
  background: #fff5f5;
}


.gate-card.current,
.gate-card.current.passed,
.gate-card.current.doing,
.gate-card.current.blocked {
  border: 2px solid var(--cyan-500);
  background: #ecfeff;
  box-shadow: 0 8px 22px rgba(6, 182, 212, .18);
}

.gate-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}

.gate-card strong {
  font-size: 12px;
}

.gate-card .gate-note {
  min-height: 34px;
  color: var(--slate-500);
  font-size: 10px;
  line-height: 1.45;
}

.gate-card .select {
  min-height: 31px;
  padding: 4px 7px;
  font-size: 11px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.detail-meta {
  min-width: 0;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--slate-100);
}

.next-action-card {
  padding: 14px;
  border: 1px solid #bae6fd;
  border-radius: 13px;
  background: #f0f9ff;
}

.next-action-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy-800);
}

.next-action-card p {
  margin: 0 0 12px;
  color: var(--slate-700);
  line-height: 1.65;
}

.next-action-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--slate-500);
  font-size: 11px;
}

.notice-board {
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid #fde68a;
  border-radius: 13px;
  background: #fffbeb;
}

.notice-board h3,
.subsection-heading h3 {
  margin: 0;
  font-size: 13px;
}

.notice-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.notice-item {
  padding: 11px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: var(--white);
}

.notice-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.notice-item-head strong {
  font-size: 12px;
}

.notice-item-head span,
.notice-item small {
  color: var(--slate-500);
  font-size: 10px;
}

.notice-item p {
  margin: 6px 0;
  color: var(--slate-700);
  font-size: 11px;
  line-height: 1.6;
}

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-top: 2px;
}

.subsection-heading span {
  color: var(--slate-500);
  font-size: 11px;
}

.notification-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px;
  color: inherit;
  border: 1px solid var(--slate-200);
  border-radius: 11px;
  background: var(--white);
  text-align: left;
}

.notification-item:hover {
  border-color: #bae6fd;
  background: #f8fdff;
}

.notification-item.unread {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--slate-300);
}

.notification-item.unread .notification-dot {
  background: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .14);
}

.notification-content {
  min-width: 0;
}

.notification-content strong,
.notification-content p,
.notification-content small {
  display: block;
}

.notification-content strong {
  font-size: 12px;
}

.notification-content p {
  margin: 4px 0;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.55;
}

.notification-content small {
  color: var(--slate-400);
  font-size: 10px;
}

.change-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.change-item,
.resource-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
}

.change-item.change-pending {
  border-left: 3px solid #eab308;
}

.change-item.change-approved {
  border-left: 3px solid var(--green-600);
}

.change-head,
.resource-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.change-head h4,
.resource-head h4 {
  margin: 0;
  font-size: 13px;
}

.change-head p,
.resource-head p,
.change-item > p,
.resource-item > p {
  margin: 3px 0 0;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.6;
}

.change-project-summary {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f0f9ff;
  color: var(--slate-600);
  font-size: 11px;
}

.change-project-summary strong {
  color: var(--navy-700);
}

.change-impact {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--slate-600);
  font-size: 11px;
}

.change-impact strong {
  color: var(--orange-600);
}

.resource-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 10px;
  font-weight: 700;
}

.resource-status.alert {
  color: #b91c1c;
  background: #fee2e2;
}

.resource-status.ready {
  color: #047857;
  background: #d1fae5;
}

.resource-status.moving {
  color: #0369a1;
  background: #e0f2fe;
}

.team-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.team-summary-text {
  min-width: 0;
}

.team-summary-text strong,
.team-summary-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-summary-text strong {
  color: var(--slate-700);
  font-size: 12px;
}

.team-summary-text span {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 11px;
}

.modal-team-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.member-list {
  display: grid;
  gap: 10px;
}

.member-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.member-info {
  min-width: 0;
}

.member-info strong,
.member-info span,
.member-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-info strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.member-info span {
  color: var(--slate-600);
  font-size: 11px;
}

.member-info span .dept-pill {
  margin-right: 5px;
}

.member-info span b {
  color: var(--navy-700);
  font-weight: 700;
}

.member-info small {
  margin-top: 3px;
  color: var(--slate-400);
  font-size: 10px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.person-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 15px;
}

.person-info {
  min-width: 0;
  flex: 1;
}

.person-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.person-card > .btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.person-info strong,
.person-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-info span {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 11px;
}

.weekly-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.weekly-stat {
  padding: 15px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--white);
}

.weekly-stat span {
  display: block;
  color: var(--slate-500);
  font-size: 11px;
}

.weekly-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 23px;
}

.agenda-section {
  margin-bottom: 15px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
}

.agenda-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.agenda-title h3 {
  margin: 0;
  font-size: 14px;
}

.agenda-title span {
  color: var(--slate-500);
  font-size: 11px;
}

.agenda-list {
  display: grid;
}

.agenda-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-100);
}

.agenda-item:last-child {
  border-bottom: 0;
}

.agenda-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--navy-700);
  background: var(--slate-100);
  font-size: 11px;
  font-weight: 750;
}

.agenda-item strong {
  display: block;
  font-size: 12px;
}

.agenda-item p {
  margin: 3px 0 0;
  color: var(--slate-500);
  font-size: 11px;
}

.agenda-owner {
  color: var(--slate-500);
  font-size: 10px;
  text-align: right;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 20, 34, .58);
  backdrop-filter: blur(5px);
  animation: fade-in .16s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(100%, 720px);
  max-height: min(90vh, 900px);
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal.modal-small {
  width: min(100%, 480px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 15px;
  border-bottom: 1px solid var(--slate-100);
}

.modal-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.modal-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 12px;
}

.modal-body {
  max-height: calc(90vh - 150px);
  overflow-y: auto;
  padding: 20px 22px 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--slate-100);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 11px;
  background: var(--slate-50);
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--white);
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.empty-hint {
  padding: 11px 12px;
  color: var(--slate-500);
  border: 1px dashed var(--slate-300);
  border-radius: 10px;
  background: var(--slate-50);
  font-size: 12px;
}

.check-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan-600);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 15px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.section-divider {
  grid-column: 1 / -1;
  margin: 7px 0 15px;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: grid;
  gap: 9px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 13px 15px;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--green-600);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease both;
}

.toast.error {
  border-left-color: var(--red-600);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.loading {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--slate-500);
}

.spinner {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--cyan-600);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mobile-nav {
  display: none;
}

@media (max-width: 1200px) {
  .project-card-grid,
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-header-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    padding: 30px 26px 44px;
  }

  .login-brand {
    margin-bottom: 55px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .login-copy > p {
    margin-top: 16px;
    font-size: 14px;
  }

  .login-principles {
    display: none;
  }

  .login-panel-wrap {
    min-height: auto;
    padding: 34px 20px 54px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 750;
  }

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .mobile-brand .brand-mark svg {
    width: 24px;
    height: 24px;
  }

  .topbar {
    min-height: 64px;
    padding: 0 16px;
  }

  .topbar-title {
    display: none;
  }

  .page {
    padding: 21px 16px 102px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(226, 232, 240, .85);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
    backdrop-filter: blur(15px);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 51px;
    color: var(--slate-500);
    border-radius: 12px;
    font-size: 9px;
    font-weight: 650;
  }

  .mobile-nav a svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav a.active {
    color: var(--navy-800);
    background: var(--slate-100);
  }

  .content-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group {
    width: 100%;
  }

  .toolbar-group .search-box {
    flex: 1;
  }

  .weekly-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head .button-row {
    width: 100%;
  }

  .page-head .button-row .btn {
    flex: 1;
  }

  .kpi-card {
    min-height: 118px;
    padding: 15px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .project-card-grid,
  .people-grid,
  .weekly-summary {
    grid-template-columns: 1fr;
  }

  .project-meta {
    grid-template-columns: 1fr 1fr;
  }

  .data-table {
    min-width: 700px;
  }

  .detail-header {
    padding: 18px;
    border-radius: 16px;
  }

  .detail-header-top {
    flex-direction: column;
  }

  .detail-header-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .section-divider {
    grid-column: auto;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal,
  .modal.modal-small {
    width: 100%;
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
  }

  .modal-body {
    max-height: calc(94vh - 150px);
  }

  .agenda-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .agenda-owner {
    grid-column: 2;
    text-align: left;
  }

  .toast-region {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

@media print {
  body {
    background: var(--white);
  }

  .sidebar,
  .topbar,
  .mobile-nav,
  .button-row,
  .toolbar {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .page {
    padding: 0;
  }

  .agenda-section,
  .weekly-stat {
    break-inside: avoid;
    box-shadow: none;
  }
}
