/* ============================================================
   BestFX.pl — panel administratora
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #05050c;
  --bg-alt: #0a0a18;
  --bg-card: #10101f;
  --bg-input: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.22);
  --blue: #3b6bff;
  --blue-bright: #5b8bff;
  --purple: #8b2dff;
  --grad: linear-gradient(135deg, #3b6bff 0%, #8b2dff 55%, #05050c 100%);
  --grad-text: linear-gradient(90deg, #6f9bff 0%, #b07bff 100%);
  --white: #ffffff;
  --text: #e9e9f3;
  --text-muted: #9797ad;
  --text-dim: #6e6e83;
  --green: #38d996;
  --red: #ff6767;
  --yellow: #ffb020;
  --radius: 20px;
  --radius-sm: 12px;
  --sidebar-w: 264px;

  /* liquid glass */
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.015) 45%, rgba(255, 255, 255, 0.04) 100%), rgba(20, 20, 38, 0.4);
  --glass-bg-strong: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.06) 100%), rgba(28, 28, 50, 0.5);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-strong: rgba(255, 255, 255, 0.28);
  --glass-blur: blur(22px) saturate(160%);
  --glass-shadow: 0 24px 60px -16px rgba(2, 2, 12, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-decor .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.32;
}

.bg-decor .o1 { width: 520px; height: 520px; background: var(--blue); top: -160px; left: -120px; }
.bg-decor .o2 { width: 480px; height: 480px; background: var(--purple); top: 30%; right: -180px; }
.bg-decor .o3 { width: 440px; height: 440px; background: var(--blue); bottom: -140px; left: 25%; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.login-screen .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.login-screen .o1 { width: 460px; height: 460px; background: var(--blue); top: -120px; left: -120px; }
.login-screen .o2 { width: 460px; height: 460px; background: var(--purple); bottom: -160px; right: -140px; }

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
  border-radius: 26px;
  padding: 44px 38px;
  box-shadow: var(--glass-shadow), 0 30px 80px rgba(0, 0, 0, 0.5);
}

.login-logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.login-logo span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.login-error {
  display: none;
  background: rgba(255, 70, 70, 0.12);
  border: 1px solid rgba(255, 70, 70, 0.3);
  color: #ff8a8a;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}

.login-error.show { display: block; }

/* ============================================================
   ADMIN SHELL
   ============================================================ */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(8, 8, 18, 0.55);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 26px 26px 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 10px 14px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  margin-bottom: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 107, 255, 0.18), rgba(139, 45, 255, 0.08));
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--blue-bright);
}

.nav-item .badge {
  margin-left: auto;
  background: var(--grad);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 100%);
  mask-image: radial-gradient(circle, #fff 100%, #000 100%);
}

.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 18px 14px 8px;
}

.sidebar-footer {
  padding: 18px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}

.sidebar-user .name {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.sidebar-user .role {
  font-size: 12px;
  color: var(--text-dim);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 70, 70, 0.08);
  border: 1px solid rgba(255, 70, 70, 0.2);
  color: #ff8a8a;
  font-size: 13px;
  font-weight: 600;
}

.logout-btn:hover {
  background: rgba(255, 70, 70, 0.15);
}

.view-site-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.view-site-link:hover { color: white; border-color: var(--border-hover); }

/* ---------------- main content ---------------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 60%), rgba(5, 5, 12, 0.6);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}

.topbar h1 {
  font-size: 22px;
}

.topbar-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
}

.page {
  padding: 34px;
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 100%);
  mask-image: radial-gradient(circle, #fff 100%, #000 100%);
}

.btn-primary { background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 45%), var(--grad); color: white; box-shadow: 0 6px 20px rgba(90, 60, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(120, 70, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.4); }

.btn-ghost { background: var(--glass-bg); color: white; border-color: var(--glass-border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-ghost:hover { border-color: var(--glass-border-strong); background: var(--glass-bg-strong); }

.btn-danger { background: rgba(255, 70, 70, 0.12); color: #ff8a8a; border-color: rgba(255, 70, 70, 0.3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-danger:hover { background: rgba(255, 70, 70, 0.2); }

.btn-icon { padding: 9px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------------- stat cards ---------------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.stat-card:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-3px);
}

.stat-card .top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.stat-card .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 100%);
  mask-image: radial-gradient(circle, #fff 100%, #000 100%);
}

.stat-card .trend {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend.up { background: rgba(56, 217, 150, 0.12); color: var(--green); }
.trend.flat { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }

.stat-card .value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.stat-card .label { color: var(--text-muted); font-size: 13px; }

/* ---------------- panels / cards ---------------- */
.panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 26px;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-head h3 { font-size: 17px; }
.panel-head p { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ---------------- bar chart ---------------- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 10px;
}

.bar-chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}

.bar-chart .bar {
  width: 100%;
  max-width: 40px;
  border-radius: 8px 8px 3px 3px;
  background: var(--grad);
  min-height: 4px;
  position: relative;
  transition: opacity 0.2s ease;
}

.bar-chart .bar:hover { opacity: 0.8; }

.bar-chart .bar-label { font-size: 11px; color: var(--text-dim); }
.bar-chart .bar-val { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ---------------- lists ---------------- */
.mini-list { display: grid; gap: 4px; }

.mini-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.mini-list-item:hover { background: rgba(255, 255, 255, 0.03); }

.mini-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.mini-list-item .title { font-size: 13.5px; font-weight: 600; color: white; }
.mini-list-item .sub { font-size: 12px; color: var(--text-dim); }
.mini-list-item .right { margin-left: auto; text-align: right; font-size: 13px; color: var(--text-muted); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--text-dim); }

/* ---------------- toolbar ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--text-dim);
}

.search-input input {
  flex: 1;
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  outline: none;
}

.select-filter {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}

.select-filter option { background: var(--bg-card); }

/* ---------------- data cards grid (portfolio admin) ---------------- */
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.admin-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-card:hover { border-color: var(--glass-border-strong); transform: translateY(-3px); }

.admin-card .thumb {
  aspect-ratio: 16/10;
  position: relative;
}

.admin-card .thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.admin-card .thumb .badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 100%);
  mask-image: radial-gradient(circle, #fff 100%, #000 100%);
}

.chip.featured { background: var(--grad); }

.admin-card .body { padding: 16px; }
.admin-card .body h4 { font-size: 15px; margin-bottom: 6px; }
.admin-card .body p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; min-height: 32px; }

.admin-card .row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.admin-card .views {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover { color: white; border-color: var(--border-hover); }
.icon-btn.danger:hover { color: #ff8a8a; border-color: rgba(255,70,70,0.3); background: rgba(255,70,70,0.08); }

/* ---------------- table ---------------- */
.table-wrap { overflow-x: auto; }

table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }

.data-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr.unread { background: rgba(59, 107, 255, 0.05); }

.data-table .name-cell { font-weight: 600; color: white; }
.data-table .muted { color: var(--text-muted); font-size: 13px; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-dot.unread { background: var(--blue-bright); box-shadow: 0 0 8px var(--blue-bright); }
.status-dot.read { background: var(--text-dim); }

/* ---------------- testimonial admin card ---------------- */
.tst-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 22px;
}

.tst-card .head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tst-card .stars { color: var(--yellow); display: flex; gap: 2px; margin-bottom: 10px; }
.tst-card .stars .icon { width: 14px; height: 14px; }
.tst-card p.txt { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }

/* ---------------- forms / modal ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 8, 0.72);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  background: rgba(16, 16, 31, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2;
}

.modal-header h3 { font-size: 17px; }

.modal-body { padding: 26px; }
.modal-footer {
  padding: 20px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.field-group { margin-bottom: 18px; }
.field-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 11px 14px;
  color: white;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(91, 139, 255, 0.15);
}

.field-group textarea { resize: vertical; min-height: 90px; }
.field-group select option { background: var(--bg-card); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-row input { width: auto; }

.color-pair { display: flex; gap: 10px; align-items: center; }
.color-pair input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.color-preview {
  height: 70px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-zone:hover { border-color: var(--border-hover); }
.upload-zone .icon { margin: 0 auto 8px; color: var(--text-dim); }

/* ---------------- content editor tabs ---------------- */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.tab-btn {
  padding: 12px 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover { color: white; }
.tab-btn.active { color: white; border-bottom-color: var(--blue-bright); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

.repeatable-item {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
}

.repeatable-item .remove-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 400;
  box-shadow: var(--glass-shadow), 0 20px 50px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 340px;
}

.toast.show { transform: translateY(0); opacity: 1; visibility: visible; }

.toast .ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(56, 217, 150, 0.15);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.error .ico { background: rgba(255, 70, 70, 0.15); color: var(--red); }
.toast .msg { font-size: 14px; color: white; font-weight: 500; }

/* ---------------- confirm dialog ---------------- */
.confirm-box .modal-body { text-align: center; padding: 34px 26px 10px; }
.confirm-box .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 70, 70, 0.1);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.confirm-box p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: block; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stat-cards { grid-template-columns: 1fr; }
  .page { padding: 20px; }
  .topbar { padding: 16px 20px; }
}
