/* static/css/base.css */

/* ============================
   TEMA GLOBAL (DARK INSTITUCIONAL)
   ============================ */
   :root {
    /* Paleta principal (seu tema original) */
    --bg: #0b0c10;
    --panel: #121318;
    --card: #171922;
    --text: #e8ecf1;
    --muted: #9aa4b2;
    --accent: #5b9cff;
    --green: #16c784;
    --red: #ea3943;
    --border: #232635;
  
    /* Aliases para os layouts novos (admin_courses, admin_dashboard etc.) */
    --bg-page: var(--bg);
    --bg-elevated: var(--panel);
    --bg-card: var(--card);
    --text-strong: var(--text);
    --text-soft: var(--muted);
    --border-subtle: var(--border);
    --accent-soft: rgba(91, 156, 255, 0.25);
  }
  
  /* Reset básico */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html, body {
    margin: 0;
    padding: 0;
  }
  
  /* ============================
     BODY / LAYOUT BASE
     ============================ */
  body {
    font: 14px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background:
      radial-gradient(circle at top left, rgba(91, 156, 255, 0.16), transparent 55%),
      radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 55%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, #0e1016 100%);
    color: var(--text);
    min-height: 100vh;
  }
  
  /* Container genérico (reaproveitado em páginas mais simples) */
  .container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 24px 16px 40px;
  }
  
  /* ============================
     HEADER GLOBAL (base.html)
     ============================ */
  .header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 11, 16, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 18px;
  }
  
  .logo {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
  }
  
  .main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
  }
  
  .main-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition:
      background 0.15s ease,
      border-color 0.15s ease,
      color 0.15s ease;
  }
  
  .main-nav a:hover {
    background: rgba(23, 25, 35, 0.9);
    border-color: rgba(91, 156, 255, 0.4);
    color: var(--text);
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .user-info {
    display: flex;
    flex-direction: row;          /* ← chave */
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
  }
  
  .user-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
  }
  
  .user-role {
    color: var(--muted);
    text-transform: capitalize;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
  }
  
  .user-plan {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: capitalize;
  }

  .plan-trial {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
    font-size: 12px;
    font-weight: 700;
  }

  .plan-month {
    background: rgba(0, 123, 255, 0.12);
    color: #0d6efd;
    font-size: 12px;
    font-weight: 700;
  }
  
  .user-plan.plan-year {
    background: linear-gradient(135deg, #7b5cff, #4a3aff);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
    font-size: 12px;
    font-weight: 700;
  }

  
  /* Logout / Login */
  .logout-form {
    margin: 0;
  }
  
  .logout-btn,
  .login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(23, 25, 35, 0.95);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
      background 0.15s ease,
      border-color 0.15s ease,
      transform 0.08s ease,
      box-shadow 0.08s ease;
  }
  
  .logout-btn:hover,
  .login-link:hover {
    border-color: rgba(91, 156, 255, 0.7);
    background: #1a1c27;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  }
  
  /* ============================
     MAIN CONTENT WRAPPER
     ============================ */
  .page-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 40px;
  }
  
  /* ============================
     FORMULÁRIOS BÁSICOS
     (aproveitado pelo login e outros forms simples)
     ============================ */
  
  label {
    display: block;
    margin: 0 0 6px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
  }
  
  input,
  textarea,
  select {
    width: 100%;
    padding: 12px 14px;
    margin: 0 0 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: var(--accent);
  }
  
  /* Botão padrão */
  button {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition:
      filter 0.1s ease,
      transform 0.08s ease,
      box-shadow 0.08s ease;
  }
  
  button:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(91, 156, 255, 0.35);
  }
  
  /* Form login centralizado (reaproveitado onde quiser) */
  .login-wrapper {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .login-container {
    background: var(--panel);
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.25),
      0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
  }
  
  .login-container h1 {
    margin: 0 0 24px;
    font-weight: 700;
    text-align: center;
  }
  
  /* ============================
     TABELAS BÁSICAS (seus .table antigos)
     ============================ */
  
  .table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: var(--panel);
    border-radius: 12px;
    overflow: hidden;
    font-size: 13px;
  }
  
  .table th,
  .table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }
  
  .table th {
    text-align: left;
    font-weight: 600;
    color: var(--muted);
    background: rgba(15, 17, 24, 0.95);
  }
  
  .table tr:last-child td {
    border-bottom: none;
  }
  
  .table a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
  }
  
  .table a:hover {
    text-decoration: underline;
  }
  
  /* ============================
     TITULOS / TIPOGRAFIA GENÉRICA
     ============================ */
  
  h1 {
    font-size: 20px;
    margin-top: 8px;
    margin-bottom: 16px;
    color: var(--text);
  }
  
  h2, h3, h4 {
    color: var(--text);
  }
  
  /* Pequeno ajuste de form genérico (para telas simples) */
  form {
    max-width: 480px;
  }
  
  /* ============================
     RESPONSIVIDADE
     ============================ */
  
  @media (max-width: 768px) {
    .header {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
  
    .header-right {
      align-self: stretch;
      justify-content: space-between;
    }
  
    .main-nav {
      flex-wrap: wrap;
    }
  
    .page-container,
    .container {
      padding: 20px 12px 32px;
    }
  }

  .header-login-only {
      width: 100%;
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .logo-full {
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 0.5px;
      color: var(--primary-color, #0d6efd);
  }

  .login-container form {
      display: flex;
      flex-direction: column;
  }

  .login-container button[type="submit"],
  .login-btn {
      margin-top: 16px;
      align-self: center;
      display: inline-flex;
      justify-content: center;
      padding: 10px 36px;
      font-size: 15px;
  }

  .header-login {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 64px;
  }

  .logo-login-centered {
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-decoration: none;
      color: var(--primary-color, #0d6efd);
  }

  .logo-login-centered:hover {
      color: var(--primary-color, #0b5ed7);
      text-decoration: none;
  }
  

/* =========================
   HEADER — CENTER (POSIÇÃO)
========================= */

  .header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    display: flex;
    align-items: center;
  }


  .logo-center:hover {
      text-decoration: none;
      color: var(--primary-color, #0b5ed7);
  }

  .login-error {
      background-color: #fdecec;
      color: #a40000;
      border: 1px solid #f5b5b5;
      padding: 10px 14px;
      margin-bottom: 16px;
      border-radius: 4px;
      font-size: 14px;
      text-align: center;
  }