/* ============================================================
   LP Sourcing Portal — shared stylesheet
   Visual language: aligned with liquipel.com
   ============================================================ */

:root {
  --black: #000000;
  --white: #FFFFFF;
  --bg: #F8F9FB;
  --card: #FFFFFF;
  --text: #0F1419;
  --text-soft: #4B5563;
  --muted: #9CA3AF;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --accent: #1F3864;
  --accent-hover: #2E74B5;
  --success: #059669;
  --warn-bg: #FEF3C7;
  --warn-text: #78350F;
  --error: #B91C1C;
  --error-bg: #FEE2E2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --content-w: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial,
               "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--black);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  font-size: 20px;
}
.brand:hover { color: var(--black); text-decoration: none; }
.brand__mark { font-size: 22px; }
.brand__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1.3px;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
/* Button colors must win over .nav a rules */
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--white); }
.nav a.btn-accent, .nav a.btn-accent:hover  { color: var(--white); }
.nav a.btn-secondary { color: var(--text); }
.nav a.btn-secondary:hover { color: var(--text); }
.nav .lang-switch { display: flex; gap: 2px; }
.nav .lang-switch button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.nav .lang-switch button.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent); color: var(--white); text-decoration: none; }
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--text); text-decoration: none; }
.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover { background: var(--accent-hover); color: var(--white); text-decoration: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #FFFFFF 0%, #F2F4F8 100%);
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 80px 24px 70px;
  text-align: center;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--black);
  margin: 0 0 18px;
  letter-spacing: -1px;
}
.hero__sub {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto 32px;
}
.hero__cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .hero__title { font-size: 34px; }
  .hero__inner { padding: 50px 20px 40px; }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 64px 24px;
}
.section__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.section__sub {
  color: var(--text-soft);
  margin: 0 0 32px;
  font-size: 15px;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.feature-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--white);
  font-size: 22px;
  margin-bottom: 4px;
}
.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.feature-card__desc {
  font-size: 14px;
  color: var(--text-soft);
  flex: 1;
  margin: 0;
}
.feature-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}
.feature-card.coming-soon { background: #FAFBFC; }
.feature-card.coming-soon .feature-card__icon {
  background: var(--muted);
  color: var(--white);
}
.feature-card .badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.feature-card .badge.active {
  background: #D1FAE5;
  color: #065F46;
}

/* ---------- Forms ---------- */
.auth-page { max-width: 460px; margin: 0 auto; padding: 50px 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.card .card__sub { color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-row input:not([type="checkbox"]):not([type="radio"]),
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--white);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,56,100,0.1);
}
.form-row input[type="checkbox"], .form-row input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row.required label::after { content: " *"; color: var(--error); }

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #FCA5A5; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.alert-warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid #FCD34D; }

/* ---------- Table (admin) ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: #F3F4F6;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: #FAFBFC; }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-pending { background: var(--warn-bg); color: var(--warn-text); }
.status-approved { background: #D1FAE5; color: #065F46; }
.status-rejected { background: var(--error-bg); color: var(--error); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 36px 24px 28px;
}
.site-footer__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}
.site-footer a { color: var(--text-soft); }
.site-footer__links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.site-footer__brand { color: var(--black); font-weight: 700; letter-spacing: 0.5px; }

/* ---------- Dashboard / inner pages ---------- */
.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px 28px;
}
.page-head__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-head .breadcrumb {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.page-head .user-pill {
  background: #F3F4F6;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--text-soft); }
.text-small { font-size: 12px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }
.hide { display: none; }

/* ---------- Iframe wrapper for the bot ---------- */
.bot-frame-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 720px;
}
.bot-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
