/* Vellona — admin panel styles (vanilla, no framework) */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1a2233;
  --muted: #5f6b7f;
  --line: #e3e8ef;
  --accent: #1f6feb;
  --accent-dark: #1858bd;
  --green: #1a9d5c;
  --green-bg: #e6f7ee;
  --yellow: #b7791f;
  --yellow-bg: #fdf3e0;
  --red: #c53030;
  --red-bg: #fdeaea;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

/* top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-size: 26px; }
.brand h1 { margin: 0; font-size: 19px; }
.brand .sub { color: var(--muted); font-size: 12.5px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.shop-name { color: var(--muted); font-size: 13px; }
.plan-badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: #eef1f6; color: var(--muted);
}
.plan-badge.pro { background: #1f6feb1a; color: var(--accent); }
.plan-badge.basic { background: var(--green-bg); color: var(--green); }
.plan-badge.trial { background: var(--yellow-bg); color: var(--yellow); }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.tab {
  border: none; background: none; padding: 13px 16px; cursor: pointer;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0 0 4px; font-size: 16px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 900px) { .grid.stats, .grid.two { grid-template-columns: 1fr 1fr; } }

/* stat cards */
.stat { text-align: center; padding: 16px; }
.stat .num { font-size: 30px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 12.5px; }
.stat.total .num { color: var(--ink); }
.stat.green .num { color: var(--green); }
.stat.yellow .num { color: var(--yellow); }
.stat.red .num { color: var(--red); }

/* buttons */
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer; font-weight: 500;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: #f7f9fc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #eef1f6; }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* inputs */
.input, select.input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid #1f6feb44; border-color: var(--accent); }
label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
label .input, label select { margin-top: 4px; color: var(--ink); }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.prod-cell { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.prod-cell img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: #eef1f6; }
.prod-cell .t { font-weight: 500; }
.prod-cell .h { color: var(--muted); font-size: 12px; }

/* badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.gray { background: #eef1f6; color: var(--muted); }

/* filters */
.filters { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.filters input { margin-left: auto; width: 240px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px;
  font-size: 13px; cursor: pointer; color: var(--muted);
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* banner */
.banner {
  background: var(--yellow-bg); border: 1px solid #ecd9ae; color: #7a5312;
  padding: 10px 16px; border-radius: var(--radius); margin-bottom: 18px;
}
.banner a { color: var(--accent); font-weight: 600; }
.banner-error { background: var(--red-bg); border-color: #e5b7b7; color: var(--red); }
.banner-error a { color: var(--red); text-decoration: underline; }

/* bulk layout */
.bulk-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 8px; }
@media (max-width: 900px) { .bulk-layout { grid-template-columns: 1fr; } }
.picker-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.picker-bar input { flex: 1; }
.picker-table { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.bulk-right h3 { margin: 18px 0 4px; font-size: 14px; }
.bulk-right h3:first-child { margin-top: 0; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
#attribute-form, #warning-form { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fafbfd; }
#warning-form label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; margin-bottom: 6px; }
#warning-form .wt { font-size: 12px; color: var(--muted); }

/* progress */
.progress { margin-top: 16px; }
.progress .bar { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--accent); width: 0; transition: width .3s; }

/* forms */
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 12px; }
legend { font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 0 6px; }
.saved { color: var(--green); font-size: 13px; margin-left: 10px; }

/* billing */
.current-plan { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .plan-cards { grid-template-columns: 1fr; } }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; position: relative; }
.plan-card.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-card h3 { margin: 0; font-size: 16px; }
.plan-card ul { margin: 8px 0 14px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.plan-card .tag { position: absolute; top: 14px; right: 14px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a2233; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

/* footer */
.footer {
  border-top: 1px solid var(--line); background: var(--card); padding: 18px 24px;
  color: var(--muted); font-size: 13px; margin-top: 32px;
}
.footer p { max-width: 1000px; margin: 0 auto 6px; }
.feature-list { color: var(--muted); }
