/* Licensa design tokens + shared components. */
:root {
  --green-900: #063A2F;
  --green-800: #0B5D4B;
  --green-700: #10735D;
  --green-100: #DCEFE8;
  --green-50: #EFF7F3;
  --gold: #D9B45B;
  --gold-ink: #7A5A12;
  --gold-50: #FBF4E2;
  --paper: #F6F4EE;
  --card: #FFFFFF;
  --ink: #14201C;
  --ink-2: #44524D;
  --ink-3: #6B7873;
  --line: #E2DED3;
  --line-2: #EDEAE2;
  --red: #B3261E;   --red-50: #FBECEA;
  --amber: #9A5B00; --amber-50: #FDF1DC;
  --blue: #1D5FA8;  --blue-50: #E8F0FA;
  --violet: #5B3FA8; --violet-50: #EFEAFB;
  --pink: #A3306B;  --pink-50: #FBE9F2;
  --indigo: #3A47A8; --indigo-50: #EBEDFA;
  --teal: #0F6E78;  --teal-50: #E3F3F4;
  --grey: #5C6662;  --grey-50: #EEF0EE;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 32, 28, .06), 0 8px 24px rgba(20, 32, 28, .06);
  --font: "Manrope", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[dir="rtl"], .ar { font-family: "IBM Plex Sans Arabic", var(--font); }
a { color: var(--green-800); }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green-700) 45%, transparent); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-gold { background: var(--gold); color: var(--green-900); }
.btn-danger { background: var(--card); border-color: #E7C2BE; color: var(--red); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.input, .select, .textarea { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 0 12px; font-size: 14px; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px var(--green-100); }
.label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.field { margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--ink-3); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--grey-50); color: var(--grey); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.blue { background: var(--blue-50); color: var(--blue); }
.pill.amber { background: var(--amber-50); color: var(--amber); }
.pill.red { background: var(--red-50); color: var(--red); }
.pill.green { background: var(--green-50); color: var(--green-800); }
.pill.teal { background: var(--teal-50); color: var(--teal); }
.pill.violet { background: var(--violet-50); color: var(--violet); }
.pill.pink { background: var(--pink-50); color: var(--pink); }
.pill.indigo { background: var(--indigo-50); color: var(--indigo); }
.pill.grey { background: var(--grey-50); color: var(--grey); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: inherit; text-decoration: none; }
.brand img { width: 32px; height: 32px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }

/* chat (website + simulator share it) */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.bubble.in { align-self: flex-start; background: var(--card); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--green-800); color: #fff; border-bottom-right-radius: 4px; }
.bubble.staff { border-color: var(--gold); background: var(--gold-50); }
.bubble b { font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 92%; }
.chip { border: 1px solid var(--green-700); color: var(--green-800); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.chip:hover { background: var(--green-50); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); background: var(--card); }
.chat-form .input { height: 44px; border-radius: 999px; padding: 0 16px; }
.chat-form .btn { height: 44px; border-radius: 999px; }
.typing { align-self: flex-start; color: var(--ink-3); font-size: 13px; padding: 4px 6px; }
