/* Agentready — clean minimalist UI. Original CSS, no framework. */

:root {
  --brand: #f6821f;
  --brand-dark: #d46a0f;
  --ink: #1f1f1f;
  --ink-2: #6b6b6b;
  --ink-3: #9b9b9b;
  --bg: #ffffff;
  --bg-2: #fafafa;
  --bg-3: #f4f4f5;
  --border: #e5e5e5;
  --border-2: #d4d4d4;
  --ok: #16a34a;
  --warn: #eab308;
  --danger: #dc2626;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 14px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }

code, pre { font-family: var(--mono); font-size: 13px; }
code { background: var(--bg-3); padding: 2px 6px; border-radius: 4px; }
pre { background: var(--bg-3); padding: 14px; border-radius: var(--radius); overflow-x: auto; }

/* Layout */
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: initial; } }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 24px;
  height: 24px;
  background: var(--brand);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 13px;
  font-family: var(--mono);
}
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--border);
  text-decoration: none;
}
.btn:hover { background: var(--bg-3); text-decoration: none; }
.btn-primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: white; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--ink); }
.btn-danger { color: var(--danger); border-color: var(--border); background: var(--bg); }
.btn-danger:hover { background: #fef2f2; border-color: #fecaca; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card + .card { margin-top: 16px; }
.card-title { margin-bottom: 4px; }
.card-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }

/* Forms */
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.field-help { color: var(--ink-2); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(246, 130, 31, .15);
}
.field + .field { margin-top: 14px; }

.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .address-grid { grid-template-columns: 1fr; } }

/* Auth screens */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg-2);
}
.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 22px; }

/* Dashboard list */
.list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-2); }
.list-item .title { font-weight: 600; font-size: 15px; }
.list-item .meta { color: var(--ink-2); font-size: 13px; }
.list-empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--brand-dark);
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-3);
  color: var(--ink-2);
}
.badge-ok { background: #ecfdf5; color: var(--ok); }
.badge-warn { background: #fefce8; color: #a16207; }
.badge-brand { background: #fff3e6; color: var(--brand-dark); }

/* Toast */
.toast-host { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: toast-in .2s ease;
}
.toast-err { background: var(--danger); }
.toast-ok { background: var(--ok); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* Landing */
.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 { font-size: 44px; letter-spacing: -0.02em; max-width: 720px; margin: 0 auto 16px; }
.hero p { font-size: 18px; color: var(--ink-2); max-width: 620px; margin: 0 auto 28px; }
.hero-cta { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.section { padding: 60px 0; }
.section-alt { background: var(--bg-2); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 780px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-2); margin: 0; font-size: 14px; }

.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; margin: 0 auto; }
@media (max-width: 620px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.plan-pro { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan .price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.plan .price small { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; }
.plan ul li { padding: 6px 0; color: var(--ink); }
.plan ul li::before { content: "✓"; color: var(--brand); margin-right: 8px; font-weight: 700; }

.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--ink-2); font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
