:root {
      --primary: #0d6efd;
      --success: #198754;
      --danger: #dc3545;
      --warning: #ffc107;
      --orange: #fd7e14;
      --bg-body: #f8fafc;
      --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    body {
      background: var(--bg-body);
      font-family: 'Outfit', sans-serif;
      color: #1e293b;
      font-size: 1.15rem; /* Increased font size */
    }

    .login-shell {
      min-height: calc(100vh - 56px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 32px 16px;
      background: #eef4ff;
    }

    .login-panel {
      width: min(100%, 440px);
      background: #fff;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 18px;
      padding: 32px;
    }

    .login-brand {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 28px;
    }

    .login-brand h1 {
      font-size: 1.75rem;
      font-weight: 800;
      margin: 0;
    }

    .login-brand p {
      margin: 0;
      color: #64748b;
      font-size: 0.95rem;
    }

    .container {
      max-width: 95% !important;
    }

    .header-estudante, .sticky-header-screen {
      background: rgba(248, 250, 252, 0.95);
      backdrop-filter: blur(10px);
      border: none;
      position: sticky;
      top: 56px;
      z-index: 1020;
      border-bottom: 2px solid var(--primary);
    }
    .header-estudante {
      border-radius: 0 0 20px 20px;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      margin-bottom: 40px !important;
    }
    .sticky-header-screen {
      padding: 1rem 0;
      margin-bottom: 1.5rem;
    }

    .header-estudante::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 6px;
      background: var(--primary);
    }

    .ficha-digital {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.05);
      border-radius: 18px;
      margin-bottom: 24px;
      overflow: hidden;
      box-shadow: var(--card-shadow);
      transition: transform 0.2s ease;
    }

    .ficha-digital:hover {
      transform: translateY(-2px);
    }

    .transition-icon { transition: transform 0.3s ease; }
    
    @keyframes pulse-red {
      0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
      70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
      100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
    }
    .animate-pulse { animation: pulse-red 2s infinite; }

    .card-hover:hover { transform: translateY(-5px); transition: all 0.3s ease; }

    .area-conhecimento { 
      border-radius: 28px; 
      padding: 30px; 
      margin-bottom: 45px; 
      border: 1px solid rgba(0,0,0,0.03);
    }
    .area-linguagens { background-color: #eef2ff; border-left: 6px solid #6366f1; }
    .area-matematica { background-color: #fff7ed; border-left: 6px solid #f97316; }
    .area-humanas { background-color: #f0fdf4; border-left: 6px solid #22c55e; }
    .area-natureza { background-color: #f0f9ff; border-left: 6px solid #0ea5e9; }
    .area-diversos { background-color: #f8fafc; border-left: 6px solid #64748b; }

    .area-titulo {
      font-size: 1rem;
      text-transform: uppercase;
      letter-spacing: 1.8px;
      color: #334155;
      margin-bottom: 25px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .area-titulo i { opacity: 0.7; }
    .area-titulo::after {
      content: ''; flex: 1; height: 2px; background: rgba(0,0,0,0.05);
    }

    .btn-floating {
      position: fixed;
      bottom: 30px;
      left: 30px;
      z-index: 1050;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
      transition: all 0.3s ease;
      border: none;
    }
    .btn-floating:hover { transform: scale(1.1) rotate(-10deg); }

    .table-pontos,
    .table-diario {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 0.95rem;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid #e2e8f0;
    }

    .table-pontos th,
    .table-pontos td,
    .table-diario th,
    .table-diario td {
      border: 0.5px solid #e2e8f0;
      text-align: center;
      padding: 12px 10px;
    }

    .header-gray {
      background: #f1f5f9;
      font-weight: 600;
      color: #475569;
    }

    .check-box {
      width: 18px;
      height: 18px;
      border: 2px solid #cbd5e1;
      border-radius: 4px;
      display: inline-block;
      vertical-align: middle;
      transition: 0.2s;
    }

    .check-box.checked {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .check-box.checked::after {
      content: '\f00c';
      font-family: 'Font Awesome 6 Free';
      font-weight: 900;
      font-size: 10px;
    }

    .badge {
      border-radius: 30px;
      padding: 6px 14px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-size: 0.65rem;
    }

    .btn {
      border-radius: 12px;
      font-weight: 600;
      padding: 8px 16px;
      transition: 0.3s;
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 0.75rem;
    }

    .card-toggle {
      cursor: pointer;
      transition: 0.2s;
    }

    .card-toggle:hover {
      background: rgba(0, 0, 0, 0.02);
    }

    .progress {
      height: 12px;
      border-radius: 10px;
      background: #e2e8f0;
      border: none;
    }

    .progress-bar {
      border-radius: 10px;
    }

    .bg-inativo-alerta {
      background-color: #fff3cd !important;
      border-color: #ffecb5 !important;
    }
    .bg-inativo-critico {
      background-color: #ffb74d !important; /* Stronger orange */
      border-color: #f57c00 !important;
    }
    .bg-inativo-fatal {
      background-color: #f8d7da !important; /* light red */
      border-color: #f5c2c7 !important;
    }
    .bg-concluido {
      background-color: #d1e7dd !important;
      border-color: #badbcc !important;
    }

    /* Cores das Áreas de Conhecimento */
    .area-linguagens { background-color: #f1f5ff !important; border-left: 6px solid #6366f1 !important; }
    .area-matematica { background-color: #fffaf0 !important; border-left: 6px solid #f97316 !important; }
    .area-ciencias-humanas { background-color: #f0fdf4 !important; border-left: 6px solid #22c55e !important; }
    .area-ciencias-da-natureza { background-color: #fff1f2 !important; border-left: 6px solid #f43f5e !important; }
    .area-diversos { background-color: #faf5ff !important; border-left: 6px solid #a855f7 !important; }

    .area-conhecimento {
      border-radius: 20px;
      padding: 25px;
      margin-bottom: 35px;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }



    .text-orange {
      color: var(--orange) !important;
    }

    .bg-orange {
      background: var(--orange) !important;
      color: #fff !important;
    }

    .alert {
      border-radius: 16px;
      border: none;
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 8px;
    }

    ::-webkit-scrollbar-track {
      background: #f1f5f9;
    }

    ::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: #94a3b8;
    }
    .card-dashboard {
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
      border: 1px solid rgba(0,0,0,0.02) !important;
    }
    .card-dashboard:hover {
      transform: translateY(-10px);
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
      border-color: var(--primary) !important;
    }
    .icon-circle {
      width: 80px;
      height: 80px;
      border-radius: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: 0.3s;
    }
    .bg-purple { background: #8b5cf6; }
    .card-dashboard:hover .icon-circle {
      transform: scale(1.1) rotate(5deg);
    }
    .icon-circle i {
      filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    }

    /* Estilo de Formulários Premium & Modernos */
    .form-control, .form-select {
      background-color: #f1f5f9 !important; /* Cor leve e moderna ao fundo */
      border: 2px solid transparent !important;
      border-radius: 14px !important;
      padding: 12px 18px !important;
      font-size: 0.95rem !important;
      font-weight: 500 !important;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
      color: #334155 !important;
      box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03) !important;
    }
    .form-control:hover, .form-select:hover {
      background-color: #e2e8f0 !important;
      border-color: rgba(0,0,0,0.05) !important;
    }
    .form-control:focus, .form-select:focus {
      background-color: #ffffff !important;
      border-color: var(--primary) !important;
      box-shadow: 0 10px 15px -3px rgba(13, 110, 253, 0.15), 0 4px 6px -2px rgba(13, 110, 253, 0.05) !important;
      outline: none !important;
    }
    .form-control::placeholder {
      color: #94a3b8 !important;
      font-weight: 400;
    }
    label.small.fw-bold {
      color: #475569 !important;
      margin-bottom: 8px;
      display: block;
      letter-spacing: 0.5px;
      font-size: 0.75rem;
      text-transform: uppercase;
    }

    /* Estilos para a Ficha no Card */
    .ficha-tabela-resumo {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 15px;
      font-size: 0.9rem; /* Increased from 0.75rem */
    }
    .ficha-tabela-resumo th, .ficha-tabela-resumo td {
      border: 1px solid #dee2e6;
      padding: 6px;
      text-align: center;
    }
    .ficha-tabela-resumo th {
      background: #f8f9fa;
      font-weight: bold;
      color: #495057;
    }
    .ficha-label-mini {
      font-size: 0.75rem; /* Increased from 0.6rem */
      text-transform: uppercase;
      color: #6c757d;
      font-weight: 700;
      margin-bottom: 2px;
    }
    
    .tabela-diario {
      width: 100%;
      font-size: 0.85rem; /* Increased from 0.7rem */
      border-collapse: collapse;
    }
    .tabela-diario th {
      background: #f1f3f5;
      border: 1px solid #dee2e6;
      padding: 6px 4px;
      text-align: center;
      vertical-align: middle;
    }
    .tabela-diario td {
      border: 1px solid #dee2e6;
      padding: 6px 4px;
      text-align: center;
      vertical-align: middle;
    }
    .col-data { width: 15%; }
    .col-mod { width: 10%; }
    .col-ch { width: 15%; }
    .col-ass { width: 25%; }
    
    .check-box-fake {
      display: inline-block;
      width: 12px;
      height: 12px;
      border: 1px solid #adb5bd;
      background: #fff;
      margin-right: 3px;
      vertical-align: middle;
    }
    .check-box-fake.checked {
      background-color: #0d6efd;
      border-color: #0d6efd;
      position: relative;
    }
    .check-box-fake.checked::after {
      content: '✓';
      color: white;
      font-size: 8px;
      position: absolute;
      top: -2px;
      left: 1px;
    }
    /* Top Progress Bar (YouTube Style) */
    .top-progress-container {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 3px;
      z-index: 9999;
      background: transparent;
      display: none;
    }
    .top-progress-fill {
      height: 100%;
      width: 0%;
      background: #ffffff; /* Branca para contrastar com navbar azul */
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
      transition: width 0.3s ease;
    }
    
    /* Button Loading State */
    .btn-loading {
      position: relative;
      color: transparent !important;
      pointer-events: none;
    }
    .btn-loading::after {
      content: "";
      position: absolute;
      width: 1.2rem;
      height: 1.2rem;
      top: calc(50% - 0.6rem);
      left: calc(50% - 0.6rem);
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: button-spinner 0.6s linear infinite;
    }
    .btn-outline-primary.btn-loading::after {
      border-top-color: var(--primary);
    }
    @keyframes button-spinner {
      to { transform: rotate(360deg); }
    }

    /* Cores de Aproveitamento (Créditos Externos) */
    .bg-indigo-light { background-color: #eef2ff !important; }
    .border-indigo { border: 2px solid #6366f1 !important; }
    .text-indigo { color: #4f46e5 !important; }
    .bg-indigo { background-color: #6366f1 !important; }
    .btn-indigo { background-color: #6366f1; color: white; border: none; }
    .diario-componente-grid {
      display: grid;
      gap: 14px;
    }
    .diario-row-card {
      background: #fff;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 14px;
    }
    .diario-row-card.is-locked {
      background: #f8f9fa;
    }
    .diario-row-card.is-disabled {
      opacity: 0.68;
    }
    .diario-row-card.is-delete-marked {
      background: #fff5f5;
      border-color: #f1aeb5;
    }
    .diario-row-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
    }
    .diario-row-title {
      font-weight: 700;
      color: #212529;
      margin: 0;
      font-size: 0.95rem;
    }
    .diario-row-meta {
      font-size: 0.78rem;
      color: #6c757d;
    }
    .diario-row-error {
      font-size: 0.78rem;
      color: #b02a37;
      margin-top: 8px;
    }
    .diario-row-success {
      font-size: 0.78rem;
      color: #146c43;
      margin-top: 8px;
    }
    .diario-summary-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 16px;
    }
    .diario-summary-pill {
      background: #fff;
      border: 1px solid #dee2e6;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 0.82rem;
      color: #495057;
      white-space: nowrap;
    }
    .btn-indigo:hover { background-color: #4f46e5; color: white; }
    .btn-outline-indigo { color: #6366f1; border-color: #6366f1; }
    .btn-outline-indigo:hover { background-color: #6366f1; color: white; }
    
    @keyframes pulse-indigo {
      0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
      70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
      100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    }
    .animate-pulse-indigo { animation: pulse-indigo 2s infinite; }

    .painel-processos-salvamento {
      position: fixed;
      top: 76px;
      right: 18px;
      width: min(360px, calc(100vw - 24px));
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 3000;
      pointer-events: none;
    }
    .card-processo-salvamento {
      background: rgba(255,255,255,0.98);
      border: 1px solid #dbe3f0;
      border-left: 4px solid #94a3b8;
      border-radius: 14px;
      padding: 12px 14px;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
      pointer-events: auto;
    }
    .card-processo-salvamento.is-running { border-left-color: #0d6efd; }
    .card-processo-salvamento.is-success { border-left-color: #198754; }
    .card-processo-salvamento.is-warning { border-left-color: #f59e0b; }
    .card-processo-salvamento.is-error { border-left-color: #dc3545; }
    .card-processo-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .card-processo-titulo {
      font-size: 0.96rem;
      font-weight: 700;
      color: #0f172a;
      line-height: 1.2;
    }
    .card-processo-subtitulo,
    .card-processo-meta,
    .card-processo-msg {
      font-size: 0.78rem;
      line-height: 1.35;
      color: #475569;
    }
    .card-processo-subtitulo { margin-top: 2px; }
    .card-processo-meta { margin-top: 8px; }
    .card-processo-msg { margin-top: 6px; }
    .badge-processo {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 78px;
      border-radius: 999px;
      padding: 4px 10px;
      background: #eff6ff;
      color: #1d4ed8;
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .03em;
    }
    .is-success .badge-processo { background: #ecfdf5; color: #047857; }
    .is-warning .badge-processo { background: #fffbeb; color: #b45309; }
    .is-error .badge-processo { background: #fef2f2; color: #b91c1c; }
    .is-queued .badge-processo { background: #f8fafc; color: #475569; }
    .processo-progress {
      height: 7px;
      margin-top: 10px;
      margin-bottom: 2px;
      overflow: hidden;
    }
    .card-processo-salvamento .progress-bar {
      transition: width .35s ease;
    }
    .is-running .progress-bar {
      background-image: linear-gradient(90deg, #60a5fa, #2563eb);
      background-size: 200% 100%;
      animation: processo-shimmer 1.2s linear infinite;
    }
    .is-success .progress-bar { background: #22c55e; }
    .is-warning .progress-bar { background: #f59e0b; }
    .is-error .progress-bar { background: #ef4444; }
    .is-queued .progress-bar { background: #94a3b8; }
    .btn-fechar-processo {
      border: none;
      background: transparent;
      color: #64748b;
      width: 26px;
      height: 26px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .btn-fechar-processo:hover {
      background: #f1f5f9;
      color: #0f172a;
    }
    @keyframes processo-shimmer {
      0% { background-position: 0% 50%; }
      100% { background-position: 100% 50%; }
    }
