/* ============================================================
   INFOTEC — Painel Administrativo
   Design System: Corporate Dark, Moderno, Profissional
   Paleta baseada na identidade visual Infotec (gold → rose)
   Font: Poppins | Grid: 8px base
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:     #e85a7a;   /* rosa Infotec */
  --primary-h:   #f06e8e;   /* hover */
  --primary-dim: rgba(232,90,122,0.12);
  --accent:      #f5b731;   /* dourado Infotec */
  --accent-h:    #f7c94e;
  --gradient:    linear-gradient(135deg, #f5b731, #f0895d, #e85a7a);
  --success:     #10b981;   /* verde sucesso */
  --warning:     #f5b731;   /* dourado warning */
  --danger:      #ef4444;   /* vermelho danger */

  --bg:          #0c0a10;   /* fundo principal (quase preto quente) */
  --bg-card:     #1a1722;   /* cards */
  --bg-surface:  #2a2534;   /* superfícies elevadas */
  --bg-input:    #1a1722;
  --border:      #2a2534;
  --border-light:#3d3648;

  --text:        #f5f0eb;   /* texto principal (branco quente) */
  --text-muted:  #9a9298;   /* texto secundário */
  --text-dim:    #6b6168;   /* texto terciário */
  --white:       #ffffff;
  --black:       #000000;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --shadow:    0 4px 24px rgba(0,0,0,0.30);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.40);
  --shadow-glow: 0 0 24px rgba(232,90,122,0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.2s ease;

  --sidebar-w: 260px;
  --header-h: 64px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
h2 { font-size: 24px; font-weight: 500; line-height: 1.3; color: var(--text); }
h3 { font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--text); }
.text-small { font-size: 12px; font-weight: 400; }
.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-h);
  box-shadow: 0 4px 16px rgba(232,90,122,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-dim);
  color: var(--primary-h);
  border-color: var(--primary-h);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── Inputs ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.form-input::placeholder {
  color: var(--text-dim);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,90,122,0.15);
}
.form-input:hover:not(:focus) {
  border-color: var(--border-light);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239a9298' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Toggle Switch (iOS style) ─────────────────────────────── */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(232,90,122,0.15);
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

/* ── Module Cards (Dashboard) ──────────────────────────────── */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  border-color: rgba(232,90,122,0.25);
}
.module-card:hover::before {
  opacity: 1;
}

/* Icon container */
.module-card__icon-wrap {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
}
.module-card__icon-wrap img {
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
  transition: var(--transition);
}
.module-card:hover .module-card__icon-wrap img {
  transform: scale(1.08);
}

.module-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.module-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Module Card Disabled ───────────────────────────────────── */
.module-card--disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.4);
}
.module-card--disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.module-card--disabled .module-card__icon-wrap img {
  transform: none;
}
.module-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-hover);
  color: var(--text-dim);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Module Card Hidden (edit mode) ────────────────────────── */
.module-card--hidden {
  opacity: 0.35;
  filter: grayscale(0.6);
}

/* ── Module Management Controls ────────────────────────────── */
.mc-controls {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  gap: 4px;
  z-index: 10;
}
.modules-edit-mode .mc-controls {
  display: flex;
}
.mc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}
.mc-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--text-dim);
}
.mc-btn--active {
  background: rgba(232, 90, 122, 0.15);
  color: var(--accent);
  border-color: var(--accent);
}
.mc-btn--active:hover {
  background: rgba(232, 90, 122, 0.25);
}

/* ── Module Grid ───────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Login ──────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(232,90,122,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(245,183,49,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.login-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.login-card__logo img {
  height: 40px;
  width: auto;
}
.login-card__logo-text {
  font-size: 26px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.login-card__subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-card .form-group {
  margin-bottom: 20px;
}
.login-card .btn-primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  margin-top: 8px;
}
.login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 8px;
}
.login-error.show {
  display: flex;
}

/* ── App Layout ────────────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(12,10,16,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}
.header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__logo {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.header__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.header__hamburger:hover {
  background: rgba(255,255,255,0.05);
}
.header__hamburger svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
  fill: none;
  stroke-width: 2;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  overflow-y: auto;
  z-index: 90;
  transition: transform 0.3s var(--ease);
}
.sidebar__section {
  padding: 0 16px;
  margin-bottom: 24px;
}
.sidebar__section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}
.sidebar__link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.sidebar__link--active {
  background: var(--primary-dim);
  color: var(--primary-h);
  font-weight: 500;
}
.sidebar__link--active:hover {
  background: rgba(232,90,122,0.16);
}
.sidebar__link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sidebar__back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 16px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  transition: var(--transition);
  cursor: pointer;
}
.sidebar__back:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.sidebar__back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ── Main Content ──────────────────────────────────────────── */
.main {
  flex: 1;
  margin-top: var(--header-h);
  padding: 32px;
}
.main--with-sidebar {
  margin-left: var(--sidebar-w);
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition);
}
.breadcrumb a:hover {
  color: var(--primary-h);
}
.breadcrumb__sep {
  color: var(--text-dim);
}
.breadcrumb__current {
  color: var(--text);
  font-weight: 500;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.page-header h1 {
  color: var(--text);
}
.page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Dashboard Layout (no scroll) ─────────────────────────── */
.dashboard-main {
  max-height: calc(100vh - var(--header-h));
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
.dashboard-greeting {
  margin-bottom: 36px;
}
.dashboard-greeting h1 {
  margin-bottom: 8px;
}
.dashboard-greeting p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ── Table ─────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 14px;
}
.table th {
  background: rgba(0,0,0,0.2);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.table td {
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text);
}
.table tbody tr {
  transition: var(--transition);
}
.table tbody tr:hover {
  background: rgba(232,90,122,0.04);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success {
  background: rgba(16,185,129,0.12);
  color: var(--success);
}
.badge-danger {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
}
.badge-warning {
  background: rgba(245,158,11,0.12);
  color: var(--warning);
}
.badge-default {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.badge-info {
  background: rgba(99,179,237,0.12);
  color: #63b3ed;
}

/* ── Abas de Usuários ───────────────────────────────────────── */
.usu-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.usu-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.usu-tab:hover  { color: var(--text); }
.usu-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.usu-tab svg    { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.usu-panel      { display: none; }
.usu-panel.active { display: block; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 24px;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: all 0.3s var(--ease);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal__header h2 {
  color: var(--text);
}
.modal__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-dim);
}
.modal__close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.modal__close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.modal__body .form-group {
  margin-bottom: 20px;
}
.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Permissions Grid ──────────────────────────────────────── */
.permissions-grid {
  display: grid;
  gap: 12px;
}
.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.03);
}
.permission-row__label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

/* ── Module Permissions Grid (per-user, in user modal) ──── */
.modulo-perms-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modulo-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.03);
}
.modulo-perm-row__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.modulo-perm-row__controls {
  display: flex;
  gap: 20px;
}
.modulo-perm-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

/* ── Loading Skeleton ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-surface) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}
.skeleton-text:last-child {
  width: 60%;
}
.skeleton-card {
  height: 200px;
  border-radius: var(--radius-lg);
}
.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toast / Notification ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  animation: toast-in 0.35s var(--ease);
  min-width: 280px;
}
.toast--success { border-left: 3px solid var(--success); }
.toast--error   { border-left: 3px solid var(--danger); }
.toast.removing {
  animation: toast-out 0.3s ease forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-dim);
}
.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 16px;
}
.empty-state h3 {
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Confirm Dialog ────────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.confirm-overlay.active {
  opacity: 1;
  visibility: visible;
}
.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: all 0.3s var(--ease);
}
.confirm-overlay.active .confirm-dialog {
  transform: scale(1);
}
.confirm-dialog h3 {
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-dialog p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.confirm-dialog__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .header__hamburger {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main--with-sidebar {
    margin-left: 0;
  }
  .modules-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }
  .main {
    padding: 24px 16px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-wrap {
    overflow-x: auto;
  }
  .table {
    min-width: 600px;
  }
  .login-card {
    padding: 32px 24px;
  }
  .modal {
    padding: 24px;
    margin: 16px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .login-card {
    padding: 28px 20px;
  }
}

/* ── Sidebar Overlay (mobile) ──────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 85;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Utility ───────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
body.no-scroll { overflow: hidden; }
