/* ShreePay — styled after the Metricvibe admin dashboard (Manrope · orange accent · light cards) */
:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --ink: #111827;
  --ink-2: #4B5563;
  --muted: #9CA3AF;
  --line: #E5E7EB;
  --accent: #F97316;
  --accent-soft: #FFF1E7;
  --dark: #1A1A1A;
  --green: #16A34A;  --green-soft: #EAF8EF;
  --red: #DC2626;    --red-soft: #FDECEC;
  --blue: #2563EB;   --blue-soft: #EAF0FD;
  --amber: #D97706;  --amber-soft: #FEF5E7;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(17,24,39,.05), 0 8px 24px -12px rgba(17,24,39,.12);
  font-size: 15px;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: 'Manrope', system-ui, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: .95rem; color: var(--ink); }

/* ---------- generic ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.btn { border: 0; border-radius: 12px; padding: 11px 20px; font-weight: 700; font-size: .92rem; transition: .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ea6a0a; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-success { background: var(--green-soft); color: var(--green); }
.btn-warn { background: var(--amber-soft); color: var(--amber); }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; background: #fff; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill-draft { background: var(--line); color: var(--ink-2); }
.pill-in_review, .pill-submitted { background: var(--blue-soft); color: var(--blue); }
.pill-changes_requested { background: var(--amber-soft); color: var(--amber); }
.pill-approved { background: var(--accent-soft); color: var(--accent); }
.pill-paid { background: var(--green-soft); color: var(--green); }
.pill-rejected { background: var(--red-soft); color: var(--red); }
.pill-me { background: var(--dark); color: #fff; }
.muted { color: var(--muted); font-size: .85rem; }
.grid { display: grid; gap: 18px; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 800; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1.5px solid var(--line); }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.rowlink:hover { background: #FAFAFB; cursor: pointer; }

/* ---------- landing ---------- */
.landing { background: #fff; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 6vw; position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); z-index: 10; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--accent); }
.brand small { font-size: .65rem; color: var(--muted); font-weight: 600; display: block; margin-top: -3px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 70px 6vw; }
.hero h1 { font-size: 2.9rem; line-height: 1.12; letter-spacing: -.02em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--ink-2); font-size: 1.08rem; margin: 20px 0 30px; line-height: 1.65; }
.hero-cta { display: flex; gap: 14px; }
.hero-visual { background: var(--dark); border-radius: 26px; padding: 28px; color: #fff; box-shadow: var(--shadow); }
.flow-step { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.flow-step:last-child { border-bottom: 0; }
.flow-dot { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; background: rgba(249,115,22,.18); }
.features { padding: 40px 6vw 80px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 28px; }
.feature { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.landing-footer { padding: 26px 6vw; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- auth (animated split screen) ---------- */
body.authpage { background: var(--dark); }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { background: var(--dark); color: #fff; padding: 48px 6vw; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-left .brand { color: #fff; }
.auth-left h1 { font-size: 2.4rem; line-height: 1.15; letter-spacing: -.02em; margin-top: 8px; animation: rise .7s ease both .15s; }
.auth-left h1 span { color: var(--accent); }
.auth-points { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; color: #C9CDD4; font-size: .95rem; font-weight: 600; }
.auth-points div { animation: rise .6s ease both; }
.auth-points div:nth-child(1) { animation-delay: .25s } .auth-points div:nth-child(2) { animation-delay: .35s }
.auth-points div:nth-child(3) { animation-delay: .45s } .auth-points div:nth-child(4) { animation-delay: .55s }
.auth-right { background: var(--bg); display: grid; place-items: center; padding: 34px; border-radius: 34px 0 0 34px; }
.auth-card { width: 430px; max-width: 100%; padding: 32px; }
.auth-card h2 { font-size: 1.35rem; }
.slide-in { animation: rise .5s ease both; }
@keyframes rise { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }

/* animated orbit mark (matches logo) */
.orbit-stage { position: relative; width: 190px; height: 190px; margin: 34px 0 10px; animation: rise .7s ease both; }
.orbit-core { position: absolute; inset: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb377, var(--accent) 60%); box-shadow: 0 0 40px rgba(249,115,22,.55); animation: pulse 3s ease-in-out infinite; }
.orbit-ring { position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.18); border-radius: 50%; animation: spin 9s linear infinite; }
.orbit-ring.r2 { inset: 24px; border-color: rgba(249,115,22,.35); animation-duration: 6s; animation-direction: reverse; }
.orbit-sat { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(249,115,22,.8); }
.orbit-sat.s2 { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.7); }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.08) } }

.auth-cta { width: 100%; justify-content: center; padding: 13px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; font-size: .85rem; }
.auth-row a { color: var(--accent); font-weight: 700; }
.remember { display: flex; gap: 7px; align-items: center; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.remember input { accent-color: var(--accent); width: 15px; height: 15px; }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1rem; opacity: .6; }
.pw-eye:hover { opacity: 1; }
.auth-alt { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .8rem; }
.auth-alt::before, .auth-alt::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.demo-box { margin-top: 18px; background: var(--bg); border-radius: 12px; padding: 14px; font-size: .8rem; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-left { padding: 30px 24px; }
  .orbit-stage { display: none; }
  .auth-right { border-radius: 34px 34px 0 0; }
}

/* ---------- app shell (Metricvibe: top pill nav, no sidebar) ---------- */
body.app { background: #F4F3F1; }
.mv-top { display: flex; align-items: center; gap: 18px; padding: 16px 3vw; position: sticky; top: 0; z-index: 30; background: rgba(244,243,241,.94); backdrop-filter: blur(8px); }
.logo-chip { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 999px; padding: 8px 18px 8px 9px; font-weight: 800; font-size: 1.05rem; box-shadow: var(--shadow); }
.logo-chip img { width: 30px; height: 30px; }
.logo-chip b { color: var(--accent); }
.logo-chip small { display: block; font-size: .58rem; color: var(--muted); font-weight: 700; margin-top: -2px; letter-spacing: .02em; }
.pill-nav { flex: 1; display: flex; justify-content: center; }
.pill-nav .rail { display: flex; gap: 2px; background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.pill-nav a { padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .87rem; color: var(--ink-2); white-space: nowrap; }
.pill-nav a:hover { color: var(--ink); }
.pill-nav a.on { background: var(--dark); color: #fff; }
.top-icons { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 999px; background: #fff; border: 0; box-shadow: var(--shadow); font-size: 1.05rem; display: grid; place-items: center; }
.icon-btn:hover { background: var(--accent-soft); }
.avatar { width: 42px; height: 42px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; box-shadow: var(--shadow); }
.bell { position: relative; }
.bell .dot { position: absolute; top: -3px; right: -3px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.notif-panel { position: absolute; right: 0; top: 52px; width: 360px; max-height: 430px; overflow: auto; z-index: 40; text-align: left; }
.main { padding: 10px 3vw 40px; max-width: 1240px; margin: 0 auto; width: 100%; }
.notif-item { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.notif-item:last-child { border-bottom: 0; }
.notif-item b { display: block; margin-bottom: 2px; }
.notif-item.unread { background: var(--accent-soft); border-radius: 10px; padding: 12px 10px; }

/* ---------- dashboard (Metricvibe layout) ---------- */
.mv-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 18px 0 26px; flex-wrap: wrap; }
.big-search { position: relative; flex: 1; min-width: 280px; max-width: 520px; }
.big-search input { width: 100%; border: 0; background: transparent; font-family: inherit; font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); outline: none; padding: 0 54px 0 0; }
.big-search input::placeholder { color: #C9C5C0; }
.big-search .go { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 999px; background: #fff; border: 0; box-shadow: var(--shadow); font-size: 1rem; }
.stat-trio { display: flex; gap: 38px; flex-wrap: wrap; }
.trio { min-width: 130px; }
.trio .lbl { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.trio .row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.trio .val { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.delta { border-radius: 999px; padding: 5px 12px; font-size: .72rem; font-weight: 800; color: #fff; }
.delta.up { background: #22A75D; }
.delta.down { background: #E0455A; }
.delta.mid { background: var(--amber); }

.mv-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; }
.mv-row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; margin-top: 18px; }
.card { border-radius: 24px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head .ic { width: 34px; height: 34px; border-radius: 999px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .95rem; }
.card-head h2 { font-size: .95rem; }
.card-head .more { margin-left: auto; color: var(--muted); font-weight: 800; letter-spacing: 2px; }
.pill-select { margin-left: auto; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }

/* wave card */
.wave-flex { display: flex; align-items: center; gap: 18px; }
.big-num { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.big-num .bubble { width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.wave { display: flex; align-items: center; gap: 3px; height: 74px; flex: 1; }
.wave i { flex: 1; max-width: 7px; border-radius: 99px; background: #FAD7BC; animation: wavein .6s ease both; }
.wave i.hot { background: var(--accent); }
@keyframes wavein { from { transform: scaleY(.2); opacity: 0 } }
.chip-row { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.mini-chip { width: 38px; height: 38px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; font-size: .95rem; position: relative; }
.mini-chip .tick { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 99px; background: var(--accent); border: 2px solid #fff; }

/* orange highlight card */
.hl-card { background: var(--accent); color: #fff; border-radius: 24px; padding: 18px; box-shadow: 0 14px 30px -12px rgba(249,115,22,.55); display: flex; flex-direction: column; }
.hl-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: .92rem; margin-bottom: 14px; }
.hl-head .ic { width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.hl-inner { background: #fff; color: var(--ink); border-radius: 18px; padding: 16px; flex: 1; }
.hl-inner .when { color: var(--muted); font-size: .78rem; margin-top: 10px; }
.hl-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .8rem; font-weight: 700; }
.hl-foot .dot2 { width: 8px; height: 8px; border-radius: 99px; background: #fff; }

/* right mini card */
.mini-stat-big { font-size: 2.1rem; font-weight: 800; text-align: right; letter-spacing: -.02em; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--ink-2); margin-top: 12px; }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 7px; }

/* charts */
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
/* dark inset card */
.dark-inset { background: #262220; color: #fff; border-radius: 20px; padding: 18px; }
.dark-inset h3 { font-size: .95rem; margin-bottom: 12px; }
.dark-inset .pills { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dark-inset .p1 { background: var(--accent); border-radius: 999px; padding: 7px 16px; font-size: .78rem; font-weight: 800; }
.dark-inset .p2 { background: #3A3532; border-radius: 999px; padding: 7px 16px; font-size: .78rem; font-weight: 700; color: #CFC9C4; }
.dot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 10px; align-items: center; }
.dot-grid span { aspect-ratio: 1; border-radius: 999px; }
.dg-hot { background: var(--accent); }
.dg-soft { background: #FAD7BC; }
.dg-ghost { border: 2px dashed #E4E0DC; }

/* ---------- invoice detail ---------- */
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.stepper { display: flex; gap: 0; margin: 20px 0; flex-wrap: wrap; }
.step { flex: 1; min-width: 150px; padding: 14px 16px 14px 20px; background: #fff; border: 1.5px solid var(--line); position: relative; font-size: .85rem; }
.step:first-child { border-radius: 14px 0 0 14px; }
.step:last-child { border-radius: 0 14px 14px 0; }
.step + .step { border-left: 0; }
.step b { display: block; font-size: .9rem; }
.step.done { background: var(--green-soft); border-color: #cdebd8; }
.step.now { background: var(--accent-soft); border-color: #fcd9bd; }
.step.skip { opacity: .55; }
.step .st { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.step.done .st { color: var(--green); } .step.now .st { color: var(--accent); }
.timeline { margin-top: 10px; }
.tl-item { display: flex; gap: 14px; padding: 10px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--line); margin-top: 6px; flex: none; }
.tl-item.approved .tl-dot, .tl-item.paid .tl-dot { background: var(--green); }
.tl-item.rejected .tl-dot { background: var(--red); }
.tl-item.changes_requested .tl-dot { background: var(--amber); }
.tl-item.submitted .tl-dot, .tl-item.resubmitted .tl-dot { background: var(--blue); }
.totals { margin-left: auto; width: 280px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: .95rem; }
.totals .grand { border-top: 2px solid var(--dark); font-weight: 800; font-size: 1.1rem; padding-top: 10px; margin-top: 4px; }

/* line items editor */
.item-row { display: grid; grid-template-columns: 1fr 90px 130px 120px 40px; gap: 10px; align-items: center; margin-bottom: 10px; }
.item-row input { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.item-row .amt { text-align: right; font-weight: 700; }
.del-item { background: var(--red-soft); color: var(--red); border: 0; border-radius: 9px; height: 36px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 460px; max-width: 100%; max-height: 90vh; overflow: auto; }
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--dark); color: #fff; border-radius: 13px; padding: 13px 18px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); animation: pop .2s; max-width: 360px; }
.toast.err { background: var(--red); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 15px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.chip.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 2.2rem; margin-bottom: 10px; }

@media (max-width: 1000px) {
  .mv-top { flex-wrap: wrap; }
  .pill-nav { order: 3; width: 100%; }
  .mv-row, .mv-row2 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .main { padding: 10px 16px 30px; }
  .item-row { grid-template-columns: 1fr 60px 90px 80px 34px; }
  .big-search input { font-size: 1.6rem; }
}

/* ---------- inline SVG icons ---------- */
.feature .ic svg, .flow-dot svg, .card-head .ic svg, .hl-head .ic svg,
.mini-chip svg, .icon-btn svg, .pw-eye svg, .big-search .go svg { display: block; }
.feature .ic { color: var(--accent); }
.flow-dot { color: var(--accent); }
.card-head .ic { color: var(--ink-2); }
.hl-head .ic { color: #fff; }
.mini-chip { color: var(--ink-2); }
.icon-btn { color: var(--ink); }
.pw-eye { color: var(--muted); }
.auth-points div { display: flex; align-items: center; gap: 10px; }
.auth-points svg { color: var(--accent); flex: 0 0 auto; }
.hl-inner .when { display: flex; align-items: center; gap: 6px; }
.empty .big { line-height: 0; color: var(--line); }
.empty .big svg { margin: 0 auto; }
