:root {
  --oc-bg: #eef2f7;
  --oc-surface: rgba(255, 255, 255, 0.72);
  --oc-surface-solid: #ffffff;
  --oc-text: #1f2937;
  --oc-text-muted: #6b7280;
  --oc-border: rgba(255, 255, 255, 0.68);
  --oc-primary: #4f46e5;
  --oc-primary-hover: #4338ca;
  --oc-danger: #dc2626;
  --oc-radius-xl: 24px;
  --oc-radius-lg: 18px;
  --oc-shadow-1: 12px 12px 24px rgba(163, 177, 198, 0.22);
  --oc-shadow-2: -10px -10px 22px rgba(255, 255, 255, 0.82);
  --sidebar-width: 280px;
  --topbar-height: 72px;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--oc-bg);
  color: var(--oc-text);
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--oc-border);
  border-radius: 24px 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 1030;
}

.topbar-left,
.topbar-right,
.user-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.user-mini-name {
  font-size: 0.95rem;
  color: var(--oc-text-muted);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 18px;
  z-index: 1040;
}

.sidebar-inner {
  height: 100%;
  background: var(--oc-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius-xl);
  box-shadow: var(--oc-shadow-1), var(--oc-shadow-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 10px 8px;
}

.sidebar-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.28);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--oc-text);
  padding: 12px 14px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--oc-primary);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(79, 70, 229, 0.12));
  color: var(--oc-primary);
  font-weight: 700;
}

.disabled-link {
  opacity: 0.55;
  pointer-events: none;
}

.painel-wrapper {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
}

.main-content {
  padding: 24px;
}

.content-card {
  background: var(--oc-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius-xl);
  box-shadow: var(--oc-shadow-1), var(--oc-shadow-2);
  padding: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius-lg);
  box-shadow: var(--oc-shadow-1), var(--oc-shadow-2);
  padding: 20px;
}

.stat-card .label {
  display: block;
  font-size: 0.85rem;
  color: var(--oc-text-muted);
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 1.7rem;
  font-weight: 700;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.7rem;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--oc-text-muted);
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .topbar {
    left: 0;
  }

  .painel-wrapper {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .main-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 14px;
  }

  .user-mini-name {
    display: none;
  }
}

/* =========================================================
   AUTH / LOGIN
========================================================= */

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.08), transparent 30%),
    var(--oc-bg);
}

.auth-body .app-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--oc-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius-xl);
  box-shadow: var(--oc-shadow-1), var(--oc-shadow-2);
  padding: 32px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.28);
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--oc-text);
}

.auth-brand p {
  margin: 0;
  color: var(--oc-text-muted);
  font-size: 0.95rem;
}

.auth-alert {
  border-radius: 16px;
  margin-bottom: 18px;
}

.auth-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--oc-text);
}

.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--oc-text-muted);
  z-index: 2;
  pointer-events: none;
}

.auth-input {
  height: 48px;
  padding-left: 42px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 3px 3px 8px rgba(163, 177, 198, 0.14),
    inset -3px -3px 8px rgba(255, 255, 255, 0.88);
}

.auth-input:focus {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow:
    0 0 0 0.2rem rgba(79, 70, 229, 0.12),
    inset 3px 3px 8px rgba(163, 177, 198, 0.14),
    inset -3px -3px 8px rgba(255, 255, 255, 0.88);
}

.auth-btn-primary {
  height: 48px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--oc-primary), var(--oc-primary-hover));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
}

.auth-btn-primary:hover,
.auth-btn-primary:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--oc-primary-hover), #3730a3);
}

.auth-links {
  text-align: center;
  margin-top: 18px;
}

.auth-links a {
  text-decoration: none;
  color: var(--oc-primary);
  font-weight: 500;
}

.auth-links a:hover {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  .auth-card {
    padding: 24px 18px;
  }

  .auth-brand h1 {
    font-size: 1.7rem;
  }
}