:root {
  --color-primary: #0a2540;
  --color-primary-dark: #000000;
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-success: #28a745;
  --color-error: #dc3545;

  --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.2s ease-out;

  --app-bar-height: 64px;
  --sidebar-width: 260px;
}

body.theme-dark {
  --color-bg: #020617;
  --color-surface: #020617;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2933;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Garante que qualquer elemento com atributo hidden realmente suma,
   independentemente de outras regras de display */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font-family: inherit;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--app-bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(90deg, #000000, #0a2540);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.app-bar__left,
.app-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-bar__title {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.app-bar__countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.app-bar__user {
  display: flex;
  align-items: center;
}

.icon-button {
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.icon-button:hover {
  background-color: rgba(148, 163, 184, 0.25);
}

.icon-button:active {
  transform: scale(0.96);
}

.app-shell {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--app-bar-height));
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 16px 12px;
  display: none;
  flex-shrink: 0;
}

.sidebar__header {
  padding: 0 8px 8px;
}

.sidebar__title {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.sidebar__link:hover {
  background-color: rgba(15, 23, 42, 0.06);
  color: var(--color-text);
  transform: translateX(2px);
}

.sidebar__link--active {
  background: linear-gradient(90deg, #000000, #0a2540);
  color: #ffffff;
}

.sidebar__icon {
  display: inline-flex;
  width: 20px;
  justify-content: center;
}

.main {
  flex: 1;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.view__header {
  margin-bottom: 16px;
}

.view__header h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.view__header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--list {
  grid-template-columns: minmax(0, 1fr);
}

.button {
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.button--primary {
  background: linear-gradient(90deg, #000000, #0a2540);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.button--primary:hover {
  box-shadow: 0 10px 15px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

.button--outlined {
  background-color: transparent;
  border: 1px solid rgba(15, 23, 42, 0.25);
  color: var(--color-text);
}

.button--outlined:hover {
  background-color: rgba(15, 23, 42, 0.03);
}

.progress-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.35);
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a2540, #28a745);
  transition: width 0.3s ease-out;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background-color: rgba(15, 23, 42, 0.02);
}

.badge--primary {
  background: linear-gradient(90deg, #000000, #0a2540);
  border-color: transparent;
  color: #ffffff;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0a2540);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.avatar--small {
  width: 32px;
  height: 32px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.form__field input,
.form__field textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  font-size: 0.95rem;
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: #0a2540;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list--compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.caption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.text-error {
  color: var(--color-error);
}

.text-success {
  color: var(--color-success);
}

.simulado__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.simulado__timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.9rem;
}

.simulado__questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.simulado__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.question-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition);
}

.question-card:hover {
  box-shadow: var(--shadow-card);
}

.question-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.question-card__title {
  font-size: 0.9rem;
  font-weight: 500;
}

.question-card__discipline {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.question-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.question-options label:hover {
  background-color: rgba(148, 163, 184, 0.20);
}

.question-options input[type="radio"] {
  accent-color: #0a2540;
}

.flashcard {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  background-color: rgba(15, 23, 42, 0.01);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.flashcard:hover {
  background-color: rgba(15, 23, 42, 0.03);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.flashcard__front,
.flashcard__back {
  font-size: 0.95rem;
}

.flashcard__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.flashcard__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .sidebar {
    display: block;
  }

  .app-bar__menu {
    display: none;
  }
}

@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--app-bar-height);
    bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: 15;
  }

  .sidebar--open {
    transform: translateX(0);
  }
}

:root {
  --bg: #f2f4f8;
  --bg-elevated: #ffffff;
  --bg-subtle: #e8ecf4;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #0a2540;
  --primary-soft: #1e3a5f;
  --primary-glow: rgba(10, 37, 64, 0.12);
  --accent-success: #28a745;
  --accent-error: #dc3545;
  --border-subtle: #e2e8f0;
  --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 12px 28px -8px rgba(15, 23, 42, 0.12);
  --radius-card: 16px;
  --radius-btn: 12px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-dark {
  --bg: #0c1222;
  --bg-elevated: #111827;
  --bg-subtle: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-soft: #0ea5e9;
  --primary-glow: rgba(56, 189, 248, 0.15);
  --border-subtle: #334155;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #000000 0%, #0a2540 50%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-left .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
  box-shadow: 0 0 12px rgba(40, 167, 69, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#theme-toggle {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
  padding: 4px 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

#theme-toggle:hover {
  background: rgba(15, 23, 42, 0.9);
}

#theme-icon {
  font-size: 0.9rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #334155 0%, #0f172a 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #e5e7eb;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-popover {
  position: absolute;
  top: 60px;
  right: 24px;
  width: 260px;
  background: var(--bg-elevated);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 12px;
  z-index: 1100;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-avatar-wrap {
  position: relative;
}

.profile-photo-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #334155 0%, #0f172a 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e5e7eb;
  text-transform: uppercase;
  background-size: cover;
  background-position: center;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-cargo {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 4px;
}

.profile-remuneracao {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-body {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.badge {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-primary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.layout {
  display: flex;
  margin-top: 60px;
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0a2540 0%, #071a2e 100%);
  color: #e2e8f0;
  height: calc(100vh - 60px);
  position: fixed;
  top: 60px;
  left: 0;
  padding: 20px 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
  display: none;
  justify-content: flex-end;
  padding: 0 16px 8px;
}

.nav-list {
  list-style: none;
  padding: 0 12px;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  margin-bottom: 4px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  border-left: 3px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #28a745;
}

.main {
  flex: 1;
  margin-left: 260px;
  padding: 28px 24px 48px;
  min-height: calc(100vh - 60px);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, var(--primary-glow), transparent 50%);
}

.view {
  max-width: 1100px;
  margin: 0 auto;
}

.view > h1,
.view .view-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
}

.view > p:first-of-type,
.view .view-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-body {
  line-height: 1.65;
}

.card-body .section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.card-body .section-text {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 20px;
}

.card-body .section-text ul {
  margin: 12px 0;
  padding-left: 1.25rem;
}

.card-body .section-text li {
  margin-bottom: 6px;
}

.card-body .section-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 20px 0 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #0a2540 0%, #071a2e 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-success {
  background-color: var(--accent-success);
  color: #ffffff;
}

.btn-danger {
  background-color: var(--accent-error);
  color: #ffffff;
}

.icon-button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px;
  border-radius: 999px;
}

.icon-button:hover {
  background-color: rgba(148, 163, 184, 0.2);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 64px;
  left: 12px;
  z-index: 1001;
  background-color: #000000;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
}

.sidebar-close {
  color: #9ca3af;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.form-field {
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.helper-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

.pill-strong {
  background-color: rgba(14, 165, 233, 0.13);
  color: #0ea5e9;
}

.pill-success {
  background-color: rgba(40, 167, 69, 0.14);
  color: var(--accent-success);
}

.pill-danger {
  background-color: rgba(220, 53, 69, 0.14);
  color: var(--accent-error);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.list-item-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
}

.status-pendente {
  background-color: rgba(148, 163, 184, 0.18);
}

.status-andamento {
  background-color: rgba(14, 165, 233, 0.16);
  color: #0ea5e9;
}

.status-concluida {
  background-color: rgba(40, 167, 69, 0.18);
  color: var(--accent-success);
}

.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.flashcard {
  background: var(--bg-elevated);
  border-radius: var(--radius-card);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
  min-height: 120px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.flashcard:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

.flashcard.flipped {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.flashcard-front,
.flashcard-back {
  font-size: 0.9rem;
}

.flashcard-back {
  display: none;
}

.flashcard.flipped .flashcard-front {
  display: none;
}

.flashcard.flipped .flashcard-back {
  display: block;
}

.classroom-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flashcard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.flashcard-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timer-display {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.1rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-inner {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #0a2540 100%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  text-align: left;
}

.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.14);
  color: var(--accent-success);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-error {
  background-color: rgba(220, 53, 69, 0.12);
  color: var(--accent-error);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
}

.tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

.tag-strong {
  background-color: rgba(14, 165, 233, 0.16);
  color: #0ea5e9;
}

.tag-warning {
  background-color: rgba(250, 204, 21, 0.16);
  color: #eab308;
}

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kpi-card {
  flex: 1 1 160px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition);
}

.kpi-card:hover {
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.kpi-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.kpi-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    width: 230px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 16px;
  }

  .sidebar-toggle {
    display: inline-flex;
  }
}

/* Tela de login em tela cheia */
.view-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #f2f4f8 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.view-login .card-login {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border-subtle);
}

.card-login h1 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-login > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.card-login .input {
  padding: 12px 16px;
  border-radius: var(--radius-btn);
}

.card-login .form-actions {
  margin-top: 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.helper-error {
  color: var(--accent-error);
}

.user-name {
  font-size: 0.85rem;
  margin-right: 8px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.cargos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cargo-option {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.cargo-option:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
}

.cargo-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
  background: var(--bg-subtle);
}

.cargo-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary);
}

.cargo-name {
  font-weight: 600;
  color: var(--text);
  flex: 1 1 100%;
}

.cargo-nivel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cargo-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  width: 100%;
  margin-top: 4px;
}

