/* ==========================================================================
   Practise ERP — Clean Corporate design tokens
   ========================================================================== */
:root {
  --smoke: #444556;
  --silver: #C5C5D9;
  --cloud: #F0F1F2;
  --accent: #CC4A0A;
  --white: #FFFFFF;

  /* derived */
  --ink: #2A2B38;          /* headings: a deeper Smoke */
  --muted: #6E6F80;        /* secondary text */
  --line: #E1E2EA;         /* hairlines (lighter Silver) */
  --accent-dark: #A93B06;  /* hover */
  --accent-tint: #FFF2EA;  /* soft orange surface */

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(68, 69, 86, .06), 0 8px 24px rgba(68, 69, 86, .08);
  --shadow-lg: 0 2px 4px rgba(68, 69, 86, .05), 0 24px 48px rgba(68, 69, 86, .12);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--smoke);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--silver); }
.btn-outline:hover { border-color: var(--smoke); }
.btn-ghost { color: var(--ink); padding: 0 12px; }
.btn-ghost:hover { color: var(--accent); }
.btn-white { background: var(--white); color: var(--accent); }
.btn-white:hover { background: var(--cloud); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; }
.brand span b { color: var(--accent); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; font-size: 15px; font-weight: 500; color: var(--smoke); border-radius: var(--radius-sm); }
.nav-links a:hover { color: var(--accent); background: var(--accent-tint); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--silver); border-radius: var(--radius-sm); width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--ink); }

/* ---------- Section scaffolding ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--cloud); }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: 38px; font-weight: 700; }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 96px; background: linear-gradient(180deg, var(--white) 0%, var(--cloud) 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--smoke);
}
.badge-pill { background: var(--accent); color: var(--white); padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.hero h1 { font-size: 54px; font-weight: 800; letter-spacing: -0.035em; margin-top: 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 540px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 20px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; color: var(--accent); }

/* Dashboard mockup */
.mock {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--silver); }
.mock-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.mock-user { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mock-body { padding: 18px; }
.mock-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.stat strong { display: block; margin-top: 4px; font-size: 22px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.stat.is-accent { background: var(--accent); border-color: var(--accent); }
.stat.is-accent small, .stat.is-accent strong { color: var(--white); }
.mock-section-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.mock-section-title a { font-size: 12px; color: var(--accent); font-weight: 500; }
.deadline { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); }
.deadline + .deadline { border-top: 1px solid var(--line); border-radius: 0; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 4px; text-transform: uppercase; }
.tag-ca { background: var(--accent-tint); color: var(--accent); }
.tag-cs { background: var(--cloud); color: var(--smoke); border: 1px solid var(--silver); }
.tag-law { background: var(--ink); color: var(--white); }
.deadline b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.deadline span { font-size: 12px; color: var(--muted); }
.due { font-size: 12px; font-weight: 600; color: var(--smoke); white-space: nowrap; }
.due.is-urgent { color: var(--accent); }
.mock-progress { margin-top: 16px; padding: 12px; background: var(--cloud); border-radius: var(--radius); }
.mock-progress-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--smoke); }
.bar { height: 6px; background: var(--silver); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Trust strip ---------- */
.trust { padding: 36px 0; border-bottom: 1px solid var(--line); }
.trust-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--smoke); }
.trust-item svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---------- Practice tabs ---------- */
.tabs { display: flex; justify-content: center; gap: 6px; padding: 6px; background: var(--cloud); border-radius: 12px; width: fit-content; margin: 0 auto 40px; }
.tab {
  border: 0; background: transparent; padding: 10px 22px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--smoke);
}
.tab[aria-selected="true"] { background: var(--white); color: var(--accent); box-shadow: 0 1px 3px rgba(68, 69, 86, .12); }
.panel { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.panel[hidden] { display: none; }
.panel h3 { font-size: 30px; font-weight: 700; }
.panel > div > p { margin-top: 14px; font-size: 17px; color: var(--muted); }
.checklist { margin-top: 26px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.checklist svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.panel-card { background: var(--cloud); border-radius: var(--radius-lg); padding: 28px; }
.panel-card h4 { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
.chip small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Modules grid ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--silver); box-shadow: var(--shadow); transform: translateY(-2px); }
.icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--accent-tint); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 17px; font-weight: 600; }
.card p { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--white); font-weight: 700; font-size: 15px; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-size: 18px; font-weight: 600; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.pillar { padding: 30px 26px; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 16px; }
.pillar h3 { font-size: 17px; font-weight: 600; }
.pillar p { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 17px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--accent); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); font-size: 16px; max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 96px; }
.cta-box {
  background: var(--accent); color: var(--white);
  border-radius: 20px; padding: 64px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-box::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; border: 60px solid rgba(255, 255, 255, .07); pointer-events: none;
}
.cta-box h2 { color: var(--white); font-size: 34px; font-weight: 700; }
.cta-box p { margin-top: 10px; color: rgba(255, 255, 255, .82); font-size: 17px; }
.cta-box .btn-row { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-outline-white { color: var(--white); border-color: rgba(255, 255, 255, .45); background: transparent; }
.btn-outline-white:hover { border-color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--silver); padding: 64px 0 32px; font-size: 15px; }
.site-footer .brand { color: var(--white); }
.site-footer .brand span b { color: #FF9F66; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-grid p { margin-top: 16px; max-width: 320px; color: var(--silver); }
.footer-grid h4 { color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer-grid li + li { margin-top: 10px; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(197, 197, 217, .18); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }

/* ==========================================================================
   Login page
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: var(--accent); color: var(--white);
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::before, .auth-aside::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); pointer-events: none;
}
.auth-aside::before { width: 520px; height: 520px; right: -200px; bottom: -200px; }
.auth-aside::after { width: 760px; height: 760px; right: -320px; bottom: -320px; }
.auth-aside .brand { color: var(--white); }
.auth-aside .brand span b { color: var(--white); opacity: .7; }
.auth-aside h2 { color: var(--white); font-size: 38px; font-weight: 700; max-width: 440px; letter-spacing: -0.03em; }
.auth-aside > div > p { margin-top: 16px; font-size: 17px; color: rgba(255, 255, 255, .8); max-width: 420px; }
.auth-points { margin-top: 32px; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: rgba(255, 255, 255, .92); }
.auth-points svg { width: 20px; height: 20px; flex: none; }
.auth-foot { font-size: 13px; color: rgba(255, 255, 255, .65); position: relative; z-index: 1; }

.auth-main { display: flex; flex-direction: column; padding: 32px 48px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.auth-top .brand { visibility: hidden; }
.auth-top a { color: var(--accent); font-weight: 600; }
.auth-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 30px; font-weight: 700; }
.auth-form .sub { margin-top: 8px; color: var(--muted); }

.btn-google { margin-top: 28px; }
.btn-google svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; font-size: 13px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { margin-bottom: 18px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field-label a { font-size: 13px; font-weight: 600; color: var(--accent); }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--white); border: 1px solid var(--silver); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9A9BAB; }
.input:hover { border-color: var(--smoke); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(204, 74, 10, .16); }
.input.has-toggle { padding-right: 48px; }
.field.is-invalid .input { border-color: #C62828; }
.field.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(198, 40, 40, .14); }
.error { display: none; margin-top: 6px; font-size: 13px; color: #C62828; }
.field.is-invalid .error { display: block; }
.toggle-pw {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; background: none; border-radius: 4px;
  display: grid; place-items: center; color: var(--muted);
}
.toggle-pw:hover { color: var(--ink); }
.toggle-pw svg { width: 18px; height: 18px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--smoke); margin: 6px 0 24px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

.auth-alt { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-legal { text-align: center; font-size: 13px; color: var(--muted); }
.auth-legal a { text-decoration: underline; text-underline-offset: 2px; }
.form-status { display: none; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.form-status.is-visible { display: block; }
.form-status.is-error { background: #FDECEC; color: #B42318; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(3) { border-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero h1 { font-size: 46px; }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.is-open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; box-shadow: var(--shadow);
  }
  .nav-links.is-open a { padding: 12px; }
  .hero-grid, .panel { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .brand { visibility: visible; }
  .auth-main { padding: 24px 16px; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 36px; }
  .hero-lead { font-size: 17px; }
  .section-head h2 { font-size: 30px; }
  .section-head { margin-bottom: 40px; }
  .mock-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .pillars { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--line); }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 10px 8px; }
  .chip-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 24px; }
  .cta-box h2 { font-size: 28px; }
  .nav-actions .btn-primary { padding: 0 14px; height: 40px; font-size: 14px; }
  .trust-row { gap: 18px; justify-content: flex-start; }
  .hide-sm { display: none; }
}

/* ---------- Error page ---------- */
.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--cloud); }
.error-page h1 { font-size: 40px; font-weight: 800; }
.error-page p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.error-page .hero-ctas { justify-content: center; }
