:root {
  /* Core */
  --color-primary: #0A84FF;
  --color-primary-light: #4DA8FF;
  --color-primary-dark: #0A1F44;

  /* Backgrounds */
  --color-bg: #0C0E12;
  --color-bg-card: #1A1C22;
  --color-bg-soft: #22252E;

  /* Textos */
  --color-text: #F5F5F7;
  --color-text-soft: #A1A4B2;
  --color-text-muted: #6E6F7A;

  /* Estados */
  --color-success: #12D18E;
  --color-warning: #FFD369;
  --color-error: #FF5A5F;

  /* Bordas */
  --color-border: #2F343F;

  /* Outros */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.45);
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #121624 0, #05060A 45%, #000000 100%);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
}

.app {
  display: flex;
  width: 100%;
}

/* Sidebar lateral */

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0A1F44 0%, #050814 100%);
  padding: 24px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-soft);
  text-decoration: none;
  font-size: 14px;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.sidebar-link:hover {
  background: rgba(10, 132, 255, 0.14);
  color: var(--color-text);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: rgba(10, 132, 255, 0.22);
  color: var(--color-text);
  font-weight: 600;
}

/* Conteúdo principal */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(10px);
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-soft);
}

.content {
  padding: 24px;
}

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--color-text-soft);
  margin-bottom: 12px;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.0);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-soft);
  border: 1px solid var(--color-border);
}

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

.table-container {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  overflow: auto;
}

.table-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead tr {
  background: var(--color-bg-soft);
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table th {
  font-weight: 600;
  color: var(--color-text-soft);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.table tbody tr:hover {
  background: rgba(10, 132, 255, 0.06);
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: rgba(18, 209, 142, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(18, 209, 142, 0.5);
}

.alert-error {
  background: rgba(255, 90, 95, 0.12);
  color: var(--color-error);
  border: 1px solid rgba(255, 90, 95, 0.6);
}

.alert-warning {
  background: rgba(255, 211, 105, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(255, 211, 105, 0.6);
}

/* ===== Tela de Login ===== */

.login-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #121624 0, #05060A 45%, #000000 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  text-align: center;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--color-text-soft);
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--color-text-soft);
}

.form-control {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-size: 14px;
  outline: none;
  transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.4);
  background: #1f2430;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

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

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

.login-footer a {
  color: var(--color-primary-light);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* ===== Modal PSAT (bloqueio) ===== */
.psat-modal-backdrop{
  position: fixed;
  inset: 0;
  display: none;                 /* escondido por padrão */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.65);
  z-index: 99999;
}

.psat-modal-backdrop.is-open{ display: flex; }

.psat-modal{
  width: min(520px, 94vw);
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  color: #e5e7eb;
}

.psat-modal-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  background: #020617;
}

.psat-modal-title{
  font-weight: 700;
  letter-spacing: .2px;
}

.psat-modal-close{
  border: 1px solid #1e293b;
  background: #111827;
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.psat-modal-body{
  padding: 14px 16px 0 16px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.psat-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  padding: 14px 16px 16px 16px;
}
