@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    color-scheme: light;
    font-family: ui-sans-serif, system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    scroll-behavior: smooth;
  }

  body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #eef3f8;
    color: #111827;
  }

  button,
  input,
  textarea {
    font: inherit;
  }

  * {
    box-sizing: border-box;
  }
}

@layer components {
  .btn {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }

  .btn-sm {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .btn-primary {
    background: #0e7490;
    color: white;
  }

  .btn-primary:hover {
    background: #155e75;
  }

  .btn-secondary {
    border-color: #cbd5e1;
    background: white;
    color: #334155;
  }

  .btn-secondary:hover {
    background: #f8fafc;
  }

  .icon-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
  }

  .input {
    width: 100%;
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
    padding: 8px 10px;
    color: #111827;
  }

  .input:focus,
  textarea:focus {
    border-color: #0891b2;
    outline: 2px solid rgba(8, 145, 178, 0.18);
    outline-offset: 0;
  }

  .status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .status-badge[data-tone="ok"],
  .status-badge[data-tone="dev-live"] {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
  }

  .status-badge[data-tone="pending"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
  }

  .status-badge[data-tone="warn"],
  .status-badge[data-tone="dry-run"] {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
  }

  .status-badge[data-tone="blocked"],
  .status-badge[data-tone="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
  }

  .page-header {
    display: grid;
    gap: 6px;
    padding: 0 0 18px;
  }

  .page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 760;
    line-height: 1.12;
  }

  .page-eyebrow {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .page-description {
    max-width: 840px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
  }
}
