/* =========================================================
   Frooty Links — Admin
   ========================================================= */
:root {
  --green: #a4e005;
  --purple: #7c3aed;
  --purple-700: #6d28d9;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e6e8ee;
  --bg: #f4f5f9;
  --sidebar: #17102b;
  --radius: 14px;
  --font: "Segoe UI", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 250px; background:
    radial-gradient(400px 200px at 50% -40px, rgba(124,58,237,.5), transparent),
    linear-gradient(180deg, #241245, #120a24);
  color: #fff; padding: 22px 16px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 0 6px;
}
.sidebar .logo .ring {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff;
  background: linear-gradient(160deg, #6b21a8, #3b0d6b);
}
.sidebar .logo b { font-size: 16px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 11px; color: rgba(255,255,255,.75);
  font-size: 14.5px; font-weight: 500; margin-bottom: 4px; transition: .16s;
}
.sidebar nav a svg { width: 19px; height: 19px; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: rgba(164,224,5,.15); color: var(--green); }
.sidebar .spacer { flex: 1; }
.sidebar .signout {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1);
}

/* Main */
.main { flex: 1; min-width: 0; }
.topbar-admin {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 26px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar-admin h1 { font-size: 19px; margin: 0; }
.topbar-admin .user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--purple);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.content { padding: 26px; max-width: 1080px; margin: 0 auto; }

/* Cards / stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 4px 14px rgba(23,10,45,.04);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--purple-700); }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }

.panel-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(23,10,45,.04); margin-bottom: 22px; overflow: hidden;
}
.panel-box .ph {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-box .ph h2 { font-size: 16px; margin: 0; }
.panel-box .pb { padding: 20px; }

/* Tabelas */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.mini-tile {
  width: 30px; height: 30px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; vertical-align: middle;
}
.mini-tile svg { width: 16px; height: 16px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: .16s; background: #eef0f5; color: var(--ink);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-700); }
.btn-green { background: var(--green); color: #1c2b00; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 7px 11px; font-size: 13px; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-on { background: #dcfce7; color: #16a34a; }
.badge-off { background: #f1f5f9; color: #64748b; }

/* Formulários */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=number], .field input[type=url], .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.field textarea { min-height: 80px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
input[type=color] { width: 52px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Flash */
.flash { padding: 13px 18px; border-radius: 11px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }

.inline-form { display: inline; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.muted { color: var(--muted); }
.section-sep { margin: 26px 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .stats, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
