/* ==========================================================================
   IFMSA Brazil - Portal Unificado de Gestão
   SISTEMA DE DESIGN & ESTILOS GLOBAIS (GLASSMORPHISM DARK THEME)
   ========================================================================== */

:root {
  --ifmsa-blue: #1d3768;
  --ifmsa-blue-light: #2c4d8d;
  --ifmsa-gold: #f59e0b;
  --ifmsa-gold-hover: #d97706;
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-text: #34d399;
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --warning-text: #fbbf24;
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-text: #f87171;
  --info: #3b82f6;
  --info-light: rgba(59, 130, 246, 0.15);
  --info-text: #60a5fa;
  --theme-primary: var(--ifmsa-gold);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* CLASS ESPECÍFICA PARA ESCONDER ELEMENTOS (SOBREPÕE MODAIS E FLEX) */
.hidden, .modal-backdrop.hidden {
  display: none !important;
}

/* OVERLAY DE LOADING */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-box {
  text-align: center;
}

.logo-circle {
  width: 70px;
  height: 70px;
  background: var(--ifmsa-gold);
  color: var(--ifmsa-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--ifmsa-gold);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin: 16px auto 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* LOGIN WRAPPER */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top right, #1d3768 0%, #0f172a 60%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: 20px;
}

.brand-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-header .logo-box {
  margin: 0 auto 12px;
}

.brand-header h2 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
}

.brand-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   TELA PÚBLICA DE INSCRIÇÃO DIRETA (SEM LOGIN)
   ========================================================================== */
.public-signup-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  background: radial-gradient(circle at top center, #1e3a8a 0%, #0f172a 75%);
}

.public-signup-card {
  width: 100%;
  max-width: 720px;
  padding: 36px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.15);
}

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 12px;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.public-brand h2 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.public-brand p {
  color: var(--ifmsa-gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-public-login-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-public-login-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* HERO DO EVENTO PÚBLICO */
.pub-evt-hero {
  background: linear-gradient(135deg, rgba(29, 55, 104, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.05);
}

.pub-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.pub-hero-title {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.pub-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pub-hero-meta span strong {
  color: var(--text-main);
}

.pub-hero-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ALERTAS PÚBLICOS */
.pub-closed-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

/* SEÇÃO DE FORMULÁRIO */
.pub-form-section {
  animation: fadeIn 0.25s ease-in-out;
}

/* COMPROVANTE DE SUCESSO */
.pub-success-card {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.3s ease;
}

.pub-success-icon {
  width: 76px;
  height: 76px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--success);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin: 0 auto 16px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}

.pub-success-card h2 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.pub-success-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.pub-receipt-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  margin-bottom: 20px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-row span {
  color: var(--text-muted);
}

.receipt-row strong, .receipt-row code {
  color: #ffffff;
  font-size: 0.92rem;
}

.pub-success-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: #93c5fd;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}

.pub-success-info i {
  font-size: 1.1rem;
  margin-top: 2px;
}

/* ESTADO DE ERRO */
.pub-error-card {
  text-align: center;
  padding: 30px 10px;
}

.pub-error-icon {
  width: 70px;
  height: 70px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid var(--danger);
  color: var(--danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 16px;
}

.pub-error-card h2 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.pub-error-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.public-card-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .public-signup-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .pub-hero-title {
    font-size: 1.2rem;
  }
  .pub-hero-meta {
    flex-direction: column;
    gap: 6px;
  }
  .public-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-public-login-link {
    width: 100%;
    justify-content: center;
  }
}

/* DASHBOARD LAYOUT */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background-color: var(--ifmsa-blue);
  border-bottom: 2px solid var(--ifmsa-gold);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  background: var(--ifmsa-gold);
  color: var(--ifmsa-blue);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.brand-title {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
}

.brand-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--ifmsa-gold);
}

.student-selector-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.25);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.student-selector-box label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ifmsa-gold);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-display {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ifmsa-gold);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.main-wrapper {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 260px;
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
}

.page-title-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ifmsa-gold);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}

.menu-item.active {
  background: var(--ifmsa-blue-light);
  color: var(--ifmsa-gold);
  border-left: 3px solid var(--ifmsa-gold);
}

.count-badge {
  background: var(--danger);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: auto;
}

.content-body {
  flex: 1;
  padding: 28px;
  max-width: 1300px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* CARDS & GLASSMORPHISM */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon {
  font-size: 28px;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.metric-icon.gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-icon.red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.metric-icon.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.metric-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
}

.metric-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* BARRAS DE AÇÕES E FILTROS */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

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

.search-input-box {
  position: relative;
  min-width: 260px;
  flex: 1;
}

.search-input-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-box .form-control {
  padding-left: 40px;
}

.button-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* TABELAS */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* BADGES DE COMITÊ E STATUS */
.event-comit-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.badge-scome { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-scoph { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-scora { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.badge-scorp { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-scope { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-score { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }

.badge-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status.danger {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-status.success {
  background: var(--success-light);
  color: var(--success-text);
}

/* FORMULÁRIOS & BOTÕES */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .col {
  flex: 1;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--ifmsa-gold);
}

.select-sm { padding: 4px 10px; font-size: 0.85rem; }
.select-md { min-width: 160px; }

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary { background: var(--ifmsa-gold); color: var(--ifmsa-blue); font-weight: 700; }
.btn-primary:hover { background: var(--ifmsa-gold-hover); }

.btn-success { background: var(--success); color: #ffffff; }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: #ffffff; }
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn-outline-danger { background: transparent; border: 1px solid rgba(239, 68, 68, 0.4); color: var(--danger-text); }
.btn-outline-danger:hover { background: var(--danger-light); }

.btn-xs { padding: 4px 10px; font-size: 0.8rem; border-radius: 6px; }
.btn-block { width: 100%; }

.btn-icon-danger, .btn-icon-success {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon-danger { background: var(--danger-light); color: var(--danger-text); }
.btn-icon-success { background: var(--success-light); color: var(--success-text); }

/* MODAIS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
}

.modal-lg { max-width: 720px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 { color: var(--ifmsa-gold); font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.danger { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; margin-left: auto; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* DOCUMENTO IMPRESSO */
.printable-document {
  background: #ffffff;
  color: #000000;
  padding: 40px;
  border-radius: 12px;
  margin-top: 20px;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #1d3768;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.doc-brand h2 { color: #1d3768; font-weight: 800; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.doc-table th, .doc-table td { border: 1px solid #cbd5e1; padding: 8px 12px; text-align: left; font-size: 0.9rem; }
.doc-table th { background: #f1f5f9; color: #1e293b; }

.doc-signatures { margin-top: 60px; text-align: center; }

@media print {
  body * { visibility: hidden; }
  .no-print { display: none !important; }
  #certification-document, #certification-document * { visibility: visible; }
  #certification-document { position: absolute; left: 0; top: 0; width: 100%; }
  .modal-backdrop { background: none !important; position: static !important; }
  .modal-content { background: none !important; border: none !important; box-shadow: none !important; max-width: 100% !important; padding: 0 !important; }
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  .main-wrapper { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .content-body { padding: 16px; }
  .search-filters { flex-direction: column; align-items: stretch; }
  .button-group { width: 100%; justify-content: space-between; }
}

/* BOTÕES COMPACTOS DE AÇÕES NAS TABELAS */
.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.btn-icon-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-icon-action.danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-text);
}

.btn-icon-action.danger:hover {
  background: var(--danger-light);
  color: #ffffff;
}

/* ==========================================================================
   FLATPICKR CUSTOM THEME (DARK GLASSMORPHISM & IFMSA BRAND)
   ========================================================================== */
.flatpickr-calendar {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  font-family: 'Inter', sans-serif !important;
  z-index: 99999 !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #1e293b !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  border-top-color: #1e293b !important;
}

.flatpickr-months {
  background: #1d3768 !important;
  border-radius: 14px 14px 0 0 !important;
  padding: 6px 0 !important;
}

.flatpickr-current-month {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  color: #ffffff !important;
  background: #1d3768 !important;
  font-weight: 700 !important;
  border-radius: 6px;
}

.flatpickr-current-month input.cur-year {
  color: var(--ifmsa-gold) !important;
  font-weight: 800 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--ifmsa-gold) !important;
  fill: var(--ifmsa-gold) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: #ffffff !important;
  fill: #ffffff !important;
}

span.flatpickr-weekday {
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
}

.flatpickr-day {
  color: var(--text-main) !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.flatpickr-day.today {
  border-color: var(--ifmsa-gold) !important;
  color: var(--ifmsa-gold) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--ifmsa-gold) !important;
  border-color: var(--ifmsa-gold) !important;
  color: #1d3768 !important;
  font-weight: 800 !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #475569 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: #334155 !important;
}

