/* Admin — reaproveita as variáveis de cor/tipografia de style.css */

.admin-body {
  background: var(--color-bg-alt);
  min-height: 100vh;
}
.admin-shell {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.82);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 32px;
}
.admin-brand img { width: 34px; height: 34px; }
.admin-brand small { display: block; font-weight: 500; font-size: .7rem; color: rgba(255,255,255,.55); }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
.admin-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 600;
  color: rgba(255,255,255,.78);
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem;
}
.admin-sidebar-foot a { color: var(--color-gold); font-weight: 600; }

.admin-main {
  flex-grow: 1;
  padding: 32px 40px;
  max-width: 1100px;
}
.admin-main h1 { margin-bottom: 6px; }
.admin-lead { color: var(--color-text-muted); margin-bottom: 28px; }

.admin-flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
  font-size: .92rem;
}
.admin-flash-success { background: #E4F9EC; color: #1A7B41; }
.admin-flash-error { background: #FDEAEA; color: #B3261E; }

.admin-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 24px;
}

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 28px; }
.admin-stat { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; }
.admin-stat strong { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--color-primary); }
.admin-stat span { color: var(--color-text-muted); font-size: .85rem; }

.admin-table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--color-border); font-size: .92rem; }
table.admin-table th { background: var(--color-bg-alt); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table td.actions { display: flex; gap: 8px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-on { background: #E4F9EC; color: #1A7B41; }
.badge-off { background: #F1EFEC; color: #6B6870; }

.admin-form .field { margin-bottom: 18px; max-width: 640px; }
.admin-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.admin-form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=tel],
.admin-form input[type=url], .admin-form input[type=number], .admin-form input[type=password],
.admin-form input[type=file], .admin-form select, .admin-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-family: inherit;
  font-size: .94rem;
  background: var(--color-bg);
}
.admin-form textarea { min-height: 110px; resize: vertical; }
.admin-form .field-hint { font-size: .8rem; color: var(--color-text-muted); margin-top: 4px; }
.admin-form fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }
.admin-form legend { font-weight: 700; padding: 0 6px; }

.btn-danger { background: #B3261E; color: #fff; }
.btn-danger:hover { background: #8f1e18; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .admin-brand { margin-bottom: 0; margin-right: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-sidebar-foot { border-top: none; flex-direction: row; margin-left: auto; }
  .admin-main { padding: 24px 18px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-form .field-row { grid-template-columns: 1fr; }
}
