:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-elevated: rgba(18, 18, 20, 0.82);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f7f8fb;
  --muted: #9fa4b2;
  --muted-strong: #c7cad4;
  --danger: #ff4d67;
  --warning: #ffb020;
  --success: #43e58e;
  --blue: #64a6ff;
  --cyan: #56f0ff;
  --pink: #ff6bd6;
  --violet: #9d7cff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --glow: 0 0 38px rgba(86, 240, 255, 0.16);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  background:
    linear-gradient(115deg, rgba(86, 240, 255, 0.09), transparent 26%),
    linear-gradient(245deg, rgba(255, 107, 214, 0.08), transparent 28%),
    linear-gradient(180deg, #050505 0%, #09090b 48%, #050505 100%);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon.filled {
  fill: currentColor;
  stroke: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  color: #020304;
  border-color: rgba(255, 255, 255, 0.0);
  background: linear-gradient(135deg, #f7f8fb, #9eefff 58%, #ffb8ea);
  box-shadow: 0 18px 50px rgba(86, 240, 255, 0.18);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #ffffff, #b9f5ff 58%, #ffd0f1);
}

.btn.danger {
  color: #fff;
  border-color: rgba(255, 77, 103, 0.35);
  background: rgba(255, 77, 103, 0.14);
}

.btn.icon-only {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}

.btn.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 15, 17, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  animation: fade-up 520ms ease both;
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #050505;
  background: linear-gradient(135deg, #ffffff, #64f5ff 48%, #ff6bd6);
  box-shadow: 0 18px 44px rgba(86, 240, 255, 0.2);
}

.brand-title {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-kicker {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-heading {
  margin: 34px 0 6px;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1;
}

.login-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.field-stack {
  display: grid;
  gap: 14px;
}

.field,
.field-wide {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label,
.field > span:first-child,
.field-wide label,
.field-label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.input,
.select {
  height: 44px;
  padding: 0 13px;
}

.select {
  appearance: none;
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.07);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select option {
  color: #f7f8fb !important;
  background: #111114 !important;
  background-color: #111114 !important;
}

.select option:checked {
  color: #ffffff !important;
  background: #17333b !important;
  background-color: #17333b !important;
}

.select optgroup {
  color: var(--muted-strong) !important;
  background: #111114 !important;
  background-color: #111114 !important;
}

.textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.5;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(86, 240, 255, 0.62);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 0 0 3px rgba(86, 240, 255, 0.1);
}

.form-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

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

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  min-height: calc(100vh - 36px);
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(13, 13, 15, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #050505;
  font-weight: 800;
  background: linear-gradient(135deg, #f8fbff, #73ffe2, #ffc267);
}

.user-meta {
  min-width: 0;
}

.user-name {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: transparent;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-button:hover,
.nav-button.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.075);
  transform: translateX(2px);
}

.workspace {
  min-width: 0;
  padding: 4px 0 26px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 0.96;
  letter-spacing: 0;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

.search-shell .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-shell .input {
  padding-left: 41px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.066);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  animation: fade-up 480ms ease both;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent, var(--cyan)), transparent);
  opacity: 0.9;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stat-value {
  margin: 13px 0 0;
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 800;
  line-height: 1;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 12px;
}

.control-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(138px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(22px);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(312px, 1fr));
  align-items: start;
  gap: 14px;
}

.task-card {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 14px;
  min-height: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(var(--task-rgb, 86, 240, 255), 0.14), transparent 42%),
    rgba(255, 255, 255, 0.062);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  transform-origin: center;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease, background 190ms ease, opacity 160ms ease;
  animation: fade-up 460ms ease both;
}

.task-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(var(--task-rgb, 86, 240, 255), 0.44);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.34),
    0 0 42px rgba(var(--task-rgb, 86, 240, 255), 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.task-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.task-card.urgent {
  border-color: rgba(255, 77, 103, 0.36);
}

.task-card.deleted {
  opacity: 0.62;
}

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

.task-title-wrap {
  display: flex;
  gap: 11px;
  min-width: 0;
}

.service-logo {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.service-logo svg {
  width: 28px;
  height: 28px;
  display: block;
}

.task-title {
  min-width: 0;
}

.task-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.24;
}

.task-number {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: start;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.badge.urgent {
  color: #ffd8df;
  border-color: rgba(255, 77, 103, 0.35);
  background: rgba(255, 77, 103, 0.14);
}

.badge.normal {
  color: #c8ffe0;
  border-color: rgba(67, 229, 142, 0.28);
  background: rgba(67, 229, 142, 0.11);
}

.badge.waiting {
  color: #fff0c2;
  border-color: rgba(255, 176, 32, 0.3);
  background: rgba(255, 176, 32, 0.11);
}

.badge.progress {
  color: #d9e7ff;
  border-color: rgba(100, 166, 255, 0.3);
  background: rgba(100, 166, 255, 0.12);
}

.badge.done {
  color: #c8ffe0;
  border-color: rgba(67, 229, 142, 0.28);
  background: rgba(67, 229, 142, 0.11);
}

.task-meta {
  display: grid;
  gap: 8px;
  align-self: start;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.task-preview {
  position: relative;
  max-height: 72px;
  margin: 0;
  overflow: hidden;
  color: var(--muted-strong);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.task-preview::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(18, 18, 20, 0), rgba(18, 18, 20, 0.92));
}

.meta-line {
  display: flex;
  gap: 8px;
  min-width: 0;
  align-items: center;
}

.meta-line span:last-child,
.meta-line a {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-group {
  display: grid;
  gap: 8px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-value {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
}

.empty-state,
.skeleton-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
  backdrop-filter: blur(22px);
}

.empty-state h2 {
  margin: 14px 0 6px;
  color: var(--text);
  font-size: clamp(22px, 4vw, 32px);
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  line-height: 1.6;
}

.empty-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(86, 240, 255, 0.08);
}

.skeleton-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.skeleton-card {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.045);
  background-size: 220% 100%, auto;
  animation: shimmer 1.15s infinite linear;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(18px);
  animation: fade-in 180ms ease both;
}

.modal {
  width: min(100%, 920px);
  max-height: min(88vh, 920px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(13, 13, 15, 0.92);
  box-shadow: var(--shadow);
  animation: modal-in 220ms ease both;
}

.modal.narrow {
  width: min(100%, 470px);
}

.modal-header,
.modal-footer {
  position: sticky;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(16px);
}

.modal-header {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  bottom: 0;
  border-top: 1px solid var(--line);
}

.modal-title {
  min-width: 0;
}

.modal-title h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.modal-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  padding: 16px;
}

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

.form-grid .field-wide,
.form-grid .service-picker,
.form-grid .proof-zone,
.form-grid .segment,
.form-grid .color-picker {
  grid-column: 1 / -1;
}

.segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.segment button {
  min-height: 40px;
  border-radius: 6px;
  color: var(--muted-strong);
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.segment button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.service-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 9px;
}

.service-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(var(--service-rgb), 0.16), transparent 60%),
    rgba(255, 255, 255, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.service-option:hover,
.service-option.active {
  transform: translateY(-1px);
  border-color: rgba(var(--service-rgb), 0.5);
  background:
    linear-gradient(135deg, rgba(var(--service-rgb), 0.22), transparent 60%),
    rgba(255, 255, 255, 0.075);
}

.service-option span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-picker {
  display: grid;
  grid-template-columns: repeat(9, minmax(34px, 1fr));
  gap: 8px;
}

.color-swatch {
  position: relative;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(var(--color-rgb), 0.96), rgba(var(--color-rgb), 0.36));
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.color-swatch:hover,
.color-swatch.active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 30px rgba(var(--color-rgb), 0.25);
}

.proof-zone {
  display: grid;
  gap: 10px;
}

.proof-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.file-trigger input {
  display: none;
}

.proof-preview {
  display: block;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.proof-preview.visible {
  display: block;
}

.proof-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #08080a;
}

.proof-empty {
  display: grid;
  min-height: 132px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
}

.detail-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.046);
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.detail-text {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.toast-root,
#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(18, 18, 20, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: toast-in 240ms ease both;
}

.toast.success {
  border-color: rgba(67, 229, 142, 0.28);
}

.toast.danger {
  border-color: rgba(255, 77, 103, 0.28);
}

.toast-title {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
}

.toast-text {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mobile-only {
  display: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes shimmer {
  from {
    background-position: 220% 0, 0 0;
  }
  to {
    background-position: -220% 0, 0 0;
  }
}

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

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .control-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    position: static;
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

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

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .top-actions {
    justify-content: stretch;
  }

  .search-shell,
  .top-actions .btn.primary {
    flex: 1 1 260px;
    min-width: 0;
  }

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

@media (max-width: 720px) {
  .stats-grid,
  .control-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .color-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 14px;
  }

  .login-panel,
  .sidebar,
  .stat-card,
  .task-card,
  .control-strip {
    border-radius: var(--radius);
  }

  .stats-grid,
  .control-strip {
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .task-head {
    display: grid;
  }

  .task-actions .btn {
    flex: 1 1 130px;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .modal-header,
  .modal-footer {
    align-items: stretch;
  }

  .modal-header {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}
