/* ===== Orila — base theme ===== */
:root {
  --bg: #0f1e3d;
  --bg-2: #14264c;
  --panel: #ffffff;
  --text: #1c2438;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #f4c430;
  --accent-2: #00a6a0;
  --danger: #e3342f;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 12px;
  --shadow: 0 4px 14px rgba(20,30,60,.06);
  --sidebar-w: 240px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: #f5f7fb; }
a { color: inherit; text-decoration: none; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand a { color: #fff; font-weight: 700; font-size: 1.1rem; display:flex; align-items:center; gap:10px; }
.logo-mark {
  width: 34px; height: 34px; background: var(--accent); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 800;
}
.topbar .top-right { display: flex; align-items: center; gap: 14px; }
.hello { color: #cbd5e1; font-size: 0.9rem; }
.btn-ghost { color:#fff; border:1px solid rgba(255,255,255,.3); padding:6px 12px; border-radius: 8px; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* admin skin uses a darker accent */
.admin-skin .topbar { background: #111827; }
.admin-skin .logo-mark { background: var(--accent-2); color: #fff; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h) - 50px); }
.sidebar {
  width: var(--sidebar-w); background: var(--bg-2); color: #cbd5e1;
  padding: 20px 0; flex-shrink: 0;
}
.sidebar nav { display: flex; flex-direction: column; }
.sidebar a {
  padding: 11px 22px; color: #cbd5e1; border-left: 3px solid transparent; font-size: 0.95rem;
  transition: all .15s ease;
}
.sidebar a:hover { background: rgba(255,255,255,.04); color: #fff; }
.sidebar a.active { background: rgba(244,196,48,.1); border-left-color: var(--accent); color: #fff; }
.main { flex: 1; padding: 24px 28px; }

.appfoot { text-align: center; padding: 14px; color: #94a3b8; font-size: .85rem; }

/* ---------- Cards / grid ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card {
  background: var(--panel); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.card h4 { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.card .big { font-size: 1.6rem; font-weight: 700; }
.c-pink   { background: #fde2e2; }
.c-rose   { background: #fbcfe8; }
.c-mint   { background: #d1fae5; }
.c-blue   { background: #dbeafe; }
.c-cyan   { background: #cffafe; }
.c-yellow { background: #fef3c7; }
.c-violet { background: #ede9fe; }
.c-magenta{ background: #fce7f3; }

/* ---------- Referral banner ---------- */
.referral-banner {
  background: #1f2937; color: #fff; padding: 18px 22px; border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px;
}
.referral-banner .link { font-family: monospace; word-break: break-all; }

/* ---------- Buttons ---------- */
.btn, .btn-primary, .btn-danger {
  border: 0; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .92rem;
  transition: opacity .15s ease;
}
.btn         { background: var(--accent); color: var(--bg); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn:hover, .btn-primary:hover { opacity: 0.92; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
  background: #fff; padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px;
}
.form-grid .full { grid-column: 1/-1; }
.form-grid h3 { grid-column: 1/-1; margin: 8px 0 0; }
label { display: block; font-size: .9rem; color: #374151; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; margin-top: 4px;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(244,196,48,.4); border-color: var(--accent); }
.hint { color: var(--muted); font-weight: normal; }

/* ---------- Tables ---------- */
.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px; }
.data th, .data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data th { background: #f8fafc; color: var(--muted); font-weight: 600; }
.data tbody tr:hover { background: #fafbfd; }

/* ---------- Tags / alerts ---------- */
.tag-ok  { background: #dcfce7; color: #166534; padding: 3px 8px; border-radius: 999px; font-size: .8rem; }
.tag-red { background: #fee2e2; color: #991b1b; padding: 3px 8px; border-radius: 999px; font-size: .8rem; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert.ok   { background: #dcfce7; color: #166534; }
.alert.err  { background: #fee2e2; color: #991b1b; }
.alert.info { background: #dbeafe; color: #1e3a8a; }

.badge { padding: 2px 10px; border-radius: 999px; color: #fff; font-size: .85rem; }

/* ---------- Tree ---------- */
.tree-wrap { background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.tree, .tree ul { list-style: none; padding-left: 22px; }
.tree.root { padding-left: 0; }
.tree li { position: relative; padding: 6px 0; }
.tree li::before { content: ""; position: absolute; left: -12px; top: 18px; width: 12px; height: 1px; background: #cbd5e1; }
.tree li::after { content: ""; position: absolute; left: -12px; top: 0; height: 100%; width: 1px; background: #cbd5e1; }
.tree.root > li::before, .tree.root > li::after { display: none; }
.tree .node { background: #f1f5f9; padding: 6px 12px; border-radius: 6px; display: inline-block; }
.tree .node.me { background: var(--accent); color: var(--bg); font-weight: 600; }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f1e3d, #14264c); padding: 20px; }
.auth-card { background: #fff; padding: 32px; border-radius: 14px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.auth-card h1 { margin-top: 0; color: var(--bg); }
.auth-card form > * { margin-bottom: 12px; }
.auth-card .btn-primary { width: 100%; padding: 12px; }

/* ---------- Landing page ---------- */
.landing { background: linear-gradient(180deg, #0f1e3d 0%, #14264c 60%, #f5f7fb 60%, #f5f7fb 100%); min-height: 100vh; }
.lp-nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 40px; color: #fff; }
.lp-nav .brand { font-weight: 700; font-size: 1.2rem; display:flex;align-items:center;gap:10px; }
.lp-nav nav a { color: #fff; margin-left: 16px; }
.hero { text-align: center; color: #fff; padding: 70px 20px 90px; }
.hero h1 { font-size: 3rem; margin: 0 0 12px; }
.hero p { font-size: 1.1rem; max-width: 640px; margin: 0 auto 26px; opacity: 0.9; }
.hero-cta { display: flex; gap: 12px; justify-content: center; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 1100px; margin: -40px auto 50px; padding: 0 24px; }
.features .card h3 { margin: 0 0 8px; }

/* ---------- Packages grid ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 20px; }
.pkg-card { background: #fff; padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.pkg-card h3 { margin: 0 0 4px; }
.pkg-card .price { font-size: 1.6rem; font-weight: 700; color: var(--bg); margin-bottom: 8px; }
.pkg-card ul { padding-left: 18px; margin: 10px 0; }

/* ---------- Status banner (verified/pending) ---------- */
.status-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-radius: var(--radius); margin-bottom: 18px; color: #fff;
}
.status-banner.green { background: linear-gradient(135deg, #166534, #16a34a); }
.status-banner.red   { background: linear-gradient(135deg, #991b1b, #e3342f); }
.status-banner .dot  { width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.3); animation: pulse 2s infinite; }
.status-banner .big  { font-weight: 700; font-size: 1.1rem; }
.status-banner .small{ opacity: .9; font-size: .9rem; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5);} 70% { box-shadow: 0 0 0 12px rgba(255,255,255,0);} 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0);}}

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-pill.green { background: #dcfce7; color: #166534; }
.status-pill.green .dot { background: #16a34a; }
.status-pill.red   { background: #fee2e2; color: #991b1b; }
.status-pill.red   .dot { background: #e3342f; }
.status-pill.amber { background: #fef3c7; color: #92400e; }
.status-pill.amber .dot { background: #d97706; }

/* ---------- Speedometer + invest summary row ---------- */
.dash-row { display: grid; grid-template-columns: 280px 1fr; gap: 18px; margin-bottom: 20px; }
.speedo-card { background: #fff; padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.speedo-card h4 { margin: 0 0 10px; text-align: center; color: var(--muted); }
.speedo { width: 100%; height: 130px; }

.invest-summary { background: #fff; padding: 8px 18px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.invest-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.invest-row:last-child { border-bottom: 0; }
.invest-row .lbl { color: var(--muted); font-size: .92rem; }
.invest-row .val { font-weight: 700; color: var(--bg); font-size: 1.05rem; }
.invest-row .val.ok { color: #16a34a; }

/* ---------- Payment card ---------- */
.payment-card { background: #fff; padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; border-left: 4px solid var(--accent); }
.payment-card .pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.payment-card .pc-head .big { font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
.payment-card .pc-upload { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.payment-card .pc-upload label { flex: 1; min-width: 240px; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .dash-row { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; padding: 8px 0; overflow-x: auto; }
  .sidebar nav { flex-direction: row; flex-wrap: nowrap; min-width: max-content; }
  .sidebar a { white-space: nowrap; padding: 10px 14px; border-left: 0; border-bottom: 3px solid transparent; }
  .sidebar a.active { border-left: 0; border-bottom-color: var(--accent); }
  .hero h1 { font-size: 2rem; }
  .topbar { padding: 0 14px; }
  .hello { display: none; }
}

/* ===== OVELA footer + landing additions ===== */
.brand-wordmark { display: none; }   /* image is the wordmark; hide text fallback */
.logo-img { vertical-align: middle; }

.appfoot {
  background: #0B2B5C;
  color: #cbd5e1;
  padding: 32px 24px 16px;
  margin-top: 48px;
}
.appfoot .foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}
.appfoot .foot-brand { flex: 1 1 220px; min-width: 200px; }
.appfoot .foot-legal { flex: 2 1 340px; min-width: 280px; }
.appfoot .foot-links {
  flex: 1 1 180px;
  display: flex; flex-direction: column; gap: 6px;
}
.appfoot .foot-links a { color: #f5d061; text-decoration: none; }
.appfoot .foot-links a:hover { text-decoration: underline; }
.appfoot .foot-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 20px;
  padding-top: 12px;
  text-align: center;
}
.appfoot .small { font-size: .82rem; }
.appfoot .muted { color: #94a3b8; }

.trust {
  text-align: center;
  padding: 18px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
