/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --font: 'Inter', system-ui, sans-serif;

  /* Dark theme (default) */
  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-elevated: #1a1a24;
  --bg-hover: #1f1f2e;
  --bg-input: #16161f;
  --border: #2a2a3d;
  --border-subtle: #1e1e2d;

  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #55556a;
  --text-accent: #7c7cfa;

  --accent: #6366f1;
  --accent-hover: #5254e0;
  --accent-glow: rgba(99, 102, 241, 0.15);

  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --green-border: rgba(34, 197, 94, 0.25);

  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.12);
  --yellow-border: rgba(245, 158, 11, 0.25);

  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --red-border: rgba(239, 68, 68, 0.25);

  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --blue-border: rgba(59, 130, 246, 0.25);

  --purple: #a855f7;
  --purple-bg: rgba(168, 85, 247, 0.12);
  --purple-border: rgba(168, 85, 247, 0.25);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: 0.2s ease;
}

[data-theme="light"] {
  --bg-base: #f4f4f8;
  --bg-surface: #ffffff;
  --bg-elevated: #fafafa;
  --bg-hover: #f0f0f6;
  --bg-input: #ffffff;
  --border: #e2e2ec;
  --border-subtle: #ededf5;

  --text-primary: #111128;
  --text-secondary: #555577;
  --text-muted: #9999bb;
  --text-accent: #6366f1;

  --accent-glow: rgba(99, 102, 241, 0.08);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-family: var(--font); scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand-logo {
  height: 38px;
  width: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: white;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.btn-danger {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-danger:hover { opacity: 0.9; }

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red-border);
}
.btn-danger-outline:hover { background: var(--red-bg); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn.icon-only { padding: 8px; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.export-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon-purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon-green { background: var(--green-bg); color: var(--green); }
.stat-icon-yellow { background: var(--yellow-bg); color: var(--yellow); }
.stat-icon-red { background: var(--red-bg); color: var(--red); }
.stat-icon-gray { background: var(--bg-elevated); color: var(--text-secondary); }

.stat-card-blue { border-left: 3px solid var(--blue); }
.stat-card-purple { border-left: 3px solid var(--purple); }
.stat-card-green { border-left: 3px solid var(--green); }
.stat-card-yellow { border-left: 3px solid var(--yellow); }
.stat-card-red { border-left: 3px solid var(--red); }
.stat-card-gray { border-left: 3px solid var(--border); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   CONTROLS BAR
   ============================================================ */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-input, .filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  height: 36px;
}

.filter-input:focus, .filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input { width: 100%; padding: 0 12px 0 32px; }
.filter-select { padding: 0 10px; cursor: pointer; }

.view-toggle {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.view-btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.view-btn:hover { color: var(--text-primary); }
.view-btn.active { background: var(--accent); color: white; }

.results-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

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

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), color var(--transition);
}
.th-sortable:hover { background: var(--bg-hover); color: var(--text-primary); }

.th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-icon { flex-shrink: 0; }
.sort-inactive { opacity: 0.3; }
.sort-active { color: var(--accent); opacity: 1; }

.table-row {
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeInUp 0.3s ease both;
  transition: background var(--transition);
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: var(--bg-hover); }

.data-table td {
  padding: 13px 16px;
  vertical-align: middle;
}

.aluno-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.aluno-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aluno-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.code-chip {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.turma-chip {
  font-size: 11px;
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid var(--purple-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.disciplina-cell {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 13px;
}

.erro-cell {
  color: var(--text-secondary);
  font-size: 12px;
  max-width: 240px;
}

.dias-num {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}

.badge-red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  animation: pulse-red 2s ease-in-out infinite;
}

.badge-gray {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 var(--red-border); }
  50% { box-shadow: 0 0 0 3px transparent; }
}

/* ============================================================
   GROUPS VIEW
   ============================================================ */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

@media (max-width: 600px) { .groups-grid { grid-template-columns: 1fr; } }

.aluno-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  animation: fadeInUp 0.35s ease both;
  cursor: pointer;
  position: relative;
}
.aluno-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }

.card-click-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 10px;
  opacity: 0;
  transition: opacity var(--transition);
  justify-content: flex-end;
}
.aluno-card:hover .card-click-hint { opacity: 1; color: var(--accent); }

/* -- DETALHE ALUNO -- */
.btn-back {
  margin-bottom: 20px;
  gap: 8px;
}

.detalhe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  flex-wrap: wrap;
}

.detalhe-aluno-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.aluno-avatar-xl {
  width: 56px;
  height: 56px;
  font-size: 22px;
  flex-shrink: 0;
}

.detalhe-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.detalhe-count-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 24px;
  min-width: 90px;
}

.detalhe-count {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
}

.detalhe-count-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aluno-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.aluno-card-info {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.aluno-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.aluno-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.aluno-card-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.aluno-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.aluno-card-stats {
  display: flex;
  gap: 8px;
}

.stat-mini {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.aluno-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.discipline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.disc-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.disc-nota {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.disc-freq {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}

.aluno-date {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.empty-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden { display: none !important; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.modal-sm { max-width: 420px; }

.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  padding: 10px 12px;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  min-height: 220px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.4;
}

.alert-success {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.alert-error {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--green-border);
  color: var(--green);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s ease;
}

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

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Expand row animation */
.expand-inner {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.expand-inner.open {
  max-height: 2000px;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LOGIN / ADMIN BUTTON
   ============================================================ */
.admin-active-btn {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-glow) !important;
}
.admin-active-btn:hover { background: var(--accent) !important; color: white !important; }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap .form-input {
  padding-right: 40px;
}

.pw-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--text-primary); }

.form-error {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
}

.login-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* ============================================================
   ADMIN ACTION BUTTONS
   ============================================================ */
.th-actions {
  width: 80px;
  text-align: center !important;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.5px;
}

.action-cell {
  white-space: nowrap;
  text-align: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.action-btn-date { color: var(--blue); border-color: var(--blue-border); }
.action-btn-date:hover { background: var(--blue-bg); transform: scale(1.1); }

.action-btn-del { color: var(--red); border-color: var(--red-border); margin-left: 4px; }
.action-btn-del:hover { background: var(--red-bg); transform: scale(1.1); }

.card-admin-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.detalhe-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Edit date modal */
.edit-date-scope-info {
  margin-top: 4px;
}

.edit-date-scope-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.edit-date-scope-single {
  background: var(--yellow-bg);
  color: var(--yellow);
  border-color: var(--yellow-border);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .main-content { padding: 20px 16px 48px; }
  .page-header { flex-direction: column; }
  .data-table td:nth-child(2), .data-table th:nth-child(2) { display: none; }
  .data-table td:nth-child(5), .data-table th:nth-child(5) { display: none; }
}

@media (max-width: 600px) {
  .update-badge { display: none; }
  .navbar-inner { padding: 0 16px; }
  .filters-row { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: 100%; }
}
