/* =====================================================================
   FraudeGuard Saude - Folha de estilos principal
   Paleta: azul institucional, azul-claro, branco, cinza muito claro
   ===================================================================== */

:root {
  --fg-blue-dark: #154C9B;
  --fg-blue: #2E86DE;
  --fg-blue-light: #EAF3FC;
  --fg-blue-hover: #1B6FC9;
  --fg-gray-bg: #F5F7FA;
  --fg-gray-border: #E3E8EF;
  --fg-text: #23303F;
  --fg-text-muted: #6C7A8E;
  --fg-white: #FFFFFF;
  --fg-success: #1FAE6E;
  --fg-warning: #F2A93B;
  --fg-orange: #E8752C;
  --fg-danger: #E0473E;
  --fg-radius: 14px;
  --fg-shadow: 0 6px 24px rgba(21, 76, 155, 0.08);
  --fg-shadow-sm: 0 2px 8px rgba(21, 76, 155, 0.06);
  --fg-sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
  background-color: var(--fg-gray-bg);
  color: var(--fg-text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

a { text-decoration: none; }

/* ---------------------------------------------------------------
   Tela de login
   --------------------------------------------------------------- */
.fg-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--fg-blue-dark) 0%, var(--fg-blue) 55%, #4FA6EF 100%);
  padding: 24px;
}

.fg-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--fg-white);
  border-radius: var(--fg-radius);
  box-shadow: 0 20px 50px rgba(9, 33, 68, 0.35);
  padding: 40px 36px;
  text-align: center;
}

.fg-login-logo {
  width: 84px;
  height: 84px;
  margin-bottom: 12px;
}

.fg-login-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--fg-blue-dark);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.fg-login-slogan {
  color: var(--fg-text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.fg-login-card label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--fg-text);
  text-align: left;
  display: block;
  margin-bottom: 6px;
}

.fg-login-card .form-control {
  border-radius: 10px;
  border: 1px solid var(--fg-gray-border);
  padding: 10px 14px;
  background: var(--fg-gray-bg);
}

.fg-login-card .form-control:focus {
  border-color: var(--fg-blue);
  box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.15);
  background: var(--fg-white);
}

.fg-btn-primary {
  background: var(--fg-blue);
  border: none;
  color: var(--fg-white);
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 0;
  width: 100%;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fg-btn-primary:hover {
  background: var(--fg-blue-hover);
  color: var(--fg-white);
  transform: translateY(-1px);
}

.fg-login-footer {
  margin-top: 26px;
  font-size: 0.78rem;
  color: var(--fg-text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.fg-toggle-senha {
  cursor: pointer;
  color: var(--fg-text-muted);
}

.fg-blocked-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fg-gray-bg);
}

.fg-blocked-card {
  text-align: center;
  background: var(--fg-white);
  padding: 48px;
  border-radius: var(--fg-radius);
  box-shadow: var(--fg-shadow);
  max-width: 420px;
}

.fg-blocked-icon {
  font-size: 3rem;
  color: var(--fg-danger);
  margin-bottom: 12px;
  display: block;
}

/* ---------------------------------------------------------------
   Layout interno: sidebar + topbar + conteudo
   --------------------------------------------------------------- */
.fg-app {
  display: flex;
  min-height: 100vh;
}

.fg-sidebar {
  width: var(--fg-sidebar-width);
  background: linear-gradient(180deg, var(--fg-blue-dark) 0%, #0E3A73 100%);
  color: var(--fg-white);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1030;
  transition: transform 0.25s ease;
}

.fg-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.fg-sidebar-brand img { width: 36px; height: 36px; }

.fg-sidebar-brand span {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.1;
}

.fg-sidebar-nav { padding: 12px 10px; }

.fg-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.fg-sidebar-nav a i { font-size: 1.05rem; width: 20px; text-align: center; }

.fg-sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--fg-white);
}

.fg-sidebar-nav a.active {
  background: var(--fg-blue);
  color: var(--fg-white);
  font-weight: 600;
}

.fg-main {
  margin-left: var(--fg-sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - var(--fg-sidebar-width));
}

.fg-topbar {
  background: var(--fg-white);
  border-bottom: 1px solid var(--fg-gray-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

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

.fg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fg-blue-light);
  color: var(--fg-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.fg-content {
  padding: 24px;
  flex: 1;
}

.fg-page-title {
  font-weight: 700;
  color: var(--fg-blue-dark);
  margin-bottom: 4px;
}

.fg-page-subtitle {
  color: var(--fg-text-muted);
  margin-bottom: 24px;
}

.fg-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--fg-blue-dark);
}

.fg-footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--fg-text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--fg-gray-border);
  background: var(--fg-white);
}

/* ---------------------------------------------------------------
   Cards, tabelas, componentes gerais
   --------------------------------------------------------------- */
.fg-card {
  background: var(--fg-white);
  border-radius: var(--fg-radius);
  box-shadow: var(--fg-shadow-sm);
  border: 1px solid var(--fg-gray-border);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fg-card:hover { box-shadow: var(--fg-shadow); }

.fg-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fg-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--fg-blue-light);
  color: var(--fg-blue-dark);
  flex-shrink: 0;
}

.fg-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--fg-text);
  line-height: 1.1;
}

.fg-stat-label {
  color: var(--fg-text-muted);
  font-size: 0.83rem;
}

.fg-table-wrap {
  overflow-x: auto;
  border-radius: var(--fg-radius);
}

table.fg-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--fg-white);
  min-width: 640px;
}

table.fg-table th {
  background: var(--fg-blue-light);
  color: var(--fg-blue-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
}

table.fg-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--fg-gray-border);
  font-size: 0.9rem;
  vertical-align: middle;
}

table.fg-table tbody tr:hover { background: var(--fg-gray-bg); }

.fg-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.fg-badge-success { background: rgba(31,174,110,0.12); color: var(--fg-success); }
.fg-badge-warning { background: rgba(242,169,59,0.15); color: #a3720c; }
.fg-badge-orange  { background: rgba(232,117,44,0.15); color: var(--fg-orange); }
.fg-badge-danger  { background: rgba(224,71,62,0.12); color: var(--fg-danger); }
.fg-badge-secondary { background: rgba(108,122,142,0.12); color: var(--fg-text-muted); }
.fg-badge-info { background: var(--fg-blue-light); color: var(--fg-blue-dark); }

.fg-filter-card { background: var(--fg-white); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow-sm); padding: 20px; margin-bottom: 20px; border: 1px solid var(--fg-gray-border); }

.fg-btn-outline {
  border: 1px solid var(--fg-blue);
  color: var(--fg-blue);
  background: transparent;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.fg-btn-outline:hover { background: var(--fg-blue); color: var(--fg-white); }

.fg-dropzone {
  border: 2px dashed var(--fg-blue);
  border-radius: var(--fg-radius);
  background: var(--fg-blue-light);
  padding: 36px 20px;
  text-align: center;
  color: var(--fg-blue-dark);
  cursor: pointer;
  transition: background 0.2s ease;
}

.fg-dropzone:hover, .fg-dropzone.fg-dragover { background: #DCEBFB; }

.fg-dropzone i { font-size: 2.2rem; display: block; margin-bottom: 8px; }

/* ---------------------------------------------------------------
   Responsividade
   --------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .fg-sidebar {
    transform: translateX(-100%);
  }
  .fg-sidebar.fg-open { transform: translateX(0); }

  .fg-main { margin-left: 0; width: 100%; }

  .fg-sidebar-toggle { display: inline-block; }

  .fg-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9,33,68,0.45);
    z-index: 1025;
  }
  .fg-sidebar-overlay.fg-show { display: block; }
}

@media (max-width: 575.98px) {
  .fg-login-card { padding: 30px 22px; }
  .fg-content { padding: 16px; }
  .fg-topbar { padding: 12px 16px; }
}
