:root {
  color-scheme: light;
  --ink: #202b36;
  --black: #151f28;
  --muted: #6f7c86;
  --paper: #fff7ec;
  --panel: rgba(255, 255, 255, 0.92);
  --line: #bdebcf;
  --primary: #6fcf97;
  --primary-dark: #238354;
  --primary-soft: #e9fbf1;
  --gold: #b9761d;
  --blue: #315a74;
  --green: #32845e;
  --red: #bd3f3f;
  --shadow: 0 24px 70px rgba(154, 94, 23, 0.13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.92), transparent 31%),
    radial-gradient(circle at 78% 16%, rgba(111,207,151,0.24), transparent 30%),
    linear-gradient(135deg, #f7fff9 0%, #e9fbf1 48%, #fffdf9 100%);
  overflow-x: hidden;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(rgba(185,118,29,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185,118,29,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: bgDrift 24s ease-in-out infinite;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-page {
  position: relative;
  isolation: isolate;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 620px) 430px;
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 6vw, 78px);
  padding: 48px 0;
  animation: pageIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.login-bg {
  position: absolute;
  inset: 34px -90px;
  z-index: -1;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
}
.login-bg::before {
  position: absolute;
    inset: 0;
    content: "";
    background:
    radial-gradient(circle at 24% 30%, rgba(111,207,151,0.24), transparent 29%),
    radial-gradient(circle at 82% 44%, rgba(49, 90, 116, 0.12), transparent 26%);
  animation: softPulse 9s ease-in-out infinite;
}
.login-bg::after {
  position: absolute;
  top: -30%;
  left: -22%;
  width: 48%;
  height: 156%;
  content: "";
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: rotate(16deg);
  animation: lightSweep 10s ease-in-out infinite;
}
.bg-card {
  position: absolute;
  display: block;
  border: 1px solid rgba(111,207,151,0.34);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: cardFloat 8s ease-in-out infinite;
}
.bg-card i {
  position: absolute;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(111,207,151,0.2);
  animation: dataPulse 4.8s ease-in-out infinite;
}
.card-one { left: 0; bottom: 0; width: min(330px, 28vw); height: 176px; opacity: 0.5; }
.card-one i:nth-child(1) { top: 36px; left: 28px; width: 42%; }
.card-one i:nth-child(2) { top: 78px; left: 28px; width: 66%; animation-delay: 0.5s; }
.card-one i:nth-child(3) { top: 120px; left: 28px; width: 50%; animation-delay: 1s; }
.card-two { right: 1%; top: 8%; width: min(350px, 30vw); height: 210px; animation-delay: -2s; }
.card-two i { left: 76px; width: 58%; }
.card-two i:nth-child(1) { top: 44px; }
.card-two i:nth-child(2) { top: 86px; width: 70%; animation-delay: 0.4s; }
.card-two i:nth-child(3) { top: 128px; width: 48%; animation-delay: 0.8s; }
.card-two i:nth-child(4) { top: 170px; width: 62%; animation-delay: 1.2s; }
.bg-line {
  position: absolute;
  left: 20%;
  bottom: 14%;
  width: 44%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(49,90,116,0.32), transparent);
  animation: lineGlow 5.4s ease-in-out infinite;
}
.bg-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 8px rgba(111,207,151,0.14), 0 0 24px rgba(111,207,151,0.28);
  opacity: 0.48;
  animation: dotTravel 7s ease-in-out infinite;
}
.dot-one { left: 8%; top: 34%; }
.dot-two { left: 48%; bottom: 9%; animation-delay: 1.6s; }
.dot-three { right: 9%; top: 58%; animation-delay: 3.1s; }

.brand-mark, .app-logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
}
.brand-mark { width: min(360px, 72vw); margin: 0 auto 32px; animation: brandFloat 5.5s ease-in-out infinite; }
.brand-mark img, .app-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: hue-rotate(96deg) saturate(0.92) brightness(1.02);
}
.login-hero { text-align: center; animation: cardRise 620ms ease both; }
.eyebrow, .access-pill {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login-hero h1 {
  max-width: 560px;
  margin: 12px auto 18px;
  font-family: "Sora", Arial, sans-serif;
  color: var(--black);
  font-size: clamp(3.2rem, 5.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.login-hero p:last-child {
  max-width: 560px;
  margin: 0 auto;
  color: #557284;
  font-size: 1.02rem;
  line-height: 1.75;
}
.login-panel, .panel, .task-modal form {
  border: 1px solid rgba(111,207,151,0.38);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: clamp(28px, 4vw, 42px);
  animation: cardRise 620ms 90ms ease both;
}
.login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), #b8f2cf);
}
.panel-head { margin-bottom: 28px; }
.access-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(111,207,151,0.52);
  border-radius: 999px;
  background: rgba(111,207,151,0.14);
  color: var(--primary-dark);
}
h1, h2, h3, p { margin-top: 0; }
.panel-head h2 { margin: 18px 0 8px; color: var(--black); font-size: 1.55rem; }
.panel-head p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #415464; font-size: 0.88rem; font-weight: 800; }
label span { display: inline-flex; align-items: center; gap: 7px; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(111,207,151,0.46);
  border-radius: 8px;
  background: #fbfffd;
  color: var(--ink);
  outline: none;
}
textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(111,207,151,0.76);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(111,207,151,0.18);
}

.login-form input {
  border-color: rgba(111,207,151,0.58);
  background: linear-gradient(180deg, #ffffff, #fbfffd);
}

.login-form input::placeholder {
  color: #6f8f7d;
}
button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #062416;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(35,131,84,0.18);
}
.login-form button, .head-actions button, .role-card button, .board-toolbar button, .task-modal footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.form-message { min-height: 20px; margin: 0; color: var(--red); font-size: 0.9rem; font-weight: 800; }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 280px 1fr;
  animation: pageIn 420ms ease both;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fbfffd 50%, #edfbf3 100%);
  backdrop-filter: blur(18px);
}
.app-logo { width: 190px; margin: 0 auto 8px; }
.side-nav { display: grid; gap: 8px; }
.side-nav button, .role-card button {
  justify-content: flex-start;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}
.side-nav button.active, .side-nav button:hover {
  color: var(--primary-dark);
  border-color: rgba(111,207,151,0.52);
  background: linear-gradient(90deg, rgba(111,207,151,0.18), rgba(251,255,253,0.96));
  box-shadow: inset 3px 0 0 var(--primary), 0 12px 26px rgba(35,131,84,0.12);
}
.role-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.role-card span { color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.workspace { min-width: 0; padding: clamp(18px, 2.2vw, 30px); }
.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.workspace-head h1 { margin: 0; color: var(--black); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; }
.head-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.search-box { min-width: 260px; }
.view { display: none; }
.view.active { display: block; animation: cardRise 320ms ease both; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.metric-card span { color: var(--muted); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 12px; color: var(--black); font-size: 2.1rem; }
.metric-card p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 18px; }
.technical-grid { margin-top: 18px; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr); }
.release-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 18px; }
.panel { padding: 20px; }
.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-title h2 { margin: 0; color: var(--black); font-size: 1.25rem; }
.panel-title span { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.queue-list, .load-list, .team-grid, .focus-list, .environment-list, .release-list, .note-stack { display: grid; gap: 10px; }
.queue-item, .team-card, .release-card, .note-stack > div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfffd;
}
.queue-item header, .task-card header, .release-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.queue-item strong, .task-card strong { color: var(--black); }
.queue-meta, .task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 900;
}
.pill.high { background: #ffecec; color: var(--red); }
.pill.medium { background: var(--primary-soft); color: var(--primary-dark); }
.pill.low { background: #ecf7f0; color: var(--green); }
.load-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.6fr auto;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}
.load-bar { height: 9px; border-radius: 999px; background: #dff7e9; overflow: hidden; }
.load-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.environment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfffd;
}
.environment-row span,
.environment-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}
.environment-row.risk { border-color: rgba(189, 63, 63, 0.3); background: #fff5f5; }
.environment-row.risk em { color: var(--red); }
.environment-row.watch em { color: var(--primary-dark); }
.board-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.board-toolbar label { min-width: 180px; }
.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
}
.task-column {
  min-height: 520px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}
.task-column h2 {
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  color: var(--black);
  font-size: 1rem;
}
.task-list { display: grid; gap: 10px; }
.task-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(154,94,23,0.08);
}
.task-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.estimate {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 900;
}
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-size: 0.78rem;
}
.task-actions button.primary { border: 0; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #062416; }
.team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-card strong { font-size: 1.1rem; }
.team-card span { color: var(--muted); font-weight: 800; }
.team-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.release-card ul {
  display: grid;
  gap: 7px;
  margin: 2px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}
.note-stack strong { color: var(--black); }
.note-stack span { color: var(--muted); font-size: 0.88rem; font-weight: 700; line-height: 1.45; }
.empty-state {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}
.task-modal {
  width: min(820px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}
.task-modal::backdrop { background: rgba(21,31,40,0.42); backdrop-filter: blur(3px); }
.task-modal form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.task-modal header, .task-modal footer, .task-modal .wide { grid-column: 1 / -1; }
.task-modal header, .task-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.task-modal header h2 { margin: 0; }
.task-modal header button {
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  font-size: 1.35rem;
}
.ghost { border: 1px solid var(--line) !important; background: #fff !important; color: var(--muted) !important; box-shadow: none !important; }

@keyframes bgDrift { 50% { background-position: 28px 18px, -18px 28px; } }
@keyframes softPulse { 50% { opacity: 0.7; transform: translateY(-8px); } }
@keyframes lightSweep { 0%, 18% { transform: translateX(-24%) rotate(16deg); } 62%, 100% { transform: translateX(280%) rotate(16deg); } }
@keyframes cardFloat { 50% { transform: translateY(-14px); } }
@keyframes dataPulse { 50% { opacity: 0.9; transform: scaleX(1); } 0%, 100% { opacity: 0.42; transform: scaleX(0.82); transform-origin: left center; } }
@keyframes lineGlow { 50% { opacity: 0.95; transform: scaleX(1.06); } }
@keyframes dotTravel { 0%,100% { opacity: 0; transform: translate(-18px, 16px) scale(0.72); } 18%,72% { opacity: 0.55; } 50% { transform: translate(38px, -26px) scale(1); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brandFloat { 50% { transform: translateY(-6px); } }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .side-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid, .team-grid, .release-grid { grid-template-columns: 1fr; }
  .task-board { overflow-x: auto; grid-template-columns: repeat(4, 260px); padding-bottom: 8px; }
}
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; align-content: center; gap: 26px; padding: 26px 0; }
  .login-bg { inset: 12px -18px; }
  .card-two, .bg-dot { display: none; }
  .card-one { left: -54px; width: 260px; opacity: 0.46; }
  .brand-mark { margin-bottom: 22px; }
  .login-hero h1 { margin-bottom: 14px; font-size: clamp(2.4rem, 12vw, 3.55rem); }
  .login-hero p:last-child { font-size: 0.98rem; line-height: 1.62; }
  .login-panel { padding: 26px; }
  .panel-head { margin-bottom: 22px; }
}
@media (max-width: 620px) {
  .workspace-head, .head-actions, .board-toolbar { display: grid; }
  .metric-grid { grid-template-columns: 1fr; }
  .side-nav { grid-template-columns: 1fr; }
  .search-box { min-width: 0; }
  .task-modal form { grid-template-columns: 1fr; }
  .login-page { width: min(100% - 26px, 460px); }
  .login-form { gap: 14px; }
  input, select, textarea { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
