:root {
  --adm-primary: #0EA5B8;
  --adm-primary-dark: #085166;
  --adm-accent: #7A9A6B;
  --adm-success: #10B981;
  --adm-warn: #F59E0B;
  --adm-danger: #EF4444;
  --adm-bg: #F3F6F8;
  --adm-surface: #FFFFFF;
  --adm-surface-2: #F8FAFB;
  --adm-border: #E2E8EF;
  --adm-border-2: #CBD5E1;
  --adm-text: #0F2B39;
  --adm-text-2: #4A6573;
  --adm-text-3: #88A2B2;
  --adm-sidebar-w: 220px;
  --adm-header-h: 52px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15,43,57,.05), 0 1px 3px rgba(15,43,57,.08);
  --shadow: 0 4px 12px rgba(15,43,57,.08), 0 2px 4px rgba(15,43,57,.05);
  --shadow-lg: 0 20px 40px rgba(15,43,57,.16), 0 6px 16px rgba(15,43,57,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--adm-bg); color: var(--adm-text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}

a { color: var(--adm-primary); text-decoration: none; }
a:hover { color: var(--adm-primary-dark); }

/* ========== LOGIN ========== */
.adm-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(14,165,184,.20), transparent 60%),
    radial-gradient(1000px 500px at 110% 110%, rgba(122,154,107,.22), transparent 60%),
    linear-gradient(135deg, #0A2535 0%, #0F2B39 40%, #0D3A48 100%);
  padding: 24px 16px;
}
.adm-login-card { width: min(420px, 100%); background: var(--adm-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 28px 26px 22px; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.6);
}
.adm-login-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--adm-primary), var(--adm-accent)); }
.adm-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.adm-login-brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 18px;
  box-shadow: 0 6px 16px rgba(14,165,184,.35);
}
.adm-login-brand h1 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: .2px; }
.adm-login-brand small { color: var(--adm-text-2); font-weight: 500; font-size: 12px; }

.adm-login-form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--adm-text-2);
  margin: 14px 0 6px; letter-spacing: .2px; }
.adm-login-form input[type=text], .adm-login-form input[type=password] {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--adm-border-2); background: var(--adm-surface-2);
  font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.adm-login-form input:focus { outline: none; border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px rgba(14,165,184,.14); background: #fff; }
.adm-login-error { margin: 0 0 8px; padding: 10px 12px; background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.22); color: #991B1B; border-radius: 10px; font-size: 13px; }
.adm-login-submit { width: 100%; margin-top: 18px; padding: 12px; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #18C2D6 0%, #0EA5B8 100%); color: #fff; font-weight: 700;
  font-size: 14.5px; letter-spacing: .3px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(14,165,184,.40), 0 1px 0 rgba(255,255,255,.30) inset;
  transition: transform .15s;
}
.adm-login-submit:hover { transform: translateY(-1px); }
.adm-login-submit:active { transform: translateY(0); }
.adm-login-hint { margin-top: 16px; padding: 10px 12px; background: rgba(14,165,184,.06);
  border: 1px solid rgba(14,165,184,.18); border-radius: 10px; font-size: 12px; color: var(--adm-text-2); }
.adm-login-hint code { background: rgba(15,43,57,.08); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ========== SHELL (header + sidebar + main) ========== */
.adm-shell { display: grid; min-height: 100vh;
  grid-template-columns: var(--adm-sidebar-w) 1fr;
  grid-template-rows: var(--adm-header-h) 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
}
.adm-header { grid-area: header; background: var(--adm-surface); border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  position: sticky; top: 0; z-index: 50;
}
.adm-header-left, .adm-header-right { display: flex; align-items: center; gap: 10px; }
.adm-header-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.adm-header-brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px;
  box-shadow: 0 3px 8px rgba(14,165,184,.32);
}
.adm-header-btn {
  border: 1px solid var(--adm-border); background: var(--adm-surface); color: var(--adm-text-2);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.adm-header-btn:hover { color: var(--adm-primary); background: var(--adm-surface-2); }
.adm-header-user { display: flex; align-items: center; gap: 7px; padding: 3px 9px 3px 3px;
  border: 1px solid var(--adm-border); border-radius: 999px; cursor: pointer; background: var(--adm-surface);
  transition: background .15s;
}
.adm-header-user:hover { background: var(--adm-surface-2); }
.adm-header-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--adm-accent), #4D6B42); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11.5px;
}
.adm-header-user-name { font-size: 12.5px; font-weight: 600; }
.adm-header-user-role { font-size: 10.5px; color: var(--adm-text-3); display: block; }

/* Sidebar */
.adm-sidebar { grid-area: sidebar; background: var(--adm-surface); border-right: 1px solid var(--adm-border);
  padding: 5px 6px 6px; position: sticky; top: var(--adm-header-h);
  height: calc(100vh - var(--adm-header-h)); overflow-y: auto;
}
.adm-sidebar-section { margin: 5px 3px 2px; font-size: 9.5px; color: var(--adm-text-3);
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.adm-nav-item { display: flex; align-items: center; gap: 7px; padding: 5.5px 9px;
  border-radius: 7px; color: var(--adm-text-2); font-size: 12.2px; font-weight: 500;
  margin-bottom: 1px; cursor: pointer; transition: background .1s, color .1s;
  line-height: 1.2;
}
.adm-nav-item:hover { background: var(--adm-surface-2); color: var(--adm-text); }
.adm-nav-item.active { background: rgba(14,165,184,.10); color: var(--adm-primary-dark);
  font-weight: 600; box-shadow: inset 3px 0 0 var(--adm-primary); }
.adm-nav-item svg { width: 13.5px; height: 13.5px; flex-shrink: 0; }
.adm-nav-sub { padding-left: 16px; margin-top: 0.5px; }
.adm-nav-sub .adm-nav-item { padding: 4.5px 8px; font-size: 11.8px; }

.adm-nav-sub .adm-nav-item.active {
  background: linear-gradient(135deg, rgba(14,165,184,.14), rgba(14,165,184,.06));
  color: var(--adm-primary-dark);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--adm-primary), 0 1px 2px rgba(14,165,184,.12);
  position: relative;
}
.adm-nav-sub .adm-nav-item.active svg { stroke: var(--adm-primary); }
.adm-nav-sub .adm-nav-item.active::after {
  content: "✓";
  margin-left: auto;
  font-size: 10px;
  color: var(--adm-primary);
  font-weight: 800;
  padding-left: 6px;
  flex-shrink: 0;
}

.adm-nav-item.has-active-submenu {
  background: rgba(14,165,184,.07);
  color: var(--adm-primary-dark);
  border-left: 3px solid var(--adm-primary);
  padding-left: 6px;
  font-weight: 600;
}
.adm-nav-item.has-active-submenu svg { stroke: var(--adm-primary); }

.adm-main { grid-area: main; padding: 10px 14px 24px; min-width: 0; }
.adm-page-head { margin-bottom: 12px; padding: 8px 0; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; }
.adm-page-title { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.adm-page-sub { color: var(--adm-text-2); font-size: 12.5px; margin: 2px 0 0; }
.adm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 9px; border: 1px solid transparent; background: var(--adm-primary); color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 8px rgba(14,165,184,.22); transition: transform .12s, background .15s;
}
.adm-btn:hover { transform: translateY(-1px); color: #fff; }
.adm-btn-ghost { background: var(--adm-surface); border-color: var(--adm-border-2); color: var(--adm-text);
  box-shadow: none; }
.adm-btn-ghost:hover { background: var(--adm-surface-2); color: var(--adm-primary-dark); }
.adm-btn-danger { background: var(--adm-danger); box-shadow: 0 3px 8px rgba(239,68,68,.25); }
.adm-btn-sm { padding: 5px 10px; font-size: 12px; }
.adm-btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }

/* Cards / grid */
.adm-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.adm-card { background: var(--adm-surface); border: 1px solid var(--adm-border); border-radius: 9px;
  padding: 14px 16px; box-shadow: var(--shadow-sm); }
.adm-stat-label { font-size: 11.5px; font-weight: 600; color: var(--adm-text-3);
  text-transform: uppercase; letter-spacing: .6px; }
.adm-stat-value { font-size: 22px; font-weight: 800; margin-top: 3px;
  background: linear-gradient(135deg, var(--adm-primary-dark), var(--adm-accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.adm-stat-foot { margin-top: 5px; font-size: 11.5px; color: var(--adm-text-2); }

.adm-row { display: grid; gap: 12px; }
.adm-row.cols-2 { grid-template-columns: 1fr; }

.adm-card-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.adm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.adm-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--adm-text-3);
  text-transform: uppercase; letter-spacing: .4px; padding: 6px 8px; border-bottom: 1px solid var(--adm-border);
  background: var(--adm-surface-2); }
.adm-table th:first-child { border-top-left-radius: 8px; }
.adm-table th:last-child { border-top-right-radius: 8px; }
.adm-table td { padding: 6px 8px; border-top: 1px solid var(--adm-border); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: rgba(14,165,184,.04); }
.adm-badge { display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.adm-badge.success { background: rgba(16,185,129,.12); color: #065F46; }
.adm-badge.muted   { background: rgba(148,163,184,.15); color: #475569; }
.adm-badge.danger  { background: rgba(239,68,68,.12); color: #991B1B; }
.adm-badge.warn    { background: rgba(245,158,11,.14); color: #92400E; }
.adm-badge.primary { background: rgba(14,165,184,.12); color: var(--adm-primary-dark); }
.adm-badge.self-info { background: #dbeafe; color: #1e40af; font-size: 11px; padding: 2px 8px; font-weight: 700; }

.adm-row-self td { border-top-color: #bfdbfe; }

/* Forms admin */
.adm-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.adm-field { display: flex; flex-direction: column; gap: 4px; }
.adm-field.full { grid-column: 1 / -1; }
.adm-field label { font-size: 12px; font-weight: 600; color: var(--adm-text-2); letter-spacing: .15px; }
.adm-field label em { color: var(--adm-danger); font-style: normal; margin-left: 2px; }
.adm-field input[type=text], .adm-field input[type=url], .adm-field input[type=number],
.adm-field input[type=email], .adm-field input[type=password], .adm-field input[type=date],
.adm-field select, .adm-field textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--adm-border-2);
  background: var(--adm-surface-2); font-size: 13px; color: var(--adm-text);
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
}
.adm-field textarea { resize: vertical; min-height: 60px; }
.adm-field textarea[rows] { resize: vertical; min-height: 60px; }
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus {
  outline: none; border-color: var(--adm-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(14,165,184,.14);
}
.adm-help, .adm-field-help { font-size: 11.5px; color: var(--adm-text-3); }
.adm-field-help { margin-top: 2px; }

/* Section cards list */
.adm-sections-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.adm-section-card {
  background: var(--adm-surface); border: 1px solid var(--adm-border); border-radius: 10px;
  padding: 14px; cursor: grab; transition: transform .1s, box-shadow .15s, border-color .15s;
  position: relative;
}
.adm-section-card:hover { box-shadow: var(--shadow); border-color: rgba(14,165,184,.35); }
.adm-section-card:active { cursor: grabbing; }
.adm-section-card.dragging { opacity: .6; transform: scale(.98); }
.adm-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.adm-section-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(14,165,184,.10); color: var(--adm-primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.adm-section-name { margin: 0; font-size: 14px; font-weight: 700; }
.adm-section-key { font-size: 11px; color: var(--adm-text-3); font-family: ui-monospace, Consolas, monospace; }
.adm-section-desc { font-size: 12px; color: var(--adm-text-2); margin: 2px 0 8px; line-height: 1.45; }
.adm-section-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 8px; border-top: 1px dashed var(--adm-border); }
.adm-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.adm-switch input { opacity: 0; width: 0; height: 0; }
.adm-switch-slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--adm-border-2);
  border-radius: 999px; transition: background .15s;
}
.adm-switch-slider::before {
  position: absolute; content: ''; height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.adm-switch input:checked + .adm-switch-slider { background: var(--adm-primary); }
.adm-switch input:checked + .adm-switch-slider::before { transform: translateX(18px); }

/* ========== NOVOS COMPONENTES ========== */
.adm-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--adm-border); margin-top: 14px; }

.adm-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: rgba(14,165,184,.10); color: var(--adm-primary-dark); font-size: 11.5px; font-weight: 600; }
.adm-tag.green { background: rgba(16,185,129,.12); color: #065F46; }
.adm-tag.yellow { background: rgba(245,158,11,.14); color: #92400E; }
.adm-tag.red { background: rgba(239,68,68,.12); color: #991B1B; }
.adm-tag.muted { background: rgba(148,163,184,.18); color: #475569; }

.adm-sections-group { margin-bottom: 4px; }
.adm-sections-group__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 4px 2px 10px; margin-bottom: 6px;
  border-bottom: 1px solid var(--adm-border);
}
.adm-sections-group__head h2 {
  margin: 0; font-size: 14px; font-weight: 700; color: var(--adm-text-1);
  display: inline-flex; align-items: center; gap: 8px;
}
.adm-sections-group__head h2 svg { color: var(--adm-primary-dark); }

.adm-section-card.adm-card--global {
  background: linear-gradient(180deg, rgba(148,163,184,.05), rgba(148,163,184,.02));
  border-color: rgba(148,163,184,.3);
}
.adm-section-card.adm-card--global:hover { border-color: rgba(100,116,139,.5); }
.adm-section-card.adm-card--warn {
  border-color: rgba(245,158,11,.5);
  box-shadow: inset 0 0 0 1px rgba(245,158,11,.18);
  background: linear-gradient(180deg, rgba(253,230,138,.12), rgba(253,230,138,.03));
}
.adm-section-card.adm-card--warn:hover { border-color: rgba(217,119,6,.7); }

.adm-stat-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }

.adm-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.adm-stats-grid .adm-stat-card { min-width: 0; }

.adm-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-weight: 600; letter-spacing: .3px;
}
.adm-avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }
.adm-avatar.md { width: 32px; height: 32px; font-size: 13px; }
.adm-avatar.lg { width: 40px; height: 40px; font-size: 15px; }

.adm-2col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px 20px;
}

.adm-input-wrap { position: relative; }
.adm-input-wrap .adm-input { padding-right: 44px; }
.adm-eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer; color: #6b7280;
  padding: 6px; border-radius: 6px; display: inline-flex;
  align-items: center; justify-content: center;
}
.adm-eye-btn:hover { background: #f3f4f6; color: #111827; }
.adm-eye-btn:active { background: #e5e7eb; }

.adm-table-wrap { overflow-x: auto; margin: 6px -4px 0; }

.adm-list-row { display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px; border-top: 1px solid var(--adm-border); }

.adm-media-grid { display: grid; gap: 6px; padding: 4px 0;
  grid-template-columns: repeat(2, 1fr); }
.adm-media-grid > div { aspect-ratio: 1 / 1; background: var(--adm-surface-2);
  border-radius: 8px; overflow: hidden; position: relative; border: 1px solid var(--adm-border); }

.adm-chips-input { width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1.5px solid var(--adm-border-2); background: var(--adm-surface-2);
  font-size: 13px; font-family: inherit; resize: vertical; min-height: 80px; }

.adm-divider { height: 1px; background: var(--adm-border); margin: 12px -18px; }

.adm-flash-success { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(16,185,129,.25);
  background: rgba(16,185,129,.08); color: #065F46; font-size: 12.5px; margin-bottom: 12px; }
.adm-flash-error { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.08); color: #991B1B; font-size: 12.5px; margin-bottom: 12px; }

.adm-dica-card { padding: 10px 12px; font-size: 12px; background: rgba(14,165,184,.06);
  border: 1px solid rgba(14,165,184,.18); border-radius: 8px; color: var(--adm-text-2); }

/* ========== RESPONSIVE (Mobile First) ========== */
@media (min-width: 760px) {
  .adm-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-sections-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-row.cols-2 { grid-template-columns: 1.4fr 1fr; }
  .adm-media-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .adm-shell {
    grid-template-columns: var(--adm-sidebar-w) 1fr;
    grid-template-areas:
      "header header"
      "sidebar main";
  }
  .adm-sidebar { position: sticky; top: var(--adm-header-h);
    height: calc(100vh - var(--adm-header-h)); width: auto; transform: none; box-shadow: none;
  }
  .adm-sidebar-toggle { display: none; }
  .adm-media-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 959px) {
  :root { --adm-sidebar-w: 0px; }
  .adm-sidebar { position: fixed; top: var(--adm-header-h); bottom: 0; left: 0;
    width: 260px; z-index: 80; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: 0 20px 40px rgba(15,43,57,.15);
    height: calc(100vh - var(--adm-header-h));
    background: var(--adm-surface);
    padding: 7px 6px 6px;
  }
  .adm-sidebar.open, .adm-sidebar.sidebar-open { transform: translateX(0); }
  .adm-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .adm-main { padding: 10px; }
  .adm-nav-item {
    padding: 7.5px 10px;
    min-height: 38px;
    font-size: 13px;
    gap: 8px;
    margin-bottom: 1px;
    border-radius: 7.5px;
  }
  .adm-nav-sub { padding-left: 10px; margin-top: 0.5px; }
  .adm-nav-sub .adm-nav-item {
    padding: 6.5px 9px;
    font-size: 12.5px;
    min-height: 36px;
    gap: 7px;
  }
  .adm-sidebar-section {
    font-size: 9.5px;
    padding: 6px 2px 2px;
    margin: 2px 0 0;
  }
  .adm-nav-item.has-active-submenu {
    padding-left: 6px;
  }
  .adm-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .adm-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .adm-sections-grid { grid-template-columns: repeat(3, 1fr); }
  .adm-grid { grid-template-columns: repeat(3, 1fr); }
  .adm-media-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1500px) {
  .adm-stat-grid { grid-template-columns: repeat(4, 1fr); }
  .adm-sections-grid { grid-template-columns: repeat(4, 1fr); }
  .adm-grid { grid-template-columns: repeat(4, 1fr); }
  .adm-media-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 759px) {
  .adm-stat-grid { grid-template-columns: 1fr; }
  .adm-sections-grid { grid-template-columns: 1fr; }
  .adm-grid { grid-template-columns: 1fr; }
  .adm-media-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-form-grid { grid-template-columns: 1fr; }
  .adm-row.cols-2 { grid-template-columns: 1fr; }
  .adm-header { padding: 0 12px; }
  .adm-header-user-name { display: none; }
  .adm-header-user-role { display: none; }
  .adm-header-user { padding: 4px; }
  .adm-header-brand span { display: none; }

  .adm-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-2col-layout { grid-template-columns: 1fr; }

  .adm-users-table thead { display: none; }
  .adm-users-table,
  .adm-users-table tbody,
  .adm-users-table tr,
  .adm-users-table td { display: block; width: 100% !important; box-sizing: border-box; }
  .adm-users-table tr {
    padding: 12px 12px 10px;
    margin-bottom: 12px;
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    background: var(--adm-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  }
  .adm-users-table tr.adm-row-self { border-color: #bfdbfe; background: #eff6ff; }
  .adm-users-table td {
    border-top: none;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right;
    min-height: 28px;
  }
  .adm-users-table td + td { margin-top: 2px; }
  .adm-users-table td::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--adm-text-3);
    text-transform: uppercase;
    letter-spacing: .35px;
    flex-shrink: 0;
    text-align: left;
    margin-right: auto;
  }
  .adm-users-table td:first-child {
    padding: 0 0 8px 0;
    border-bottom: 1px dashed var(--adm-border);
    margin-bottom: 4px;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .adm-users-table td:first-child::before { display: none; }
  .adm-users-table td:last-child {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed var(--adm-border);
    justify-content: flex-end;
  }
  .adm-users-table td:last-child::before { display: none; }
  .adm-users-table .adm-avatar { flex-shrink: 0; }
  .adm-users-table .adm-badge { max-width: 100%; }
}

@media (max-width: 640px) {
  html, body { font-size: 13px; }
  .adm-form-grid { grid-template-columns: 1fr; }
  .adm-field { width: 100%; }
  .adm-page-title { font-size: 17px; }
  .adm-page-sub { font-size: 12px; }
  .adm-main { padding: 12px; }
  .adm-card { padding: 12px 14px; }
  .adm-divider { margin: 10px -14px; }
  .adm-table-wrap { overflow-x: auto; margin: 6px -4px 0; -webkit-overflow-scrolling: touch; }
  .adm-form-actions { flex-direction: column; align-items: stretch; }
  .adm-form-actions .adm-btn { width: 100%; justify-content: center; }

  .adm-stats-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .adm-users-table tr { padding: 10px; margin-bottom: 10px; border-radius: 10px; }
  .adm-users-table td { min-height: 26px; font-size: 12.5px; }
}

/* ========== PRINT + DENSIDADE MAX ========== */
@page { size: A4 portrait; margin: 7mm 6mm 8mm; }
@media print {
  html, body { background: #fff !important; color: #0B1E2A !important; font-size: 10pt; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .adm-sidebar, .adm-header, .adm-flash-success, .adm-flash-error,
  .adm-breadcrumb, .adm-page-head .adm-btns-actions, .adm-form-actions,
  .adm-btns-inline, .adm-btn-del, .adm-btn-save, .adm-btn-ghost-print,
  .adm-sidebar-toggle, .no-print, .ticket-print-btn,
  .adm-table-actions-col .adm-btn-icon:not(.adm-btn-print),
  .adm-card-toolbar > *:not(.adm-btn-print),
  a[href]:not([href^="#"]):not([href*="print"])::after { content: none; }
  .adm-sidebar, .adm-header, .adm-flash-success, .adm-flash-error, .no-print {
    display: none !important;
  }
  .adm-shell { grid-template-columns: 1fr !important; grid-template-areas: "main" !important; }
  .adm-main { padding: 0 !important; }
  .adm-table tbody tr:hover { background: transparent !important; }
  .adm-card, .adm-table, .adm-badge { box-shadow: none !important; }
  .print-only { display: block !important; }
  .ticket-break { page-break-before: always; }
  .print-ticket-condensed font-size: 9.5pt;
}

/* utilidades global (tela e impressão) */
.no-print { }
.print-only { display: none; }

.adm-card-compact { padding: 10px 12px !important; }
.adm-detail-row { padding: 5px 0 !important; }

.adm-table.dense td { padding: 4px 6px !important; }
.adm-table.dense th { padding: 5px 6px !important; }
.adm-table tr { page-break-inside: avoid; }

.adm-btns-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-chip-status { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px;
  font-size:11px; font-weight:700; border:1px solid transparent; }
.adm-chip-status.pending   { background:#FFF7ED; color:#9A3412; border-color:#FDBA74; }
.adm-chip-status.confirmed { background:#ECFDF5; color:#065F46; border-color:#6EE7B7; }
.adm-chip-status.canceled,.adm-chip-status.cancelled{ background:#FEF2F2; color:#991B1B; border-color:#FCA5A5; }
.adm-chip-status.checked_in{ background:#EFF6FF; color:#1E3A8A; border-color:#93C5FD; }
.adm-chip-status.checked_out{background:#F3F4F6; color:#1F2937; border-color:#D1D5DB; }
.adm-chip-status.rejected  { background:#FEF2F2; color:#991B1B; border-color:#FCA5A5; }
.adm-chip-status.no_show   { background:#FEE2E2; color:#991B1B; border-color:#FCA5A5; }

.adm-chip-pay { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px;
  font-size:11px; font-weight:700; border:1px solid transparent; }
.adm-chip-pay.paid     { background:#ECFDF5; color:#065F46; border-color:#6EE7B7; }
.adm-chip-pay.unpaid   { background:#FEF2F2; color:#991B1B; border-color:#FCA5A5; }
.adm-chip-pay.partial  { background:#FFF7ED; color:#9A3412; border-color:#FDBA74; }
.adm-chip-pay.refunded { background:#F3F4F6; color:#374151; border-color:#D1D5DB; }

.adm-btn-primary { background: linear-gradient(180deg, #18C2D6 0%, #0EA5B8 100%); color:#fff;
  box-shadow: 0 4px 12px rgba(14,165,184,.32); }
.adm-btn-primary:hover { background: #0A7C8B; color:#fff; }

.adm-table tr.adm-tr-today { background: rgba(14,165,184,.04); }
.adm-table tr.adm-tr-today td:first-child { border-left: 3px solid var(--adm-primary); }
.adm-mini-badge { display: inline-flex; align-items: center; padding: 2px 7px;
  border-radius: 5px; font-size: 10.5px; font-weight: 700; background: #F1F5F9;
  color: #0F2B39; border: 1px solid #E2E8F0; margin-right: 4px; }
.adm-mini-badge.bab { background:#ECFDF5; color:#065F46; border-color:#6EE7B7; }
.adm-mini-badge.mat { background:#FFF7ED; color:#9A3412; border-color:#FDBA74; }
.adm-mini-badge.ad { background:#EFF6FF; color:#1E3A8A; border-color:#93C5FD; }
.adm-mini-badge.ch { background:#F3F4F6; color:#1F2937; border-color:#D1D5DB; }

.adm-kpi-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-kpi-chip { padding: 5px 10px; background: var(--adm-surface-2); border:1px solid var(--adm-border);
  border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--adm-text-2); }
.adm-kpi-chip b { color: var(--adm-text); font-weight: 800; margin-left: 3px; }

.adm-table-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--adm-surface-2); border:1px solid var(--adm-border);
  border-radius: 9px; margin-bottom: 8px; flex-wrap: wrap; }

.adm-quick-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.adm-quick-chip { padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--adm-border); background: var(--adm-surface); color: var(--adm-text-2);
  cursor: pointer; text-decoration: none; }
.adm-quick-chip:hover { background: rgba(14,165,184,.06); color: var(--adm-primary-dark); border-color: rgba(14,165,184,.3); }
.adm-quick-chip.active { background: var(--adm-primary); color: #fff; border-color: var(--adm-primary); }

/* ============================================================
   BIBLIOTECA DE MÍDIA (.lb-)
   ============================================================ */
.lb-media-card{position:relative;border:1px solid var(--adm-border);border-radius:10px;overflow:hidden;background:var(--adm-surface-2);display:flex;flex-direction:column;cursor:pointer;transition:box-shadow .15s, border-color .15s;}
.lb-media-card:hover{box-shadow:0 4px 14px -4px rgba(14,165,184,0.18);}
.lb-media-card.selected{border-color:#0ea5b8;box-shadow:0 0 0 2px rgba(14,165,184,0.22);}
.lb-media-checkbox{position:absolute;top:6px;left:6px;width:20px;height:20px;z-index:2;margin:0;cursor:pointer;accent-color:#0ea5b8;}
.lb-media-type-badge{position:absolute;top:6px;right:6px;z-index:2;padding:2px 6px;border-radius:999px;font-size:10px;font-weight:700;background:rgba(15,23,42,0.72);color:#fff;backdrop-filter:blur(2px);}
.lb-media-body{aspect-ratio:1/1;background:#0f172a;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.lb-media-body img{width:100%;height:100%;object-fit:cover;display:block;}
.lb-media-body svg{opacity:.6;}
.lb-media-foot{padding:7px 8px 9px;display:flex;flex-direction:column;gap:3px;}
.lb-media-name{font-size:11.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--adm-text);}
.lb-media-meta{display:flex;justify-content:space-between;align-items:center;gap:5px;}
.lb-media-meta span{font-size:10.5px;color:var(--adm-text-3);}
.lb-media-badges{display:flex;gap:3px;flex-wrap:wrap;margin-top:2px;}
.lb-media-badges .gb{font-size:9.5px;padding:1px 5px;border-radius:999px;background:rgba(14,165,184,0.12);color:#0e7490;font-weight:600;}
.lb-sel-dot{position:absolute;top:7px;right:7px;z-index:3;width:22px;height:22px;border-radius:999px;background:#0ea5b8;color:#fff;font-weight:800;font-size:11px;display:none;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(14,165,184,0.35);}
.lb-media-card.selected .lb-sel-dot{display:flex;}
.lb-tabpane{display:block;}
.lb-gallery-row{display:flex;align-items:center;gap:6px;padding:7px 8px;border:1px solid var(--adm-border);border-radius:7px;background:var(--adm-surface-2);}
.lb-gallery-row input{flex:1;padding:5px 7px;font-size:11.5px;border:1px solid var(--adm-border);border-radius:5px;background:#fff;}
.lb-gallery-row .gb-count{font-size:10.5px;font-weight:700;color:var(--adm-primary-dark);padding:2px 8px;background:rgba(14,165,184,.08);border:1px solid rgba(14,165,184,.28);border-radius:999px;cursor:pointer;transition:all .12s;line-height:1.4;}
.lb-gallery-row .gb-count:hover{background:rgba(14,165,184,.16);border-color:var(--adm-primary);color:#0c4a5e;transform:translateY(-.5px);}
.lb-gallery-row .gb-count:active{transform:translateY(0);}

/* ================ MODAL GALERIA ================ */
.lb-gal-modal{position:fixed;inset:0;background:rgba(15,23,42,0.55);backdrop-filter:blur(3px);display:none;align-items:center;justify-content:center;z-index:99999;padding:20px;}
.lb-gal-modal.open{display:flex;}
.lb-gal-modal-dialog{width:min(760px,100%);max-height:92vh;display:flex;flex-direction:column;background:var(--adm-surface);border:1px solid var(--adm-border);border-radius:14px;box-shadow:0 18px 60px -20px rgba(15,23,42,.5);overflow:hidden;animation:lbgal-pop .18s ease-out;}
@keyframes lbgal-pop{from{transform:translateY(10px) scale(.985);opacity:0;}to{transform:none;opacity:1;}}
.lb-gal-modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--adm-border);background:linear-gradient(180deg,var(--adm-surface-2),transparent);}
.lb-gal-modal-x{border:1px solid var(--adm-border);background:transparent;width:30px;height:30px;border-radius:8px;color:var(--adm-text-3);font-size:14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:all .1s;}
.lb-gal-modal-x:hover{background:#fee2e2;color:#b91c1c;border-color:rgba(185,28,28,.3);}
.lb-gal-modal-tabs{display:flex;border-bottom:1px solid var(--adm-border);background:var(--adm-surface-2);gap:0;}
.lb-gal-mtab{flex:1;padding:9px 10px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--adm-text-3);font-size:11.5px;font-weight:700;cursor:pointer;}
.lb-gal-mtab.active{border-bottom-color:var(--adm-primary);color:var(--adm-primary-dark);}
.lb-gal-modal-body{padding:14px 18px;overflow:auto;flex:1;}
.lb-gal-pane{display:block;}
.lb-gal-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 18px;border-top:1px solid var(--adm-border);background:var(--adm-surface-2);}
.lb-gal-media-actions{padding:8px 2px 10px;display:flex;gap:8px;justify-content:space-between;align-items:flex-start;border-bottom:1px dashed var(--adm-border);margin-bottom:8px;flex-wrap:wrap;flex-direction:column;}
.lb-gal-media-actions > div:first-child{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.lb-gal-media-actions > div:last-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.lb-gal-seg{display:inline-flex;background:var(--adm-surface-2);border:1px solid var(--adm-border);border-radius:8px;overflow:hidden;padding:2px;gap:2px;}
.lb-gal-seg button{border:0;background:transparent;padding:4px 10px;font-size:11px;font-weight:700;color:var(--adm-text-3);cursor:pointer;border-radius:6px;transition:all .12s;line-height:1.4;}
.lb-gal-seg button.active{background:linear-gradient(180deg,#0ea5b8,#0e7490);color:#fff;box-shadow:0 1px 3px rgba(14,165,184,.3);}
.lb-gal-seg button:hover:not(.active){color:var(--adm-primary-dark);background:#fff;}
.lb-gal-count-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(14,165,184,.32);background:rgba(14,165,184,.08);padding:4px 10px 4px 6px;border-radius:999px;cursor:pointer;transition:all .12s;}
.lb-gal-count-pill:hover{background:rgba(14,165,184,.18);border-color:var(--adm-primary);transform:translateY(-.5px);}
.lb-gal-count-pill:active{transform:translateY(0);}
.lb-gal-count-pill .lb-gal-count-num{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;background:linear-gradient(180deg,#0ea5b8,#0e7490);color:#fff;border-radius:999px;font-weight:800;font-size:11px;}
.lb-gal-count-pill .lb-gal-count-lbl{font-size:11px;font-weight:700;color:var(--adm-primary-dark);}
.lb-gal-mpick{position:relative;border:2px solid var(--adm-border);border-radius:9px;overflow:hidden;background:#0f172a;aspect-ratio:1/1;cursor:pointer;transition:all .1s;display:flex;align-items:center;justify-content:center;}
.lb-gal-mpick:hover{border-color:#94a3b8;transform:translateY(-1px);box-shadow:0 6px 14px -8px rgba(15,23,42,.35);}
.lb-gal-mpick.checked{border-color:#0ea5b8;box-shadow:0 0 0 2px rgba(14,165,184,.25);}
.lb-gal-mpick img, .lb-gal-mpick video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none;}
.lb-gal-mpick .cbox{position:absolute;top:6px;left:6px;width:18px;height:18px;accent-color:#0ea5b8;margin:0;cursor:pointer;z-index:2;}
.lb-gal-mpick .gmid{position:absolute;bottom:5px;right:6px;z-index:3;padding:1px 5px;border-radius:999px;font-size:9.5px;font-weight:800;background:rgba(15,23,42,.75);color:#fff;}
.lb-gal-mpick .gmtype{position:absolute;top:6px;right:6px;z-index:2;padding:1px 5px;border-radius:999px;font-size:9px;font-weight:700;background:rgba(15,23,42,.75);color:#fff;}
.lb-gal-mpick .gmbadge{position:absolute;bottom:26px;left:6px;right:6px;z-index:3;padding:2px 7px 3px;border-radius:5px;font-size:9.5px;font-weight:800;letter-spacing:.1px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;backdrop-filter:blur(2px);}
.lb-gal-mpick .gmbadge-on{background:linear-gradient(180deg, rgba(14,165,184,.95), rgba(8,145,178,.95));color:#fff;border:1px solid rgba(255,255,255,.22);}
.lb-gal-mpick .gmbadge-off{background:rgba(15,23,42,.6);color:#cbd5e1;border:1px solid rgba(148,163,184,.3);}
.lb-gal-mpick .gmbadge-other{background:rgba(146,64,14,.92);color:#fff7ed;border:1px solid rgba(253,186,116,.4);}
.lb-gal-mpick .gmname{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:15px 8px 4px;font-size:10px;font-weight:700;color:#f8fafc;text-shadow:0 1px 2px rgba(0,0,0,.85);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;background:linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,.78) 45%, rgba(15,23,42,.95) 100%);letter-spacing:.1px;line-height:1.25;}
.lb-gal-mpick.hasother:not(.checked)::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg, rgba(234,88,12,0), rgba(234,88,12,.12));pointer-events:none;}


/* ============================================================
   DASHBOARD NOVO · KPIs, Ações Hoje e CALENDÁRIO
   ============================================================ */
.adm-db-head { padding: 8px 0 10px; }
.adm-title-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, rgba(14,165,184,.15), rgba(122,154,107,.18));
    font-size: 16px;
}

/* ---------- 8 KPIs ULTRA-DENSOS ---------- */
.adm-db-kpis {
    display: grid; gap: 8px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 10px;
}
.adm-kpi {
    position: relative;
    display: flex; align-items: stretch; gap: 10px;
    padding: 10px 12px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .1s, box-shadow .15s, border-color .15s;
    --kpi-color: var(--adm-primary);
}
.adm-kpi::before {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: var(--kpi-color);
    opacity: .85;
}
.adm-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15,43,57,.10);
    border-color: color-mix(in srgb, var(--kpi-color) 28%, var(--adm-border));
}
.adm-kpi-ico {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--kpi-color) 14%, transparent);
    color: var(--kpi-color);
}
.adm-kpi-ico svg { width: 16px; height: 16px; }
.adm-kpi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.adm-kpi-label {
    font-size: 10.5px; font-weight: 700; color: var(--adm-text-3);
    letter-spacing: .5px; text-transform: uppercase; line-height: 1.2;
}
.adm-kpi-val {
    font-size: 22px; font-weight: 800; line-height: 1.1;
    color: var(--adm-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.3px;
}
.adm-kpi-sub { font-size: 11px; color: var(--adm-text-2); font-weight: 500; }
.adm-kpi-link {
    font-size: 10.5px; font-weight: 700; color: var(--kpi-color);
    text-decoration: none; margin-top: 2px;
    width: fit-content;
}
.adm-kpi-link:hover { text-decoration: underline; }
.adm-kpi-occ-bar {
    margin-top: 4px; height: 5px; background: var(--adm-border);
    border-radius: 999px; overflow: hidden;
}
.adm-kpi-occ-fill {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--kpi-color), color-mix(in srgb, var(--kpi-color) 60%, #000));
    border-radius: 999px; transition: width .25s;
}

/* ---------- LINHA 2 · Ações HOJE + Calendário ---------- */
.adm-db-row-2 {
    display: grid; gap: 10px;
    grid-template-columns: 1fr;
}
.adm-db-today {
    display: flex; flex-direction: column; gap: 10px;
}
.adm-db-sec-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 1px dashed var(--adm-border);
}
.adm-db-sec-head h3 {
    margin: 0; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px; color: var(--adm-text);
}
.adm-db-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.adm-empty {
    padding: 18px 10px; text-align: center;
    color: var(--adm-text-3); font-size: 12px; font-weight: 500;
    border: 1px dashed var(--adm-border);
    border-radius: 8px;
    background: var(--adm-surface-2);
}
.adm-db-list {
    display: flex; flex-direction: column; gap: 5px;
    max-height: 240px; overflow-y: auto;
    padding-right: 2px;
}
.adm-db-list::-webkit-scrollbar { width: 5px; }
.adm-db-list::-webkit-scrollbar-thumb { background: var(--adm-border-2); border-radius: 5px; }
.adm-db-item {
    display: flex; align-items: stretch; justify-content: space-between; gap: 8px;
    padding: 7px 9px;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: border-color .12s, background .12s, transform .08s;
}
.adm-db-item:hover {
    background: #fff;
    border-color: rgba(14,165,184,.35);
    transform: translateX(2px);
}
.adm-db-item-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-db-item-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.adm-db-item-code {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 800; font-size: 11.5px; color: var(--adm-primary-dark);
    font-family: ui-monospace, Consolas, monospace;
}
.adm-db-item-tag {
    padding: 1px 6px; border-radius: 5px;
    background: rgba(245,158,11,.15); color: #92400E;
    font-size: 10px; font-weight: 800;
    letter-spacing: .2px;
}
.adm-db-item-name {
    font-weight: 700; font-size: 12.5px; color: var(--adm-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-db-item-meta {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--adm-text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-db-item-meta svg { width: 12px; height: 12px; color: var(--adm-text-3); flex-shrink: 0; }

/* ---------- CALENDÁRIO INTERATIVO ---------- */
.adm-cal-card {
    position: relative;
    padding: 12px 14px 14px;
    min-height: 520px;
    display: flex; flex-direction: column;
}
.adm-cal-head {
    display: flex; flex-wrap: wrap;
    align-items: flex-start; justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px; margin-bottom: 8px;
    border-bottom: 1px solid var(--adm-border);
}
.adm-cal-head-left { display: flex; flex-direction: column; gap: 6px; }
.adm-cal-quick-legend {
    display: inline-flex; flex-wrap: wrap; gap: 10px;
    font-size: 11.5px; color: var(--adm-text-2); font-weight: 600;
}
.adm-cal-quick-legend span { display: inline-flex; align-items: center; gap: 5px; }
.l-ic {
    display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0;
}
.l-ic.l-ci { background: #0EA5B8; }
.l-ic.l-co { background: #4338CA; }
.l-ic.l-occ { background: linear-gradient(90deg,#7A9A6B,#4D6B42); border-radius: 999px; }

.adm-cal-head-right {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end;
}
.adm-cal-view-toggle,
.adm-cal-filters {
    display: inline-flex; padding: 2px;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 9px;
}
.adm-cal-view-toggle button,
.adm-cal-filters button {
    border: 0; background: transparent; padding: 5px 10px;
    font-size: 11.5px; font-weight: 700; color: var(--adm-text-2);
    border-radius: 7px; cursor: pointer; transition: all .1s;
    font-family: inherit;
}
.adm-cal-view-toggle button:hover,
.adm-cal-filters button:hover { color: var(--adm-primary-dark); background: rgba(14,165,184,.06); }
.adm-cal-view-toggle button.active,
.adm-cal-filters button.active {
    background: #fff; color: var(--adm-primary-dark);
    box-shadow: 0 1px 3px rgba(15,43,57,.10);
}
.adm-cal-nav { display: inline-flex; gap: 4px; align-items: center; }
.adm-cal-nav-btn {
    width: 30px; height: 30px; padding: 0;
    border: 1px solid var(--adm-border);
    background: var(--adm-surface);
    color: var(--adm-text-2);
    border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .1s;
}
.adm-cal-nav-btn:hover { color: var(--adm-primary); border-color: rgba(14,165,184,.35); background: rgba(14,165,184,.05); }
.adm-cal-today {
    border: 0; padding: 6px 12px;
    background: linear-gradient(180deg, rgba(14,165,184,.14), rgba(14,165,184,.06));
    color: var(--adm-primary-dark);
    font-weight: 800; font-size: 11.5px;
    border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(14,165,184,.28);
    font-family: inherit;
    transition: transform .1s;
}
.adm-cal-today:hover { transform: translateY(-1px); }

.adm-cal-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.adm-cal-title {
    margin: 0; font-size: 15px; font-weight: 800; color: var(--adm-text);
    letter-spacing: -.2px;
}
.adm-cal-summary {
    display: inline-flex; flex-wrap: wrap; gap: 10px;
    font-size: 11px; color: var(--adm-text-2); font-weight: 600;
}
.adm-cal-summary b { color: var(--adm-text); font-weight: 800; }

/* Grade mensal */
.adm-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    flex: 1;
    min-height: 0;
}
.adm-cal-dow {
    display: contents;
}
.adm-cal-dow > div {
    padding: 5px 2px 3px;
    text-align: center;
    font-size: 10.5px; font-weight: 800; color: var(--adm-text-3);
    letter-spacing: .8px; text-transform: uppercase;
    background: var(--adm-surface-2);
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid var(--adm-border);
}
.adm-cal-dow > div:nth-child(1),
.adm-cal-dow > div:nth-child(7) {
    color: var(--adm-danger);
}
.adm-cal-cell {
    position: relative;
    display: flex; flex-direction: column;
    padding: 4px 5px 5px;
    min-height: 78px;
    border: 1px solid var(--adm-border);
    border-radius: 7px;
    background: var(--adm-surface);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color .12s, background .12s, transform .08s, box-shadow .15s;
    overflow: hidden;
}
.adm-cal-cell:hover {
    border-color: rgba(14,165,184,.45);
    background: rgba(14,165,184,.03);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15,43,57,.08);
    z-index: 2;
}
.adm-cal-other {
    background: var(--adm-surface-2);
    opacity: .55;
}
.adm-cal-other .adm-cal-num { color: var(--adm-text-3); }
.adm-cal-today-cell {
    border-color: var(--adm-primary) !important;
    box-shadow: inset 0 0 0 2px rgba(14,165,184,.25);
    background: linear-gradient(180deg, rgba(14,165,184,.07), rgba(14,165,184,.01));
}
.adm-cal-today-cell .adm-cal-num {
    background: var(--adm-primary);
    color: #fff !important;
    font-weight: 900 !important;
    box-shadow: 0 2px 6px rgba(14,165,184,.35);
}
.adm-cal-hasdata { background: #fff; }
.adm-cal-warn {
    box-shadow: inset 2px 0 0 rgba(245,158,11,.65);
}
.adm-cal-active {
    box-shadow: inset 2px 0 0 rgba(14,165,233,.7);
}
.adm-cal-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 3px; margin-bottom: 3px;
}
.adm-cal-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 5px;
    border-radius: 7px;
    font-size: 12px; font-weight: 700; color: var(--adm-text);
}
.adm-cal-cell:nth-child(7n+1) .adm-cal-num,
.adm-cal-cell:nth-child(7n+7) .adm-cal-num { color: var(--adm-danger); }
.adm-cal-badges { display: inline-flex; gap: 2px; flex-shrink: 0; }
.adm-cb {
    padding: 1px 4px; border-radius: 4px;
    font-size: 9.5px; font-weight: 900;
    line-height: 1.2;
}
.adm-cb-ci { background: #E0F2FE; color: #0369A1; }
.adm-cb-co { background: #E0E7FF; color: #3730A3; }

.adm-cal-occ {
    display: flex; align-items: center; gap: 5px;
    padding-bottom: 3px; margin-bottom: 2px;
    border-bottom: 1px dashed color-mix(in srgb, var(--adm-border) 80%, transparent);
}
.adm-occ-num {
    font-size: 10.5px; font-weight: 800; color: var(--adm-text-2);
    font-variant-numeric: tabular-nums;
    min-width: 14px;
}
.adm-occ-empty { color: var(--adm-text-3); opacity: .55; font-weight: 600; }
.adm-occ-bar {
    flex: 1; height: 3px; border-radius: 999px;
    background: var(--adm-border); overflow: hidden;
}
.adm-occ-bar > span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--adm-accent), var(--adm-primary));
    border-radius: 999px;
    transition: width .2s;
}

.adm-cal-list {
    display: flex; flex-direction: column; gap: 2px;
    margin-top: 2px;
}
.adm-cal-bk {
    position: relative;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 5px 2px 9px;
    border-radius: 4px;
    font-size: 10px; font-weight: 600;
    border-left: 2px solid transparent;
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-cal-bk-dot { display: none; }
.adm-cal-more {
    font-size: 10px; font-weight: 800; color: var(--adm-primary-dark);
    padding: 1px 0 0 1px;
}

/* Visão semanal */
.adm-cal-week {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
    gap: 0;
    border: 1px solid var(--adm-border);
    border-radius: 10px; overflow: hidden;
}
.adm-cal-week-head,
.adm-cal-week-body {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.adm-cal-wcol-head {
    padding: 8px 6px 7px;
    text-align: center;
    background: var(--adm-surface-2);
    border-right: 1px solid var(--adm-border);
    border-bottom: 1px solid var(--adm-border);
}
.adm-cal-wcol-head:last-child { border-right: 0; }
.adm-cal-wcol-head.is-today {
    background: linear-gradient(180deg, rgba(14,165,184,.18), rgba(14,165,184,.06));
}
.adm-cal-wdow {
    font-size: 10.5px; font-weight: 800; color: var(--adm-text-3);
    text-transform: uppercase; letter-spacing: .6px;
}
.adm-cal-wday {
    font-size: 20px; font-weight: 900; color: var(--adm-text);
    line-height: 1.1; margin: 2px 0;
}
.adm-cal-wsum {
    display: inline-flex; flex-direction: column; gap: 2px; align-items: center;
    font-size: 10px; color: var(--adm-text-2); font-weight: 600;
}
.adm-cal-wcol {
    position: relative;
    border-right: 1px solid var(--adm-border);
    min-height: 340px;
    padding: 6px 5px;
    background: var(--adm-surface);
    display: flex; flex-direction: column; gap: 4px;
    cursor: pointer;
    overflow-y: auto;
    transition: background .1s;
}
.adm-cal-wcol:hover { background: rgba(14,165,184,.025); }
.adm-cal-wcol:last-child { border-right: 0; }
.adm-cal-wcol.is-today {
    background: linear-gradient(180deg, rgba(14,165,184,.07), transparent 30%);
    box-shadow: inset 2px 0 0 rgba(14,165,184,.55);
}
.adm-cal-wcard {
    display: flex; flex-direction: column; gap: 3px;
    padding: 7px 8px;
    border-radius: 7px;
    text-decoration: none;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 2px rgba(15,43,57,.06);
    transition: transform .08s, box-shadow .12s;
}
.adm-cal-wcard:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15,43,57,.12);
}
.adm-cal-wcard-head {
    display: flex; justify-content: space-between; align-items: center; gap: 6px;
    font-size: 11.5px;
}
.adm-cal-wcard-name {
    font-weight: 700; font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-cal-wcard-meta {
    display: flex; flex-direction: column; gap: 1px;
    font-size: 10.5px; opacity: .95;
}
.adm-cal-wcard-status {
    position: relative;
    display: flex; align-items: center; gap: 6px;
    padding-top: 3px;
    border-top: 1px dashed rgba(0,0,0,.08);
    font-size: 10.5px; font-weight: 700;
}
.adm-cal-wcard-ptg {
    position: absolute; top: 0; left: 0; height: 1px;
    opacity: .5;
}
.adm-cal-emptycol {
    padding: 22px 6px;
    text-align: center;
    color: var(--adm-text-3);
    font-size: 11px; font-weight: 600;
    border: 1px dashed var(--adm-border);
    border-radius: 6px;
    background: var(--adm-surface-2);
    margin: 8px 3px;
}

/* DETALHE LATERAL DO DIA */
.adm-cal-daydetail {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(440px, 92%);
    background: #fff;
    border-left: 1px solid var(--adm-border);
    box-shadow: -14px 0 40px rgba(15,43,57,.14);
    z-index: 20;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .18s ease-out;
    border-radius: 0 10px 10px 0;
    overflow: hidden;
}
.adm-cal-daydetail.open { transform: translateX(0); }
.adm-cal-daydetail-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, var(--adm-surface-2), #fff);
    border-bottom: 1px solid var(--adm-border);
}
.adm-cal-daydetail-head h4 {
    margin: 0; font-size: 13.5px; font-weight: 800; color: var(--adm-text);
}
.adm-cal-daydetail-close {
    border: 1px solid var(--adm-border); background: transparent;
    width: 28px; height: 28px; border-radius: 8px;
    font-size: 18px; font-weight: 700; color: var(--adm-text-2);
    cursor: pointer; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .1s;
    font-family: inherit;
}
.adm-cal-daydetail-close:hover {
    color: var(--adm-danger);
    border-color: rgba(239,68,68,.35);
    background: rgba(239,68,68,.06);
}
.adm-cal-daydetail-summary {
    padding: 10px 14px;
    border-bottom: 1px dashed var(--adm-border);
    background: var(--adm-surface-2);
}
.adm-ds-row { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-ds-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 9px; border-radius: 8px;
    font-size: 11px; font-weight: 600;
}
.adm-cal-daydetail-list {
    flex: 1; overflow-y: auto;
    padding: 10px 12px 14px;
    display: flex; flex-direction: column; gap: 7px;
}
.adm-cal-booking-card {
    display: flex; flex-direction: column; gap: 5px;
    padding: 9px 11px;
    border-radius: 9px;
    background: var(--st-bg, var(--adm-surface-2));
    color: var(--st-fg, var(--adm-text));
    border: 1px solid color-mix(in srgb, var(--st-dot, var(--adm-primary)) 30%, var(--adm-border));
    border-left: 3px solid var(--st-dot, var(--adm-primary));
    text-decoration: none;
    transition: transform .08s, box-shadow .12s;
}
.adm-cal-booking-card:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(15,43,57,.10);
}
.adm-cal-bc-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px;
}
.adm-cal-bc-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11.5px; font-weight: 800;
    opacity: .9;
}
.adm-cal-bc-total {
    font-weight: 900; font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.adm-cal-bc-name {
    font-weight: 800; font-size: 13px;
}
.adm-cal-bc-meta {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    gap: 6px;
    font-size: 11.5px; font-weight: 600;
    opacity: .9;
}
.adm-cal-bc-foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; flex-wrap: wrap;
    padding-top: 5px;
    border-top: 1px dashed rgba(0,0,0,.08);
}
.adm-cal-bc-room {
    font-size: 11.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   RESPONSIVIDADE EXTREMA · DASHBOARD
   ============================================================ */
@media (min-width: 640px) {
    .adm-db-kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
    .adm-db-kpis { grid-template-columns: repeat(4, 1fr); }
    .adm-db-row-2 {
        grid-template-columns: minmax(280px, 30%) 1fr;
        align-items: start;
    }
    .adm-db-today { position: sticky; top: 74px; }
    .adm-cal-cell { min-height: 102px; padding: 5px 6px 6px; }
    .adm-cal-bk { font-size: 10.5px; }
}
@media (min-width: 1180px) {
    .adm-db-kpis { grid-template-columns: repeat(8, 1fr); }
    .adm-kpi { padding: 9px 10px; gap: 8px; }
    .adm-kpi-val { font-size: 20px; }
    .adm-db-row-2 {
        grid-template-columns: minmax(290px, 28%) 1fr;
    }
}
@media (min-width: 1500px) {
    .adm-db-row-2 {
        grid-template-columns: minmax(300px, 25%) 1fr;
    }
    .adm-cal-cell { min-height: 118px; }
}

/* Mobile (< 640px): foco total em toque e densidade */
@media (max-width: 639px) {
    .adm-db-head { padding: 4px 0 8px; }
    .adm-page-title { font-size: 16px !important; }
    .adm-page-sub { font-size: 11.5px !important; }
    .adm-db-kpis { gap: 6px; }
    .adm-kpi { padding: 8px 9px; gap: 7px; border-radius: 9px; }
    .adm-kpi-ico { width: 32px; height: 32px; border-radius: 8px; }
    .adm-kpi-ico svg { width: 15px; height: 15px; }
    .adm-kpi-label { font-size: 9.5px; letter-spacing: .4px; }
    .adm-kpi-val { font-size: 19px; }
    .adm-kpi-occ-bar { height: 4px; }
    .adm-kpi-link { display: none; }

    .adm-db-sec-head h3 { font-size: 12.5px; }
    .adm-db-list { max-height: 220px; }

    .adm-cal-card {
        padding: 10px 10px 12px;
        min-height: auto;
        border-radius: 10px;
    }
    .adm-cal-head {
        padding-bottom: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .adm-cal-head-right { justify-content: space-between; }
    .adm-cal-filters { order: 3; width: 100%; justify-content: space-around; }
    .adm-cal-filters button { flex: 1; padding: 6px 4px; font-size: 11px; }
    .adm-cal-view-toggle { flex: 1; }
    .adm-cal-view-toggle button { flex: 1; }
    .adm-cal-title { font-size: 14px; }
    .adm-cal-summary { font-size: 10.5px; gap: 7px; }

    .adm-cal-cell {
        min-height: 62px; padding: 3px 3px 4px;
        border-radius: 6px; gap: 1px;
    }
    .adm-cal-num {
        min-width: 20px; height: 20px; padding: 0 3px;
        font-size: 11px; border-radius: 6px;
    }
    .adm-cb { font-size: 9px; padding: 0 3px; }
    .adm-cal-occ { padding-bottom: 2px; margin-bottom: 1px; }
    .adm-occ-num { font-size: 9.5px; min-width: 10px; }
    .adm-occ-bar { height: 2.5px; }
    .adm-cal-list { display: none; }
    .adm-cal-dow > div { font-size: 9.5px; padding: 4px 0 2px; letter-spacing: .5px; }

    .adm-cal-wcol { min-height: 260px; padding: 5px 3px; }
    .adm-cal-wday { font-size: 17px; }
    .adm-cal-wcard { padding: 6px 7px; gap: 2px; }
    .adm-cal-wcard-name { font-size: 11.5px; }

    .adm-cal-daydetail {
        position: fixed;
        top: 50% !important; left: 4% !important; right: 4% !important;
        bottom: auto !important;
        transform: translateY(-50%) translateX(0) scale(.96);
        opacity: 0; pointer-events: none;
        width: auto !important;
        border-radius: 12px !important;
        border: 1px solid var(--adm-border);
        max-height: 84vh;
    }
    .adm-cal-daydetail.open {
        opacity: 1; pointer-events: auto;
        transform: translateY(-50%) translateX(0) scale(1);
        box-shadow: 0 30px 80px rgba(15,23,42,.35);
    }
    .adm-cal-daydetail-summary { padding: 9px 12px; }
    .adm-ds-badge { padding: 4px 7px; font-size: 10.5px; }
    .adm-cal-daydetail-list { padding: 9px 10px 12px; }

    .adm-table-tools { flex-direction: column; align-items: stretch; }
}

/* Muito pequeno (< 380px): ainda mais denso */
@media (max-width: 379px) {
    .adm-db-kpis { grid-template-columns: repeat(2, 1fr); }
    .adm-kpi-val { font-size: 17px; }
    .adm-kpi-sub { display: none; }
    .adm-cal-nav-btn { width: 28px; height: 28px; }
    .adm-cal-today { padding: 6px 9px; font-size: 11px; }
    .adm-cal-cell { min-height: 56px; }
}


