/* ==========================================================================
   aioffice — Thryve Design System
   Light, professional. Brand palette: Ink, Purple (accent), Lime (highlight).
   ========================================================================== */

@import url('/assets/css/fonts.css');

:root {
  /* Surfaces */
  --bg:            #f4f5f6;
  --surface:       #ffffff;
  --surface-2:     #f7f8f9;
  --surface-3:     #eef0f1;
  --border:        #e6e7ea;
  --border-strong: #d3d4da;

  /* Text (Thryve ink + gray scale) */
  --text:          #030303;
  --text-muted:    #7c7c86;
  --text-subtle:   #a9a9b4;

  /* Primary accent — Thryve Purple */
  --accent:        #360482;
  --accent-hover:  #471d83;
  --accent-active: #2a0466;
  --accent-soft:   #efeafa;
  --accent-ring:   rgba(54, 4, 130, 0.30);
  --on-accent:     #ffffff;

  /* Highlight — Thryve Lime + Mint */
  --lime:          #d4ef76;
  --lime-hover:    #c6e558;
  --lime-soft:     #f0f7d2;
  --ink:           #030303;
  --mint:          #bbe2c0;
  --mint-soft:     #eaf4ec;

  /* Semantic */
  --danger:        #b4443a;
  --danger-soft:   #fbeceb;
  --success:       #2f7d5b;
  --success-soft:  #e8f4ee;
  --warning:       #9a6a1e;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(20, 34, 48, 0.06);
  --shadow-sm: 0 2px 6px rgba(20, 34, 48, 0.07);
  --shadow-md: 0 8px 24px rgba(20, 34, 48, 0.10);
  --shadow-lg: 0 20px 48px rgba(20, 34, 48, 0.16);

  /* Typography — Thryve brand fonts */
  --font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --header-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 var(--space-3); }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 42px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-weight: 550;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-active); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); }

.btn--subtle { background: var(--surface-2); color: var(--text); }
.btn--subtle:hover { background: var(--surface-3); }

.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---- Forms ---- */
.field { margin-bottom: var(--space-4); }
.field > label {
  display: block;
  font-size: 0.83rem;
  font-weight: 550;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.input { height: auto; padding: var(--space-3) var(--space-4); resize: vertical; min-height: 84px; }
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c7c86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* ---- Alerts ---- */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
}
.alert--error   { background: var(--danger-soft);  color: var(--danger);  border-color: #f0cfcc; }
.alert--success { background: var(--success-soft); color: var(--success); border-color: #cbe6d8; }
.alert--info    { background: var(--accent-soft);  color: var(--accent);  border-color: #d3e2ec; }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  /* Karten haben immer Innenabstand — Inhalt darf nie am Rand kleben.
     Wer bewusst randbündig baut (z. B. Bild/Liste), setzt .card--flush. */
  padding: var(--space-5);
}
.card--flush { padding: 0; }

/* ---- Brand mark ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent) 0%, #6a3fb5 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-xs);
}
.brand__name { font-size: 1.05rem; }
.brand__name b { font-weight: 700; }

/* Thryve logo (SVG) */
.brand__img { height: 18px; width: auto; display: block; }
.brand__product {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: -0.01em;
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid var(--border-strong);
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
