/* PREMIUM UI STYLES FOR INSTITUTO DIGNUM */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #f1c40f;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

/* FLIP CARDS */
.flip-card {
  background-color: transparent;
  height: 250px;
  perspective: 1000px;
  margin-bottom: 20px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: var(--shadow-md);
  border-radius: 12px;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.flip-card-front {
  background-color: var(--bg-white);
  color: var(--primary-color);
  border: 1px solid #eee;
}

.flip-card-back {
  background-color: var(--primary-color);
  color: var(--text-light);
  transform: rotateY(180deg);
}

/* SPLIT SCREEN */
.split-screen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin: 60px 0;
}

.split-text {
  flex: 1;
  min-width: 300px;
}

.split-image {
  flex: 1;
  min-width: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.split-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* BENTO GRID (GOVERNANÃ‡A) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.bento-item {
  background: var(--bg-white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid #f1f1f1;
}

.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* WIZARD/STEPPER */
.wizard-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--bg-white);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background: #eee;
  z-index: 1;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ADMIN FILTERS TOOLBAR â€” Fase 4
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.painel-toolbar--filters {
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.filter-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
  font-weight: 500;
  min-width: 120px;
  flex: 1;
}

.filter-row label span {
  color: var(--text-muted, #888);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-row select,
.filter-row input[type="date"],
.filter-row input[type="search"] {
  padding: 7px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--bg-card, #fff);
  color: var(--text, #222);
  transition: border-color 0.2s;
}

.filter-row select:focus,
.filter-row input:focus {
  border-color: var(--primary, #0b3d91);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.08);
}

.filter-actions {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.filter-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* â”€â”€ KPI card icon â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kpi-icon {
  margin-bottom: 6px;
  opacity: 0.6;
}

.kpi-card--accent .kpi-icon {
  opacity: 1;
}

/* â”€â”€ Delete modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#insc-delete-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

#insc-delete-modal .modal-content {
  background: var(--bg-card, #fff);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#insc-delete-modal h3 {
  margin-bottom: 12px;
}

/* â”€â”€ Responsive filters â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-row label {
    min-width: 100%;
  }

  .filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

.step {
  position: relative;
  z-index: 2;
  background: var(--bg-white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border: 2px solid #eee;
  color: #aaa;
  transition: var(--transition);
}

.step.active {
  border-color: var(--secondary-color);
  background: var(--secondary-color);
  color: var(--text-dark);
}

.step.completed {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: var(--text-light);
}

.wizard-step {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* SCROLL BOX FOR TERMS */
.scroll-box {
  max-height: 250px;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-light);
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* DARK MODE OVERRIDES FOR PREMIUM UI */
html[data-theme="dark"] .bento-item,
html[data-theme="dark"] .flip-card-front,
html[data-theme="dark"] .wizard-container,
html[data-theme="dark"] .scroll-box,
html[data-theme="dark"] .split-image {
  background-color: #1a2438 !important;
  color: #f2f4f8 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .split-text,
html[data-theme="dark"] .split-text h4,
html[data-theme="dark"] .split-text p {
  color: #f2f4f8 !important;
}

html[data-theme="dark"] .split-screen {
  background: transparent !important;
}

html[data-theme="dark"] .flip-card-front {
  color: #f2f4f8 !important;
}

html[data-theme="dark"] .flip-card-back {
  background-color: var(--accent) !important;
  color: #05101f !important;
}

html[data-theme="dark"] .bento-item h4 {
  color: var(--accent) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .step {
  background: #1a2438 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #b7bfd1 !important;
}

html[data-theme="dark"] .step.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #05101f !important;
}

html[data-theme="dark"] .step.completed {
  background: var(--primary-light) !important;
  border-color: var(--primary-light) !important;
  color: #f2f4f8 !important;
}

/* FLOATING LANG SWITCHER */
.floating-lang {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
}

.lang-float-btn {
  background: var(--bg-white, #fff);
  border: 2px solid var(--secondary-color, #f1c40f);
  color: var(--primary-color, #2c3e50);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.lang-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.lang-switcher__menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--bg-white, #fff);
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  min-width: 150px;
  display: none;
  flex-direction: column;
}

.lang-switcher.open .lang-switcher__menu {
  display: flex;
  animation: fadeInBottom 0.3s ease;
}

.lang-switcher__menu button {
  background: none;
  border: none;
  padding: 10px 20px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--primary-color, #2c3e50);
  transition: background 0.2s;
}

.lang-switcher__menu button:hover,
.lang-switcher__menu button.active {
  background: #f8f9fa;
  font-weight: bold;
}

@keyframes fadeInBottom {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-theme="dark"] .lang-float-btn {
  background: #1a2438;
  color: #f2f4f8;
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .lang-switcher__menu {
  background: #1a2438;
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .lang-switcher__menu button {
  color: #f2f4f8;
}

html[data-theme="dark"] .lang-switcher__menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* PREMIUM ADMIN PANEL STYLES */
.modal {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-white, #fff);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  max-width: 600px;
  width: 90%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-content h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--bg-light);
  padding-bottom: 15px;
}

.painel-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.painel-table th {
  background: var(--primary-color);
  color: #fff;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.painel-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f1f1;
  background: var(--bg-white);
  vertical-align: middle;
}

.painel-table tr:last-child td {
  border-bottom: none;
}

.painel-table tr:hover td {
  background: var(--bg-light);
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  border: none;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #1a252f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  border-left: 4px solid #e74c3c;
  background: #fdf5f5;
  color: #c0392b;
}

.painel-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

/* USER DROPDOWN (LIKE GOOGLE) */
.user-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-left: 15px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-color, #2c3e50);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
  user-select: none;
}

.user-dropdown:hover .user-avatar {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.user-dropdown-menu {
  position: absolute;
  top: 55px;
  right: 0;
  background: var(--bg-white, #fff);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  list-style: none !important;
  padding: 10px 0 !important;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 9999;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  padding: 12px 20px;
  font-size: 13px;
  color: #777;
  border-bottom: 1px solid #f1f1f1;
  margin-bottom: 5px;
  word-break: break-word;
  white-space: normal;
  cursor: default;
}

.user-dropdown-menu li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

.user-dropdown-menu li a,
.user-dropdown-menu li button {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark, #333);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.user-dropdown-menu li a:hover,
.user-dropdown-menu li button:hover {
  background: var(--bg-light, #f8f9fa);
  color: var(--primary-color, #2c3e50);
}

.user-dropdown-menu li .btn-logout {
  color: #e74c3c;
  font-weight: 600;
}

.user-dropdown-menu li .btn-logout:hover {
  background: #fdf5f5;
  color: #c0392b;
}

html[data-theme="dark"] .user-dropdown-menu {
  background: #1a2438;
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .user-dropdown-menu li a,
html[data-theme="dark"] .user-dropdown-menu li button {
  color: #f2f4f8;
}

html[data-theme="dark"] .user-dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .user-info {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* PAINEL HEADER (BANNER) */
.painel-header {
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(26, 37, 47, 0.9) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 40px;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateY(0);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.painel-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.painel-header h1 {
  color: #fff !important;
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.painel-header .auth-sub {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}

.painel-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 1;
}

.painel-page {
  padding-top: 130px;
}

.insc-row {
  cursor: pointer;
  transition: background 0.2s;
}

.insc-row:hover {
  background: rgba(0, 0, 0, 0.02);
}


/* FIXES FOR ADMIN VISIBILITY AND ALIGNMENT */
body>header {
  z-index: 99999 !important;
}

.painel-header {
  z-index: 1 !important;
  position: relative;
}

.modal {
  z-index: 999999 !important;
}

.filter-row>label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 150px;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-row>label select,
.filter-row>label input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
}

.auth-form--grid {
  display: grid !important;
}

/* Antigravity Advanced Filters */
.painel-toolbar--filters {
  background: var(--bg-white, #fff);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.painel-toolbar--filters .filter-row {
  display: contents;
}

.painel-toolbar--filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.painel-toolbar--filters select,
.painel-toolbar--filters input {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text-dark, #1e293b);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.painel-toolbar--filters select:focus,
.painel-toolbar--filters input:focus {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.08), 0 0 0 3px rgba(44, 62, 80, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.painel-toolbar--filters .filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 5px;
}

.painel-toolbar--filters .filter-actions .btn {
  flex: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.painel-toolbar--filters .filter-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Antigravity Cards */
.cards-grid .card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cards-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.cards-grid .card button {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cards-grid .card button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.1);
}

.cards-grid .card select {
  transition: border-color 0.3s, box-shadow 0.3s;
}

.cards-grid .card select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
  outline: none;
}