/* ==========================================================================
   Design tokens
   Palette: deep navy ink on a cool paper background, one confident indigo
   accent for action, a quiet emerald reserved only for "done" states.
   ========================================================================== */
:root {
  --ink: #14213D;
  --ink-soft: #3D4B6B;
  --muted: #6B7A99;
  --paper: #F6F7FB;
  --surface: #FFFFFF;
  --border: #E3E7F0;
  --accent: #3F5FE0;
  --accent-dark: #2F49B8;
  --accent-soft: #EAEDFC;
  --success: #1C9668;
  --success-soft: #E4F5EE;
  --warn: #B7791F;
  --warn-soft: #FBF0DD;
  --danger: #C0392B;
  --danger-soft: #FBEAE8;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 33, 61, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 33, 61, 0.14);
  --font-display: "Segoe UI Semibold", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

a { color: var(--accent); }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- */
/* Buttons                                                           */
/* ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 46px;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; padding: 10px 14px; }
.btn-ghost:hover:not(:disabled) { color: var(--ink); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #f6d8d4; }

.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- */
/* Cards                                                              */
/* ---------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------- */
/* Form fields                                                        */
/* ---------------------------------------------------------------- */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  background: var(--surface);
  color: var(--ink);
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}
.input.error, .select.error, .textarea.error { border-color: var(--danger); }
.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 6px;
  font-weight: 500;
}
.field.has-error .error-msg { display: block; }

.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9'><path d='M1 1l6 6 6-6' stroke='%233D4B6B' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .field { flex: 1 1 220px; }

/* ---------------------------------------------------------------- */
/* Status badges                                                     */
/* ---------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-new { background: var(--accent-soft); color: var(--accent-dark); }
.badge-review { background: var(--warn-soft); color: var(--warn); }
.badge-content { background: #F1E8FB; color: #7A3FC4; }
.badge-designing { background: #FDE8F0; color: #C22A70; }
.badge-development { background: #E4EEFB; color: #1C6FC2; }
.badge-completed { background: var(--success-soft); color: var(--success); }

/* ---------------------------------------------------------------- */
/* Utility                                                            */
/* ---------------------------------------------------------------- */
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .btn { width: 100%; }
  .btn.btn-inline { width: auto; }
}
