@charset "UTF-8";
    :root {
      --primary: #0a3d6b;
      --primary-light: #1a5496;
      --accent: #e8000d;
      --accent-soft: #ff4a4a22;
      --gold: #f5a623;
      --bg: #f3f4f6;
      --card-bg: #ffffff;
      --text: #1a2636;
      --text-muted: #5a6a7e;
      --border: #d0d8e4;
      --green: #1a7a3c;
      --shadow: 0 2px 12px rgba(10,61,107,0.10);
      --shadow-hover: 0 8px 32px rgba(10,61,107,0.18);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Barlow', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── FOOTER ── */
    #main-footer {
      margin-top: auto;
      animation: slideUp 0.6s ease-out;
    }
    #page-login:not([style*="display: none"]) ~ #main-footer {
      display: none;
    }
    @keyframes slideUp {
      from { transform: translateY(20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @media (max-width: 768px) {
      #main-footer {
        padding: 16px 12px;
      }
      #main-footer > div {
        flex-direction: column;
      }
    }

    /* ── LOGIN PAGE ── */
    #page-login {
      display: flex;
      min-height: 100vh;
      background: linear-gradient(135deg, #0a3d6b 0%, #1a5496 60%, #0d2d50 100%);
      align-items: center;
      justify-content: center;
      flex-direction: column;
      position: relative;
      overflow: hidden;
    }
    #page-login::before {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
      pointer-events: none;
    }
    .login-card {
      background: #fff;
      border-radius: 16px;
      box-shadow: 0 24px 64px rgba(0,0,0,0.35);
      padding: 48px 44px 40px;
      width: 100%;
      max-width: 420px;
      position: relative;
      z-index: 1;
      animation: loginIn 0.4s ease;
    }
    @keyframes loginIn {
      from { opacity:0; transform:translateY(24px); }
      to   { opacity:1; transform:translateY(0); }
    }
    .login-logo-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 28px;
      gap: 14px;
    }
    .login-logo-icon {
      width: 52px;
      height: 52px;
      background: var(--primary);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .login-logo-icon svg { width: 30px; height: 30px; }
    .login-logo-text { text-align: left; }
    .login-logo-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px;
      font-weight: 700;
      color: var(--primary);
      letter-spacing: 0.5px;
    }
    .login-logo-sub {
      font-size: 11px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 1px;
    }
    .login-divider {
      height: 1px;
      background: var(--border);
      margin: 0 0 28px;
    }
    .login-field {
      margin-bottom: 18px;
    }
    .login-field label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      margin-bottom: 7px;
    }
    .login-field input {
      width: 100%;
      padding: 11px 14px;
      font-size: 14px;
      font-family: 'Barlow', sans-serif;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: #fafbfc;
      transition: border-color 0.2s, box-shadow 0.2s;
      box-sizing: border-box;
    }
    .login-field input:focus {
      outline: none;
      border-color: var(--primary-light);
      box-shadow: 0 0 0 3px rgba(26,84,150,0.12);
      background: #fff;
    }
    .login-field input.error {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(232,0,13,0.10);
    }
    .login-error {
      display: none;
      background: #fff0f0;
      border: 1px solid #fbb;
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 13px;
      color: var(--accent);
      margin-bottom: 16px;
      text-align: center;
    }
    .login-error.show { display: block; }
    .btn-login {
      width: 100%;
      background: var(--primary);
      color: white;
      border: none;
      padding: 13px;
      font-size: 15px;
      font-family: 'Barlow', sans-serif;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.2s, transform 0.1s;
      letter-spacing: 0.3px;
      margin-top: 6px;
      position: relative;
    }
    .btn-login:hover { background: var(--primary-light); }
    .btn-login:active { transform: scale(0.99); }
    .btn-login:disabled { background: #aaa; cursor: not-allowed; }
    .btn-login .login-spinner {
      display: none;
      width: 18px; height: 18px;
      border: 2px solid rgba(255,255,255,0.4);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
    }
    .btn-login.loading .login-spinner { display: block; }
    @keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
    .login-footer {
      text-align: center;
      margin-top: 24px;
      font-size: 11px;
      color: rgba(255,255,255,0.45);
      position: relative;
      z-index: 1;
    }
    /* Badge de perfil no header */
    .user-badge {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,0.12);
      border-radius: 20px;
      padding: 4px 12px 4px 6px;
      font-size: 13px;
      color: white;
    }
    .user-badge-avatar {
      width: 26px; height: 26px;
      background: var(--accent);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 11px; font-weight: 700; color: white;
    }
    .user-badge-name { font-weight: 500; }
    .user-badge-role {
      font-size: 10px;
      color: rgba(255,255,255,0.6);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* ── HEADER ── */
    header {
      background: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 32px;
      height: 58px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
      position: relative;
      z-index: 10;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .header-logo {
      width: 38px;
      height: 38px;
      background: white;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .header-logo svg {
      width: 28px;
      height: 28px;
    }

    .header-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 17px;
      font-weight: 600;
      letter-spacing: 0.5px;
      color: white;
    }

    .header-subtitle {
      font-size: 11px;
      color: rgba(255,255,255,0.65);
      margin-top: 1px;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }

    .header-center {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 1px;
      color: rgba(255,255,255,0.95);
      text-transform: uppercase;
      letter-spacing: 2px;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 24px;
    }

    /* Classe utilitária: ocultar elementos até o login */
    .gma-hidden {
      display: none !important;
    }

    .header-right a {
      color: rgba(255,255,255,0.8);
      text-decoration: none;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: color 0.2s;
      cursor: pointer;
    }

    .header-right a:hover { color: white; }

    .header-right a svg {
      width: 16px; height: 16px;
    }

    /* ── YEAR BAR ── */
    .year-bar {
      background: #f0f3f7;
      border-bottom: 1px solid var(--border);
      padding: 7px 32px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .year-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 15px;
      font-weight: 600;
      color: var(--green);
      letter-spacing: 0.5px;
    }

    .year-separator {
      color: var(--border);
    }

    .year-desc {
      font-size: 13px;
      color: var(--text-muted);
    }

    /* -- DASHBOARD YEAR BANNER -- */
    #dashboard-year-banner {
      margin: 0 32px 24px;
      background: linear-gradient(135deg, #1a3a5c 0%, #1a5496 100%);
      border-radius: 14px;
      padding: 18px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      cursor: pointer;
      box-shadow: 0 4px 18px rgba(26,84,150,0.22);
      transition: transform 0.15s, box-shadow 0.15s;
      flex-wrap: wrap;
    }
    #dashboard-year-banner:hover {
      transform: translateY(-2px);
      box-shadow: 0 7px 24px rgba(26,84,150,0.30);
    }
    .dyb-left { display: flex; align-items: center; gap: 14px; }
    .dyb-icon {
      width: 48px; height: 48px;
      background: rgba(255,255,255,0.15);
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .dyb-icon svg { width: 24px; height: 24px; color: #fff; }
    .dyb-label {
      font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.7);
      text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 4px;
    }
    .dyb-ano {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
    }
    .dyb-ano-badge {
      display: inline-block;
      background: rgba(255,255,255,0.18);
      color: #fff; font-size: 11px; font-weight: 700;
      padding: 2px 9px; border-radius: 20px;
      margin-left: 10px; vertical-align: middle;
      letter-spacing: .5px;
    }
    .dyb-ano-badge.badge-diff {
      background: #e8a000; color: #fff;
    }
    .dyb-desc {
      font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 2px;
    }
    .dyb-btn {
      background: rgba(255,255,255,0.15);
      border: 1.5px solid rgba(255,255,255,0.35);
      color: #fff; border-radius: 9px;
      padding: 10px 20px; font-size: 13px; font-weight: 700;
      cursor: pointer; display: flex; align-items: center; gap: 7px;
      transition: background 0.15s;
      font-family: 'Barlow', sans-serif;
      white-space: nowrap;
    }
    .dyb-btn:hover { background: rgba(255,255,255,0.26); }
    .dyb-btn svg { width: 15px; height: 15px; }

    /* -- YEAR BAR CLICKABLE -- */
    .year-bar {
      cursor: pointer;
      user-select: none;
      transition: background 0.15s;
    }
    .year-bar:hover { background: #e4e8f0; }
    .year-bar:hover .year-label { text-decoration: underline; }
    .year-bar-hint {
      margin-left: auto;
      font-size: 12px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* ── YEAR MODAL ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      z-index: 1100;
      align-items: flex-start;
      justify-content: center;
      padding-top: 110px;
    }
    .modal-overlay.open { display: flex; }
    .modal-box {
      background: #fff;
      border-radius: 10px;
      padding: 32px 36px;
      width: 100%;
      max-width: 460px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.22);
      animation: modalIn 0.2s ease;
    }
    @keyframes modalIn {
      from { opacity:0; transform:translateY(-14px); }
      to   { opacity:1; transform:translateY(0); }
    }
    .modal-box h2 {
      font-size: 20px; font-weight: 700;
      margin-bottom: 20px; color: var(--text);
    }
    .modal-box label { display:block; font-size:13px; margin-bottom:6px; color:var(--text); }
    .modal-box select {
      width: 100%; padding: 10px 14px; font-size: 15px;
      font-family: 'Barlow', sans-serif;
      border: 1px solid #ccc; border-radius: 6px;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
      color: var(--text); appearance: none; -webkit-appearance: none;
      cursor: pointer; margin-bottom: 20px;
    }
    .modal-box select:focus { outline:none; border-color:#1a73e8; box-shadow:0 0 0 3px rgba(26,115,232,0.15); }
    .modal-actions { display:flex; gap:10px; justify-content:flex-end; }
    .btn-cancelar {
      background:#f0f0f0; color:var(--text); border:none;
      padding:9px 20px; font-size:14px; font-family:'Barlow',sans-serif;
      border-radius:6px; cursor:pointer; transition:background 0.2s;
    }
    .btn-cancelar:hover { background:#ddd; }
    .btn-confirmar {
      background:#1a73e8; color:white; border:none;
      padding:9px 20px; font-size:14px; font-family:'Barlow',sans-serif;
      font-weight:500; border-radius:6px; cursor:pointer; transition:background 0.2s;
    }
    .btn-confirmar:hover { background:#1558b0; }

    /* ── MAIN ── */
    main {
      flex: 1;
      padding: 36px 40px;
    }


    /* ── GRID ── */
    .grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    /* ── MODULE CARD ── */
    .module-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 26px 28px;
      display: flex;
      align-items: center;
      gap: 22px;
      cursor: pointer;
      text-decoration: none;
      color: inherit;
      box-shadow: var(--shadow);
      transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s, background 0.22s;
      animation: fadeUp 0.45s ease both;
      position: relative;
      overflow: hidden;
    }

    .module-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 200px;
      height: 200px;
      border-radius: 50%;
      opacity: 0.08;
      pointer-events: none;
    }

    .module-card:nth-child(1) { 
      animation-delay: 0.05s;
      background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    }
    .module-card:nth-child(1)::before {
      background: linear-gradient(135deg, #1a73e8 0%, #1a73e8);
    }

    .module-card:nth-child(2) { 
      animation-delay: 0.10s;
      background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    }
    .module-card:nth-child(2)::before {
      background: linear-gradient(135deg, #1a7a3c 0%, #1a7a3c);
    }

    .module-card:nth-child(3) { 
      animation-delay: 0.15s;
      background: linear-gradient(135deg, #ffffff 0%, #f3e5f5 100%);
    }
    .module-card:nth-child(3)::before {
      background: linear-gradient(135deg, #7b1fa2 0%, #7b1fa2);
    }

    .module-card:nth-child(4) { 
      animation-delay: 0.20s;
      background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    }
    .module-card:nth-child(4)::before {
      background: linear-gradient(135deg, #1a7a3c 0%, #1a7a3c);
    }

    .module-card:hover {
      box-shadow: var(--shadow-hover);
      transform: translateY(-3px);
      border-color: var(--primary-light);
    }

    .module-card:hover .module-icon {
      background: var(--primary);
    }

    .module-card:hover .module-icon svg {
      color: white;
    }

    .module-card-disabled {
      opacity: 0.55 !important;
      pointer-events: none !important;
      cursor: not-allowed !important;
      background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%) !important;
      border: 2px solid #e8d5d5 !important;
      position: relative;
    }

    .module-card-disabled::after {
      content: '🔒';
      position: absolute;
      top: 12px;
      right: 12px;
      font-size: 20px;
      opacity: 0.7;
    }

    .module-card-disabled:hover {
      box-shadow: 0 2px 8px rgba(232, 0, 13, 0.1) !important;
      transform: none !important;
      border-color: #e8d5d5 !important;
    }

    .module-card-disabled h3,
    .module-card-disabled p {
      color: #999 !important;
    }

    .module-icon {
      width: 56px;
      height: 56px;
      background: #e8eef6;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: background 0.22s;
    }

    .module-icon svg {
      width: 28px;
      height: 28px;
      color: var(--primary);
      transition: color 0.22s;
    }

    .module-info h3 {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px;
      font-weight: 700;
      color: var(--text);
      letter-spacing: 0.2px;
      margin-bottom: 3px;
    }

    .module-info p {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.5;
    }

    /* ── FOOTER ── */
    footer {
      background: var(--primary);
      color: rgba(255,255,255,0.55);
      text-align: center;
      font-size: 12px;
      padding: 12px;
      letter-spacing: 0.5px;
    }

    /* ── ANIMATIONS ── */
    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ── SELECTION PAGE ── */
    #page-select {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 60px 24px;
      background: #fff;
    }

    #page-select h1 {
      font-family: 'Barlow', sans-serif;
      font-size: 26px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 32px;
      text-align: center;
    }

    .select-form {
      width: 100%;
      max-width: 680px;
    }

    .select-form label {
      display: block;
      font-size: 13px;
      color: var(--text);
      margin-bottom: 6px;
    }

    .select-form select {
      width: 100%;
      padding: 10px 14px;
      font-size: 15px;
      font-family: 'Barlow', sans-serif;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      cursor: pointer;
      margin-bottom: 16px;
    }

    .select-form select:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
    }

    .btn-acessar {
      background: #1a73e8;
      color: white;
      border: none;
      padding: 10px 22px;
      font-size: 15px;
      font-family: 'Barlow', sans-serif;
      font-weight: 500;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .btn-acessar:hover {
      background: #1558b0;
    }

    /* ── DASHBOARD (hidden initially) ── */
    #page-dashboard {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: var(--bg);
    }

    /* ── RESPONSIVE ── */
    @media (max-width: 720px) {
      .grid { grid-template-columns: 1fr; }
      .header-center { display: none; }
      main { padding: 24px 16px; }
    }

    /* ── MONITORAMENTO PAGE ── */
    #page-monitoramento {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: var(--bg);
    }

    .monitor-topbar {
      background: #fff;
      border-bottom: 1px solid var(--border);
      padding: 0 32px;
      display: flex;
      align-items: center;
      gap: 0;
      height: 46px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }

    .monitor-topbar-left {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-right: 32px;
    }

    .monitor-year-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 700;
      font-size: 15px;
      color: var(--green);
    }

    .monitor-sys-label {
      font-size: 14px;
      color: var(--text-muted);
    }

    .monitor-nav {
      display: flex;
      align-items: stretch;
      gap: 0;
      flex: 1;
    }

    .monitor-nav a {
      padding: 0 20px;
      font-size: 14px;
      color: var(--text-muted);
      text-decoration: none;
      display: flex;
      align-items: center;
      border-bottom: 3px solid transparent;
      transition: color 0.15s, border-color 0.15s;
      cursor: pointer;
      height: 46px;
    }

    .monitor-nav a:hover { color: var(--text); }
    .monitor-nav a.active {
      color: var(--text);
      font-weight: 600;
      border-bottom: 3px solid var(--primary);
    }

    .monitor-nav .dropdown-wrap {
      position: relative;
    }

    .monitor-nav .dropdown-wrap a {
      gap: 4px;
    }

    .dropdown-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 6px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.12);
      min-width: 180px;
      z-index: 50;
    }

    .dropdown-wrap:hover .dropdown-menu { display: block; }

    .dropdown-menu a {
      display: block;
      padding: 10px 16px;
      font-size: 13px;
      color: var(--text);
      border-bottom: none !important;
      height: auto !important;
    }

    .dropdown-menu a:hover { background: #f4f6fa; }

    .monitor-topbar-right {
      display: flex;
      align-items: center;
      gap: 20px;
      margin-left: auto;
    }

    .monitor-topbar-right a {
      color: var(--text-muted);
      text-decoration: none;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      transition: color 0.15s;
    }

    .monitor-topbar-right a:hover { color: var(--text); }
    .monitor-topbar-right a svg { width:15px; height:15px; }

    .monitor-main {
      flex: 1;
      padding: 0 40px 36px 40px;
      background: var(--bg);
    }

    .monitor-main h1 {
      font-size: 22px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 24px;
    }

    .filter-group {
      margin-bottom: 16px;
    }

    .filter-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 5px;
    }

    .filter-group select {
      width: 100%;
      max-width: 680px;
      padding: 9px 14px;
      font-size: 14px;
      font-family: 'Barlow', sans-serif;
      border: 1px solid #ccc;
      border-radius: 5px;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
      color: var(--text);
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
    }

    .filter-group select:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
    }

    /* ── TABLE ── */
    .prog-table {
      width: 100%;
      max-width: 860px;
      border-collapse: collapse;
      margin-top: 28px;
      font-size: 14px;
    }

    .prog-table thead th {
      text-align: left;
      font-weight: 700;
      font-size: 13px;
      color: var(--text);
      padding: 10px 14px;
      border-bottom: 2px solid var(--border);
    }

    .prog-table tbody tr {
      border-bottom: 1px solid #e8ecf2;
      transition: background 0.15s;
    }

    .prog-table tbody tr:hover { background: #f4f7fc; }
    .prog-table tbody tr.highlight { background: #fdecea; }
    .prog-table tbody tr.highlight:hover { background: #fad9d5; }

    .prog-table td {
      padding: 12px 14px;
      vertical-align: middle;
    }

    .prog-table td:first-child {
      font-weight: 600;
      width: 80px;
      color: var(--text);
    }

    .prog-table td:nth-child(2) {
      width: 220px;
      color: var(--text-muted);
    }

    .prog-cards,
    .acoes-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 14px;
      width: 100%;
      margin-top: 20px;
      padding: 0;
    }

    .prog-card,
    .acao-card {
      display: flex;
      align-items: center;
      gap: 16px;
      background: #fff;
      border: 2px solid #e0e0e0;
      border-radius: 12px;
      padding: 18px 22px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(28, 61, 129, 0.04);
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .prog-card:hover,
    .acao-card:hover {
      transform: translateY(-2px);
      border-color: #1a73e8;
      box-shadow: 0 4px 18px rgba(26, 115, 232, 0.14);
    }

    .prog-card.highlight {
      background: #fff7f6;
      border-color: #e7a6a3;
    }

    .card-media {
      flex-shrink: 0;
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
    }

    .card-media::before {
      display: none;
    }

    .card-media-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }

    .card-media-icon {
      font-size: 15px;
      font-weight: 800;
      letter-spacing: 0.5px;
      color: #fff;
    }

    .card-media-label {
      display: none;
    }

    .card-body {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .prog-card .card-top,
    .acao-card .card-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .card-title {
      font-size: 14px;
      font-weight: 700;
      color: #1a1a2e;
      margin-bottom: 2px;
      line-height: 1.35;
      word-break: break-word;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-code {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .card-type,
    .acao-card .card-type {
      font-size: 12px;
      color: var(--text-muted);
    }

    .card-desc,
    .acao-card .acao-title {
      font-size: 14px;
      color: var(--text);
      margin-bottom: 12px;
      line-height: 1.55;
    }

    .card-footer,
    .acao-card .card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .card-link {
      color: #1a73e8;
      font-weight: 700;
      text-decoration: none;
      font-size: 12px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .card-link:hover {
      color: #084298;
    }

    .acao-card-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .ac-badge-ok {
      color: #1a7a3c;
      font-size: 11px;
      font-weight: 700;
    }

    .ac-badge-nm {
      color: #999;
      font-size: 11px;
    }

    .empty-state {
      color: #5b6a78;
      background: #f6f8fb;
      border: 1px solid #dde6ef;
      border-radius: 12px;
      padding: 18px 22px;
      font-size: 14px;
      width: 100%;
    }

    .btn-acoes {
      background: none;
      border: 1px solid #bbb;
      border-radius: 4px;
      padding: 5px 10px;
      cursor: pointer;
      color: var(--text-muted);
      transition: background 0.15s, color 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .btn-acoes:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: white;
    }

    .btn-acoes svg { width: 16px; height: 16px; }

    /* ── SUBPAGE AÇÕES ── */
    #page-acoes {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: var(--bg);
    }

    .acoes-main {
      flex: 1;
      padding: 36px 40px;
      background: var(--bg);
    }

    .acoes-breadcrumb {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 20px;
    }

    .acoes-breadcrumb span { color: var(--text); font-weight: 600; }

    .acoes-main h1 {
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px;
    }

    .acoes-program-info {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 28px;
    }

    .acoes-table {
      width: 100%;
      max-width: 860px;
      border-collapse: collapse;
      font-size: 14px;
    }

    .acoes-table thead th {
      text-align: left;
      font-weight: 700;
      font-size: 13px;
      padding: 10px 14px;
      border-bottom: 2px solid var(--border);
    }

    .acoes-table tbody tr {
      border-bottom: 1px solid #e8ecf2;
      transition: background 0.15s;
    }

    .acoes-table tbody tr:hover { background: #f4f7fc; }

    .acoes-table td {
      padding: 11px 14px;
      vertical-align: middle;
    }

    .acoes-table td:first-child {
      width: 80px;
      font-weight: 600;
    }

    .btn-voltar {
      background: #f0f0f0;
      color: var(--text);
      border: none;
      padding: 8px 18px;
      font-size: 13px;
      font-family: 'Barlow', sans-serif;
      border-radius: 5px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 24px;
      transition: background 0.15s;
    }

    .btn-voltar:hover { background: #ddd; }
    .btn-voltar svg { width: 15px; height: 15px; }


    /* ══════════════════════════════════════
       PAGE: MONITORAMENTO DA AÇÃO
    ══════════════════════════════════════ */
    #page-acao-detalhe {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 144px;
      background: var(--bg);
    }

    .acao-main {
      flex: 1;
      padding: 8px 40px 28px 40px;
      background: var(--bg);
    }

    .acao-header-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 20px;
    }

    .acao-header-row h1 {
      font-size: 22px;
      font-weight: 700;
      color: var(--text);
    }

    .lock-icon { color: #aaa; font-size: 22px; }

    .acao-meta-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px 40px;
      margin-bottom: 20px;
      font-size: 13.5px;
    }

    .acao-meta-grid .meta-label {
      font-weight: 700;
      color: var(--text);
      margin-bottom: 1px;
    }

    .acao-meta-grid .meta-value {
      color: var(--text);
      margin-bottom: 8px;
    }

    .acao-meta-grid .meta-right {
      text-align: right;
    }

    /* ── TABS ── */
    .acao-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      margin-bottom: 24px;
      gap: 0;
    }

    .acao-tab {
      padding: 10px 18px;
      font-size: 13.5px;
      cursor: pointer;
      color: #1a73e8;
      border-bottom: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s, background-color 0.15s;
      background: none;
      border-top: none;
      border-left: none;
      border-right: none;
      font-family: 'Barlow', sans-serif;
      font-weight: 600;
    }

    .acao-tab:hover { color: var(--primary); }

    .acao-tab.active {
      color: var(--text);
      border-bottom: 2px solid var(--text);
      font-weight: 700;
      background-color: rgba(13, 71, 161, 0.08);
    }

    .acao-tab-content { display: none; }
    .acao-tab-content.active { display: block; }

    /* ── BARRA DE PROGRESSO ── */
    .acao-progress-container {
      margin-bottom: 28px;
      background: linear-gradient(135deg, #0a3d6b 0%, #1a5496 100%);
      border-radius: 12px;
      padding: 20px 24px;
      box-shadow: 0 4px 20px rgba(10, 61, 107, 0.25);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .acao-progress-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      font-size: 13px;
      font-weight: 700;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .acao-progress-percentage {
      font-size: 18px;
      font-weight: 800;
      color: #f5a623;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .acao-progress-bar {
      width: 100%;
      height: 14px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 7px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.3);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .acao-progress-fill {
      height: 100%;
      display: flex;
      gap: 0;
      border-radius: 6px;
      position: relative;
      width: 100%;
    }

    .acao-progress-segmento {
      height: 100%;
      background: rgba(255, 255, 255, 0.2);
      flex-grow: 1;
      min-width: 1px;
      transition: background 0.3s ease;
      position: relative;
      border-right: 1px solid rgba(255, 255, 255, 0.15);
    }

    .acao-progress-segmento:last-child {
      border-right: none;
    }

    .acao-progress-segmento.preenchido {
      background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .acao-progress-segmento.preenchido::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(255, 255, 255, 0.3) 100%);
      animation: shimmer 2s infinite;
    }

    .acao-progress-fill::after {
      display: none;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .acao-progress-detail {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
      margin-top: 16px;
      font-size: 11px;
    }

    .acao-progress-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 10px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 6px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      color: var(--text-muted);
      font-weight: 600;
      transition: all 0.3s ease;
      cursor: pointer;
    }

    .acao-progress-item:hover {
      background: #ffffff;
      border-color: rgba(255, 255, 255, 0.8);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .acao-progress-item.completed {
      background: linear-gradient(135deg, #1a7a3c 0%, #0d4a23 100%);
      border: 2px solid #0d4a23;
      color: #ffffff;
      font-weight: 700;
      box-shadow: 0 4px 16px rgba(26, 122, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-size: 11px;
    }

    .acao-progress-item.completed:hover {
      background: linear-gradient(135deg, #0d4a23 0%, #061f11 100%);
      border-color: #0d4a23;
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(26, 122, 60, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .acao-progress-item.pending {
      color: #8a9ab5;
    }

    .acao-progress-icon {
      font-size: 16px;
      font-weight: 900;
    }

    .acao-progress-icon.check {
      color: #ffffff;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      font-size: 18px;
    }

    /* ─── ABA DADOS FINANCEIROS ─── */
    .fin-alerta {
      display: flex; align-items: center; gap: 10px;
      border-radius: 8px; padding: 10px 16px;
      font-size: 13px; font-weight: 600;
      margin-bottom: 14px; transition: background .3s;
    }
    .fin-alerta.alerta-red    { background:#fdecea; border:1px solid #f5c2be; color:#c0392b; }
    .fin-alerta.alerta-orange { background:#fef3e2; border:1px solid #f5cba7; color:#d35400; }
    .fin-alerta.alerta-yellow { background:#fefde7; border:1px solid #f9e79f; color:#7d6608; }
    .fin-alerta.alerta-lgreen { background:#eafaf1; border:1px solid #a9dfbf; color:#1e8449; }
    .fin-alerta.alerta-blue   { background:#eaf4fb; border:1px solid #aed6f1; color:#1a5496; }
    .fin-upload-hint {
      display: flex; align-items: center; gap: 9px;
      background: #eef6ff; border: 1px solid #b0d0f0;
      border-radius: 8px; padding: 10px 16px;
      font-size: 12.5px; color: #1a5496; margin-bottom: 18px;
    }
    /* ─── Tabela Execução ─── */
    .fin-exec-scroll { overflow-x: auto; border-radius: 6px; margin-top: 4px; }
    .fin-exec-table {
      width: 100%; border-collapse: collapse; font-size: 12.5px;
      min-width: 960px;
    }
    .fin-exec-table .hdr-main {
      background: #c6efce; color: #1a3a5c;
      font-weight: 800; text-align: center;
      padding: 7px 10px; border: 1px solid #9ecfab;
      font-size: 13px; letter-spacing: .3px; text-transform: uppercase;
    }
    .fin-exec-table .hdr-coef {
      background: #d0dff0; color: #1a3a5c;
      font-weight: 700; text-align: center;
      padding: 7px 10px; border: 1px solid #b0c8e0; font-size: 12px;
    }
    .fin-exec-table .sub-hdr th {
      background: #dce8f4; color: #1a3a5c; font-weight: 700;
      padding: 6px 10px; text-align: center; border: 1px solid #b8cfe0;
      white-space: nowrap; font-size: 12px;
    }
    .fin-exec-table .sub-hdr th.cyan-hdr { color: #0070c0; }
    .fin-exec-table .sub-hdr th.coef-hdr { background: #b8cfe8; }
    .fin-exec-table td {
      padding: 6px 10px; border: 1px solid #c8d8e8;
      text-align: right; background: #fff; white-space: nowrap;
    }
    .fin-exec-table td.left { text-align: left; }
    .fin-exec-table td.tc   { text-align: center; }
    .fin-exec-table td.fw   { font-weight: 700; }
    .fin-exec-table tr:hover td { background: #f0f6ff; }
    .fin-exec-table .row-total td {
      background: #ffff00 !important;
      font-weight: 800; color: #1a3a5c;
      border-top: 2px solid #bbb;
    }
    /* Badge de classificação da Régua */
    .reg-badge {
      display: inline-block; padding: 2px 9px;
      border-radius: 4px; font-size: 11px; font-weight: 700;
      white-space: nowrap;
    }
    .reg-red    { background: #ff0000; color: #fff; }
    .reg-orange { background: #ff8000; color: #fff; }
    .reg-yellow { background: #ffff00; color: #333; }
    .reg-lgreen { background: #92d050; color: #1a3a5c; }
    .reg-blue   { background: #00b0f0; color: #fff; }
    /* ─── Régua de Parâmetros ─── */
    .regua-title {
      font-size: 14px; font-weight: 800; color: #1a3a5c;
      text-align: center; margin-bottom: 8px;
    }
    .regua-table-wrap { overflow-x: auto; }
    .regua-table {
      border-collapse: collapse; margin: 0 auto; font-size: 12px;
    }
    .regua-table .r-faixa {
      border: 1px solid #aaa; padding: 5px 10px;
      text-align: center; background: #dce8f4;
      font-weight: 600; color: #1a3a5c; white-space: nowrap;
    }
    .regua-table .r-cls {
      border: 1px solid #aaa; padding: 7px 10px;
      text-align: center; font-weight: 800;
    }
    .r-red    { background: #ff0000; color: #fff; }
    .r-orange { background: #ff8000; color: #fff; }
    .r-yellow { background: #ffff00; color: #333; }
    .r-lgreen { background: #92d050; color: #1a3a5c; }
    .r-blue   { background: #00b0f0; color: #fff; }
    /* ─── GRÁFICO DE EXECUÇÃO GERAL ─── */
    .exec-grafico-wrap {
      background: #fff; border: 1.5px solid #c5d5e8;
      border-radius: 12px; padding: 18px 24px 18px 24px;
      margin-bottom: 24px; margin-top: 0; box-shadow: 0 2px 8px rgba(26,58,92,0.07);
      width: 100%;
    }
    .exec-grafico-title {
      font-size: 17px; font-weight: 800; color: #1a3a5c;
      margin-bottom: 2px;
    }
    .exec-grafico-subtitle {
      font-size: 12px; color: #607898; margin-bottom: 14px; font-weight: 500;
    }
    .exec-grafico-empty {
      text-align: center; color: #9aabb8; font-size: 14px;
      padding: 48px 0; font-style: italic;
    }
    .exec-grafico-legend {
      display: flex; flex-wrap: wrap; gap: 6px 18px;
      margin-bottom: 14px; align-items: center;
    }
    .exec-leg-item {
      display: flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 600; color: #3a5068;
    }
    .exec-leg-bar {
      display: inline-block; width: 16px; height: 12px;
      border-radius: 2px; flex-shrink: 0;
    }
    .exec-grafico-scroll-wrap {
      overflow-x: auto; overflow-y: visible;
      padding-bottom: 4px;
    }
    .exec-grafico-scroll-wrap svg { display: block; }
    /* ─── UPLOAD MONITORAMENTO XLSX ─── */
    .mon-uploads-section { margin-bottom: 20px; }
    .mon-uploads-titulo {
      font-size: 13px; font-weight: 800; color: #1a3a5c;
      margin-bottom: 10px; padding-bottom: 6px;
      border-bottom: 2px solid #c5d5e8;
    }
    .mon-upload-xlsx-bar {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
      background: #f4f7fb; border: 1.5px solid #c5d5e8;
      border-radius: 9px; padding: 12px 16px;
    }
    .mon-upload-xlsx-bar.loaded { border-color: #27ae60; background: #f0faf4; }
    .mon-upload-btn-xlsx {
      display: inline-flex; align-items: center; gap: 7px;
      background: #1a5496; color: #fff; border-radius: 6px;
      padding: 9px 18px; font-size: 12.5px; font-weight: 700;
      cursor: pointer; white-space: nowrap; flex-shrink: 0;
      transition: background .15s;
    }
    .mon-upload-btn-xlsx:hover { background: #153f74; }
    .mon-upload-xlsx-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
    .mon-upload-xlsx-status {
      font-size: 12.5px; color: #6a7d95; font-style: italic;
    }
    .mon-upload-xlsx-status.loaded { color: #1a8a45; font-weight: 700; font-style: normal; }
    .mon-upload-xlsx-count { font-size: 11px; color: #8a99aa; }
    .mon-upload-xlsx-clear {
      background: none; border: 1px solid #dde3ed;
      border-radius: 5px; padding: 5px 13px;
      font-size: 12px; cursor: pointer; color: #95a5a6;
      transition: color .15s, border-color .15s;
    }
    .mon-upload-xlsx-clear:hover { color: #c0392b; border-color: #c0392b; }
    /* Status por quadrimestre */
    .mon-quad-status-row {
      display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap;
    }
    .mon-qstat {
      display: flex; align-items: center; gap: 6px;
      font-size: 12px; color: #5a6a7e;
      background: #eef3fa; border-radius: 6px;
      padding: 5px 12px; border: 1px solid #c8d8ea;
    }
    .mon-qstat-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: #c8d8ea; flex-shrink: 0;
    }
    .mon-qstat.ok .mon-qstat-dot { background: #27ae60; }
    .mon-qstat.ok { border-color: #a8d8b8; background: #f0faf4; }

    /* -- UPLOAD PDF PAGINA ACOES -- */
    .ac-upload-area {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
      background: #f0f6ff; border: 2px dashed #a0bedd; border-radius: 10px;
      padding: 14px 18px; margin-bottom: 16px;
    }
    .ac-badge-ok  { background:#27ae60;color:#fff;border-radius:4px;padding:2px 7px;font-size:11px;font-weight:700; }
    .ac-badge-nm  { background:#95a5a6;color:#fff;border-radius:4px;padding:2px 7px;font-size:11px; }
    .ac-badge-err { background:#e74c3c;color:#fff;border-radius:4px;padding:2px 7px;font-size:11px; }
    /* -- TABELA EXECUCAO QUADRIMESTRAL -- */
    .exec-upload-area {
      background: #f8faff; border: 2px dashed #b0c8e0; border-radius: 10px;
      padding: 16px 20px; display: flex; align-items: center; gap: 14px;
      margin-bottom: 20px; flex-wrap: wrap;
    }
    .exec-upload-label {
      display: flex; align-items: center; gap: 8px;
      background: #1a5496; color: #fff; border-radius: 7px; padding: 8px 16px;
      font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
    }
    .exec-upload-area input[type=file] { display: none; }
    #fin-pdf-status { font-size: 12.5px; color: #1a5496; font-weight: 600; flex: 1; }
    .exec-section-title {
      font-size: 13px; font-weight: 800; color: #1a2636;
      text-transform: uppercase; letter-spacing: .5px;
      border-left: 4px solid #1a5496; padding-left: 10px;
      margin: 20px 0 10px;
    }
    .exec-table-wrap { overflow-x: auto; margin-bottom: 24px; }
    .exec-table { width: 100%; border-collapse: collapse; font-size: 12px;
      white-space: nowrap; min-width: 960px; }
    .exec-table th { background: #1a3a5c; color: #fff; padding: 7px 10px;
      text-align: center; font-size: 11px; font-weight: 700;
      border: 1px solid #1a3a5c; }
    .exec-table th.left { text-align: left; }
    .exec-table td { padding: 6px 10px; border: 1px solid #dde3ed;
      text-align: right; font-size: 12px; color: #1a2636; }
    .exec-table td.left { text-align: left; }
    .exec-table tr:nth-child(even) td { background: #f5f8fc; }
    .exec-table tr.exec-total td { background: #1a3a5c !important;
      color: #fff !important; font-weight: 800; }
    .exec-badge { display: inline-block; border-radius: 4px;
      padding: 2px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
    .exec-badge-red    { background: #c0392b; color: #fff; }
    .exec-badge-orange { background: #e67e22; color: #fff; }
    .exec-badge-yellow { background: #f1c40f; color: #1a2636; }
    .exec-badge-lgn    { background: #7bc67e; color: #1a2636; }
    .exec-badge-green  { background: #27ae60; color: #fff; }
    .exec-badge-blue   { background: #2980b9; color: #fff; }
    .exec-badge-nm     { background: #95a5a6; color: #fff; }
    /* ── ALERT ── */
    .acao-alert {
      background: #fdecea;
      border: 1px solid #f5c6c2;
      border-radius: 5px;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13.5px;
      color: #c0392b;
      margin-bottom: 20px;
    }

    .acao-alert .alert-icon { font-size: 20px; }

    /* ── FINANCEIRO TABLES ── */
    .fin-section { margin-bottom: 28px; }

    .fin-section-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .fin-section-sub {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    .fin-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12.5px;
      overflow-x: auto;
      display: block;
      white-space: nowrap;
    }

    .fin-table thead tr {
      background: #f0f3f7;
    }

    .fin-table th {
      padding: 8px 10px;
      text-align: center;
      font-weight: 700;
      border: 1px solid #cdd5df;
      font-size: 12px;
      white-space: nowrap;
    }

    .fin-table th.left { text-align: left; }

    .fin-table td {
      padding: 8px 10px;
      border: 1px solid #dde3ed;
      text-align: right;
      white-space: nowrap;
    }

    .fin-table .group-header {
      background: #e8eef6;
      font-weight: 700;
      text-align: left;
      border-right: 2px solid #bcc8d8;
    }

    /* ── TOTAIS ── */
    .fin-totais {
      background: #f4f6fa;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 14px 20px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px 20px;
      font-size: 12.5px;
      margin-top: 20px;
    }

    .fin-totais .tot-item { display: flex; flex-direction: column; gap: 2px; }
    .fin-totais .tot-label { color: var(--text-muted); }
    .fin-totais .tot-value { font-weight: 700; color: var(--text); }
    .fin-totais .tot-value.destaque { color: #1a5496; }

    /* ── RESTRICOES ── */
    .restricao-empty {
      background: #e8f4f8;
      border-radius: 5px;
      padding: 14px 18px;
      font-size: 13.5px;
      color: #2c7a99;
      margin-top: 8px;
    }

    .btn-nova-restricao {
      background: #1a73e8;
      color: white;
      border: none;
      padding: 9px 18px;
      font-size: 13.5px;
      border-radius: 5px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: 'Barlow', sans-serif;
      font-weight: 500;
      float: right;
      margin-bottom: 12px;
      transition: background 0.15s;
    }

    .btn-nova-restricao:hover { background: #1558b0; }

    /* ── CONSIDERACOES ── */
    .cons-item { margin-bottom: 28px; }

    .cons-item .cons-label {
      font-size: 13.5px;
      font-weight: 400;
      color: var(--text);
      margin-bottom: 8px;
      line-height: 1.5;
    }

    .cons-item textarea {
      width: 100%;
      min-height: 100px;
      padding: 10px 12px;
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      font-size: 13.5px;
      font-family: 'Barlow', sans-serif;
      color: var(--text);
      background: #fff;
      box-sizing: border-box;
      resize: vertical;
      line-height: 1.5;
      transition: border-color 0.15s;
    }
    .cons-item textarea:focus {
      outline: none;
      border-color: #1a73e8;
      background: #fff;
    }

    .cons-char-count {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .btn-comentarios {
      float: right;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 6px 14px;
      font-size: 12.5px;
      font-family: 'Barlow', sans-serif;
      cursor: pointer;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 6px;
      transition: background 0.15s;
    }

    .btn-comentarios:hover { background: #f4f6fa; }

    /* ── EXTRATO ── */
    .extrato-empty {
      background: #e8e8e8;
      border-radius: 5px;
      padding: 18px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      text-align: center;
      margin-top: 8px;
    }


    /* ══ METAS FISICAS ══ */
    .metas-info-box {
      background: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 14px 18px;
      margin-bottom: 20px;
      font-size: 13.5px;
      line-height: 2;
    }
    .metas-info-box span { font-weight: 700; color: var(--text); }

    .metas-table-wrap { overflow-x: auto; }

    .metas-table {
      width: 100%;
      min-width: 900px;
      border-collapse: collapse;
      font-size: 13px;
    }

    .metas-table th {
      background: #f0f3f7;
      padding: 9px 10px;
      border: 1px solid #cdd5df;
      text-align: center;
      font-weight: 700;
      font-size: 12.5px;
      white-space: nowrap;
    }

    .metas-table th.left { text-align: left; }

    .metas-table td {
      padding: 8px 10px;
      border: 1px solid #dde3ed;
      text-align: right;
      white-space: nowrap;
    }

    .metas-table td.label-col {
      text-align: left;
      font-weight: 400;
    }

    .metas-table tr.total-row td {
      font-weight: 700;
      background: #f0f3f7;
    }

    .metas-table td.total-label {
      font-weight: 700;
      color: #0a3d6b;
      text-align: left;
      background: #e8eef7;
      border-top: 2px solid #0a3d6b;
      border-bottom: 2px solid #0a3d6b;
    }

    .metas-table td.total-cell {
      font-weight: 700;
      color: #0a3d6b;
      background: #e8eef7;
      border-top: 2px solid #0a3d6b;
      border-bottom: 2px solid #0a3d6b;
    }

    /* ══ ESTILO GLOBAL DE INPUTS EDITÁVEIS (modelo tabela) ══ */
    .gma-input {
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      padding: 5px 8px;
      font-size: 13px;
      font-family: 'Barlow', sans-serif;
      text-align: right;
      background: #fff;
      color: var(--text);
      width: 100%;
      box-sizing: border-box;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .gma-input:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
      background: #f8fbff;
    }
    .gma-input:disabled,
    .gma-input[readonly] {
      background: #f4f6f9;
      color: #9aa5b4;
      cursor: not-allowed;
      border-color: #e0e4ea;
    }
    /* Sistema bloqueado */
    body.sistema-bloqueado .gma-input,
    body.sistema-bloqueado input[type="number"],
    body.sistema-bloqueado input[type="text"]:not(.admin-only-input),
    body.sistema-bloqueado textarea:not(.admin-only-input),
    body.sistema-bloqueado [contenteditable="true"] {
      pointer-events: none;
      background: #f4f6f9 !important;
      color: #9aa5b4 !important;
      border-color: #e0e4ea !important;
      cursor: not-allowed !important;
    }
    body.sistema-bloqueado .btn-salvar-metas,
    body.sistema-bloqueado .btn-salvar,
    body.sistema-bloqueado button[onclick*="salvar"],
    body.sistema-bloqueado button[onclick*="Salvar"],
    body.sistema-bloqueado button[onclick*="icSalvar"],
    body.sistema-bloqueado .dth-btn-save,
    body.sistema-bloqueado #btn-salvar-lancamento {
      opacity: 0.35;
      pointer-events: none;
      cursor: not-allowed !important;
    }
    /* Overlay de bloqueio por célula */
    body.sistema-bloqueado .metas-table td input,
    body.sistema-bloqueado .ppa-table td input,
    body.sistema-bloqueado .dth-td-edit input {
      pointer-events: none;
      background: #f4f6f9 !important;
      color: #9aa5b4 !important;
    }

    /* ── CADEADO NO HEADER ── */
    #btn-lock {
      display: none;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 20px;
      border: 1.5px solid rgba(255,255,255,0.35);
      background: rgba(255,255,255,0.1);
      color: white;
      font-size: 12.5px;
      font-family: 'Barlow', sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
      text-decoration: none;
      letter-spacing: 0.3px;
    }
    #btn-lock:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.6); }
    #btn-lock.locked {
      background: rgba(231,76,60,0.35);
      border-color: rgba(231,76,60,0.7);
    }
    #btn-lock.locked:hover { background: rgba(231,76,60,0.5); }
    #btn-lock svg { width: 14px; height: 14px; }

    /* Banner de sistema bloqueado */
    #lock-banner {
      display: none;
      position: fixed;
      top: 58px;
      left: 0; right: 0;
      z-index: 998;
      background: linear-gradient(90deg, #c0392b, #e74c3c);
      color: white;
      font-size: 12.5px;
      font-weight: 700;
      font-family: 'Barlow', sans-serif;
      text-align: center;
      padding: 6px 16px;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 8px rgba(192,57,43,0.4);
    }
    body.sistema-bloqueado #lock-banner { display: block; }

    /* ── METAS TABLE INPUT (mantém padrão gma-input) ── */
    .metas-table td input[type="number"] {
      width: 80px;
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      padding: 5px 8px;
      font-size: 13px;
      font-family: 'Barlow', sans-serif;
      text-align: right;
      background: #fff;
      color: var(--text);
    }

    .metas-table td input[type="number"]:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
      background: #f8fbff;
    }

    .metas-table td input[type="number"]::-webkit-inner-spin-button { opacity: 1; }

    /* Inputs edição admin - PPA e Atual */
    .metas-table td input.ppa-input,
    .metas-table td input.atual-input {
      background: #fff9f0;
      border: 1.5px solid #d4a37a;
    }

    .metas-table td input.ppa-input:focus,
    .metas-table td input.atual-input:focus {
      outline: none;
      border-color: #d4a37a;
      box-shadow: 0 0 0 3px rgba(212,163,122,0.2);
      background: #fffaf5;
    }

    .metas-save-bar {
      margin-top: 18px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .btn-salvar-metas {
      background: #1a73e8;
      color: white;
      border: none;
      padding: 9px 22px;
      font-size: 14px;
      font-family: 'Barlow', sans-serif;
      font-weight: 500;
      border-radius: 5px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .btn-salvar-metas:hover { background: #1558b0; }

    .metas-save-msg {
      font-size: 13px;
      color: #1a7a3c;
      display: none;
    }

    .metas-group-header {
      background: #e8eef6 !important;
      text-align: center;
      font-weight: 700;
      font-size: 12px;
      border: 1px solid #cdd5df;
      padding: 6px;
    }


    

    /* dropdown */

    


    /* ══════════════════════════════════════
       ADMIN AREA
    ══════════════════════════════════════ */

    /* Modal senha */
    #modal-admin-senha {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 2000;
      align-items: center;
      justify-content: center;
    }
    #modal-admin-senha.open { display: flex; }
    .admin-senha-box {
      background: #fff;
      border-radius: 10px;
      padding: 36px 40px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.22);
      animation: modalIn 0.2s ease;
    }
    .admin-senha-box h2 {
      font-size: 20px; font-weight: 700;
      margin-bottom: 6px; color: var(--text);
    }
    .admin-senha-box p {
      font-size: 13px; color: var(--text-muted);
      margin-bottom: 20px;
    }
    .admin-senha-box label {
      display: block; font-size: 13px;
      font-weight: 600; margin-bottom: 5px;
    }
    .admin-senha-box input {
      width: 100%; padding: 10px 14px;
      font-size: 14px; font-family: 'Barlow', sans-serif;
      border: 1px solid #ccc; border-radius: 5px;
      margin-bottom: 6px;
    }
    .admin-senha-box input:focus {
      outline: none; border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
    }
    .admin-senha-erro {
      font-size: 12px; color: var(--accent);
      margin-bottom: 14px; min-height: 16px;
    }
    .admin-senha-actions { display: flex; gap: 10px; justify-content: flex-end; }

    /* Admin Page */
    #page-admin {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: #f4f6fb;
    }

    .admin-layout {
      display: flex;
      height: calc(100vh - 100px);
    }

    /* Sidebar */
    .admin-sidebar {
      width: 220px;
      background: var(--primary);
      flex-shrink: 0;
      padding: 24px 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .admin-sidebar-title {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      color: rgba(255,255,255,0.45);
      padding: 0 20px 10px;
    }

    .admin-sidebar a {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 11px 20px;
      font-size: 13.5px;
      color: rgba(255,255,255,0.75);
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
      border-left: 3px solid transparent;
    }

    .admin-sidebar a:hover {
      background: rgba(255,255,255,0.08);
      color: white;
    }

    .admin-sidebar a.active {
      background: rgba(255,255,255,0.13);
      color: white;
      border-left: 3px solid #fff;
      font-weight: 600;
    }

    .admin-sidebar a svg { width: 16px; height: 16px; flex-shrink: 0; }

    .admin-sidebar-sep {
      height: 1px;
      background: rgba(255,255,255,0.1);
      margin: 10px 20px;
    }

    /* Admin Content */
    .admin-content {
      flex: 1;
      padding: 32px 36px;
      overflow-y: auto;
      height: 100%;
    }

    .ajst-tab {
      padding: 10px 18px;
      background: #f0f4f8;
      color: #3a4a5e;
      border: 1.5px solid #dde3ed;
      border-radius: 7px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      transition: all .15s;
      white-space: nowrap;
    }
    .ajst-tab:hover {
      background: #e8eef7;
      border-color: #c5d3e0;
    }
    .ajst-tab.active {
      background: var(--accent, #0a3d6b);
      color: #fff;
      border-color: var(--accent, #0a3d6b);
    }

    /* Estilos para o painel de ajustes */
    #ajst-panel,
    #ajst-panel-perguntas {
      visibility: visible !important;
      opacity: 1 !important;
    }

    .admin-section { 
      display: none !important;
    }
    .admin-section.active { 
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
    }

    .admin-section h2 {
      font-size: 20px; font-weight: 700;
      color: var(--text); margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid var(--border);
      display: flex; align-items: center;
      justify-content: space-between;
    }

    /* Admin Table */
    .admin-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13.5px;
      background: #fff;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: var(--shadow);
    }

    .admin-table thead th {
      background: #f0f3f7;
      padding: 11px 16px;
      text-align: left;
      font-weight: 700;
      font-size: 12.5px;
      border-bottom: 2px solid var(--border);
    }

    .admin-table tbody tr {
      border-bottom: 1px solid #eef0f5;
      transition: background 0.12s;
    }

    .admin-table tbody tr:hover { background: #f7f9fd; }

    .admin-table td {
      padding: 11px 16px;
      vertical-align: middle;
    }

    .admin-table .td-actions {
      display: flex; gap: 6px; justify-content: flex-end;
    }

    .btn-edit {
      background: #e8f0fe; color: #1a73e8;
      border: none; border-radius: 4px;
      padding: 5px 12px; font-size: 12.5px;
      font-family: 'Barlow', sans-serif;
      cursor: pointer; transition: background 0.15s;
    }
    .btn-edit:hover { background: #c9daf8; }

    .btn-del {
      background: #fce8e6; color: var(--accent);
      border: none; border-radius: 4px;
      padding: 5px 12px; font-size: 12.5px;
      font-family: 'Barlow', sans-serif;
      cursor: pointer; transition: background 0.15s;
    }
    .btn-del:hover { background: #f5c6c2; }

    .btn-admin-primary {
      background: #1a73e8; color: white;
      border: none; border-radius: 5px;
      padding: 9px 18px; font-size: 13.5px;
      font-family: 'Barlow', sans-serif;
      font-weight: 500; cursor: pointer;
      display: inline-flex; align-items: center;
      gap: 6px; transition: background 0.15s;
    }
    .btn-admin-primary:hover { background: #1558b0; }

    /* Admin Form Modal */
    #modal-admin-form {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      z-index: 2100;
      align-items: center;
      justify-content: center;
    }
    #modal-admin-form.open { display: flex; }

    .admin-form-box {
      background: #fff;
      border-radius: 10px;
      padding: 32px 36px;
      width: 100%;
      max-width: 520px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.2);
      animation: modalIn 0.2s ease;
      max-height: 90vh;
      overflow-y: auto;
    }

    .admin-form-box h3 {
      font-size: 18px; font-weight: 700;
      margin-bottom: 20px; color: var(--text);
    }

    .form-group {
      margin-bottom: 16px;
    }

    .form-group label {
      display: block; font-size: 13px;
      font-weight: 600; margin-bottom: 5px; color: var(--text);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%; padding: 9px 13px;
      font-size: 13.5px; font-family: 'Barlow', sans-serif;
      border: 1px solid #ccc; border-radius: 5px;
      color: var(--text); background: #fff;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
      outline: none; border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
    }

    .form-group textarea { min-height: 80px; resize: vertical; }

    .form-actions {
      display: flex; gap: 10px;
      justify-content: flex-end; margin-top: 20px;
    }

    /* Badge */
    .badge {
      display: inline-block; padding: 3px 10px;
      border-radius: 20px; font-size: 11.5px; font-weight: 600;
    }
    .badge-green { background: #e6f4ea; color: #1a7a3c; }
    .badge-blue  { background: #e8f0fe; color: #1a73e8; }
    .badge-gray  { background: #f0f0f0; color: #666; }

    /* Configs */
    .config-card {
      background: #fff; border-radius: 8px;
      border: 1px solid var(--border);
      padding: 22px 24px; margin-bottom: 16px;
      box-shadow: var(--shadow);
    }
    .config-card h3 {
      font-size: 15px; font-weight: 700;
      margin-bottom: 14px; color: var(--text);
    }
    .config-row {
      display: flex; align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid #f0f0f0;
    }
    .config-row:last-child { border-bottom: none; }
    .config-row label { font-size: 13.5px; color: var(--text); }
    .config-row input[type=text], .config-row select {
      padding: 7px 12px; font-size: 13px;
      border: 1px solid #ccc; border-radius: 4px;
      font-family: 'Barlow', sans-serif; width: 220px;
    }
    .toggle-switch {
      position: relative; width: 44px; height: 24px;
      flex-shrink: 0;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute; cursor: pointer;
      inset: 0; background: #ccc; border-radius: 24px;
      transition: .3s;
    }
    .toggle-slider:before {
      content: ''; position: absolute;
      height: 18px; width: 18px; left: 3px; bottom: 3px;
      background: white; border-radius: 50%; transition: .3s;
    }
    .toggle-switch input:checked + .toggle-slider { background: #1a73e8; }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

    /* Users */
    .user-avatar {
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--primary); color: white;
      display: inline-flex; align-items: center;
      justify-content: center; font-size: 13px;
      font-weight: 700; margin-right: 8px;
      flex-shrink: 0;
    }

    /* ── USUARIOS ADMIN MELHORADO ── */
    .usuarios-header {
      display: flex; align-items: center;
      justify-content: space-between; margin-bottom: 20px;
      flex-wrap: wrap; gap: 12px;
    }
    .usuarios-search input {
      padding: 8px 12px 8px 34px;
      border: 1.5px solid var(--border); border-radius: 7px;
      font-size: 13px; font-family: 'Barlow', sans-serif;
      color: var(--text); width: 220px; transition: border-color 0.2s;
      background: #fafbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a9ab5' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 10px center;
    }
    .usuarios-search input:focus { outline: none; border-color: var(--primary-light); background-color: #fff; }
    .usuarios-stats { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
    .usuarios-stat {
      background: #fff; border: 1px solid var(--border); border-radius: 8px;
      padding: 10px 18px; display: flex; align-items: center; gap: 10px; min-width: 130px;
    }
    .usuarios-stat-num { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; color: var(--primary); }
    .usuarios-stat-label { font-size: 12px; color: var(--text-muted); }
    .badge-perfil-admin    { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6c2; }
    .badge-perfil-gestor   { background: #e8f0fe; color: #1a5496; border: 1px solid #c5d8f8; }
    .badge-perfil-analista { background: #e6f4ea; color: #1a7a3c; border: 1px solid #b7dfc3; }
    .badge-perfil-operador { background: #fff8e1; color: #b07000; border: 1px solid #f5d87a; }
    .badge-perfil-visualiz { background: #f3e5f5; color: #7b1fa2; border: 1px solid #dbb8e8; }
    .form-usuario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .form-usuario-grid .form-group.full { grid-column: 1 / -1; }
    .form-field-error-msg { font-size: 11px; color: var(--accent); margin-top: 2px; display: none; }
    .form-field-error-msg.show { display: block; }
    .modulos-check-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 8px; padding: 12px;
      background: #f8f9fb; border: 1.5px solid var(--border); border-radius: 7px;
    }
    .modulo-check-item {
      display: flex; align-items: center; gap: 8px;
      cursor: pointer; font-size: 13px;
      padding: 6px 8px; border-radius: 6px; transition: background 0.15s;
    }
    .modulo-check-item:hover { background: #eef0f4; }
    .modulo-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
    .senha-toggle-wrap { position: relative; }
    .senha-toggle-wrap input { width: 100%; padding-right: 38px; box-sizing: border-box; }
    .senha-toggle-btn {
      position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0;
    }
    .senha-strength { display: flex; gap: 3px; margin-top: 5px; }
    .senha-strength-bar { height: 3px; flex: 1; border-radius: 2px; background: #e0e0e0; transition: background 0.3s; }


    /* ══ TOAST NOTIFICATION ══ */
    #toast {
      position: fixed;
      bottom: 28px;
      right: 28px;
      background: #1a2636;
      color: white;
      padding: 12px 22px;
      border-radius: 8px;
      font-size: 14px;
      font-family: 'Barlow', sans-serif;
      box-shadow: 0 6px 24px rgba(0,0,0,0.25);
      z-index: 9999;
      display: none;
      align-items: center;
      gap: 10px;
      animation: slideUpToast 0.3s ease;
    }
    #toast.show { display: flex; }
    @keyframes slideUpToast {
      from { opacity:0; transform:translateY(16px); }
      to   { opacity:1; transform:translateY(0); }
    }
    #toast .toast-icon { color: #4ade80; font-size: 16px; }


    /* ══ PAGINA MODULO EM BRANCO ══ */
    #page-modulo-branco {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: #f4f6fb;
    }

    .modulo-branco-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 32px;
      text-align: center;
    }

    .modulo-branco-icon {
      width: 80px; height: 80px;
      border-radius: 50%;
      background: #e8eef6;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 28px;
    }

    .modulo-branco-icon svg { width: 38px; height: 38px; color: var(--primary); }

    .modulo-branco-title {
      font-size: 26px; font-weight: 700;
      color: var(--text); margin-bottom: 12px;
    }

    .modulo-branco-desc {
      font-size: 15px; color: var(--text-muted);
      max-width: 420px; line-height: 1.7;
      margin-bottom: 32px;
    }

    .modulo-branco-badge {
      display: inline-flex; align-items: center; gap: 8px;
      background: #fff3cd; color: #856404;
      border: 1px solid #ffc107;
      border-radius: 20px; padding: 8px 20px;
      font-size: 13px; font-weight: 600;
    }


    /* ═══════════════════════════════════════
       PAGINA DTH - CNH E HABILITACAO
    ═══════════════════════════════════════ */
    #page-rg-dth {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: #f0f4f8;
    }

    .dth-tabs {
      background: #fff;
      border-bottom: 2px solid #dde3ed;
      padding: 0 32px;
      display: flex;
      gap: 0;
      position: sticky;
      top: 100px;
      z-index: 80;
    }
    /* dth-tabs top ajustado dinamicamente por _dthAjustarTabs() */

    .dth-tab {
      padding: 13px 22px;
      font-size: 13.5px;
      font-weight: 700;
      color: #5a6a7e;
      background: none;
      border: none;
      border-bottom: 3px solid transparent;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      letter-spacing: .3px;
      transition: color .15s, border-color .15s;
      margin-bottom: -2px;
    }
    .dth-tab:hover { color: #1a2636; }
    .dth-tab.active { color: #1a5496; border-bottom-color: #1a5496; }

    .dth-tab-content { display: none; padding: 28px 36px; }
    .dth-tab-content.active { display: block; }

    .dth-section-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 15px;
      font-weight: 800;
      color: #0d2a4a;
      text-transform: uppercase;
      letter-spacing: .8px;
      margin-bottom: 18px;
      padding: 10px 16px;
      background: #e8f0fb;
      border-left: 4px solid #1a5496;
      border-radius: 4px;
    }

    .dth-ano-btn {
      padding: 5px 14px;
      font-size: 12.5px;
      font-weight: 700;
      color: #5a6a7e;
      background: #f0f4f8;
      border: 1.5px solid #dde3ed;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      transition: all .15s;
    }
    .dth-ano-btn:hover { background: #e4ecf7; color: #1a5496; border-color: #1a5496; }
    .dth-ano-btn.active { background: #1a5496; color: #fff; border-color: #1a5496; }

    .dth-subtab {
      padding: 7px 18px;
      font-size: 12.5px;
      font-weight: 700;
      color: #5a6a7e;
      background: #f0f4f8;
      border: 1.5px solid #dde3ed;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      transition: all .15s;
    }
    .dth-subtab:hover { background: #e4ecf7; }
    .dth-subtab.active { background: #1a5496; color: #fff; border-color: #1a5496; }

    /* Table */
    .dth-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
      min-width: 900px;
    }

    .dth-th-mun {
      background: #0d2a4a;
      color: #fff;
      padding: 10px 14px;
      text-align: left;
      font-weight: 700;
      border: 1px solid #1a3a5c;
      min-width: 200px;
      font-size: 12px;
    }

    .dth-th-group {
      background: #1a3a5c;
      color: #fff;
      padding: 8px;
      text-align: center;
      font-weight: 800;
      border: 1px solid #0d2a4a;
      font-size: 12px;
    }

    .dth-th-total {
      background: #0d4a2a;
      color: #fff;
      padding: 10px;
      text-align: center;
      font-weight: 800;
      border: 1px solid #0a3a20;
      font-size: 12px;
    }

    .dth-th-mes {
      background: #2a5080;
      color: #fff;
      padding: 7px 8px;
      text-align: center;
      font-weight: 700;
      border: 1px solid #1a3a5c;
      min-width: 60px;
      font-size: 11.5px;
    }

    .dth-td-mun {
      padding: 7px 14px;
      border: 1px solid #dde3ed;
      color: #1a2636;
      font-size: 12px;
      background: #f8fafc;
      white-space: nowrap;
    }

    .dth-td-right {
      padding: 7px 8px;
      border: 1px solid #dde3ed;
      text-align: right;
      font-size: 12px;
      color: #1a2636;
    }

    .dth-td-edit {
      background: #fffde7 !important;
    }

    .dth-td-edit input {
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      background: #fff;
      width: 100%;
      text-align: right;
      font-size: 12px;
      font-family: inherit;
      padding: 4px 6px;
      color: #1a2636;
      box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .dth-td-edit input:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
      background: #f8fbff;
    }

    .dth-td-total {
      padding: 7px 8px;
      border: 1px solid #dde3ed;
      text-align: right;
      font-weight: 700;
      font-size: 12px;
      color: #0d4a2a;
      background: #e6f4ea;
    }

    .dth-total-row td {
      background: #e8f0fb;
      font-weight: 700;
      border: 1px solid #b0c8e0;
      color: #0d2a4a;
      padding: 8px;
    }

    .dth-table-resumo .dth-th-group { background: #1a5496; }
    .dth-table-resumo .dth-th-mes   { background: #2a6ab0; }

    /* Comments */
    .dth-comment-card {
      background: #fff;
      border: 1px solid #dde3ed;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 1px 6px rgba(30,40,80,.06);
    }

    .dth-comment-header {
      background: #0d2a4a;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      padding: 11px 18px;
      letter-spacing: .5px;
      text-transform: uppercase;
    }

    .dth-comment-body {
      padding: 18px;
    }

    .dth-comment-info-label {
      font-size: 11.5px;
      font-weight: 700;
      color: #5a6a7e;
      text-transform: uppercase;
      letter-spacing: .4px;
      margin-bottom: 4px;
    }

    .dth-comment-info-val {
      font-size: 13px;
      color: #1a2636;
      line-height: 1.55;
      background: #f8fafc;
      padding: 8px 12px;
      border-radius: 5px;
      border-left: 3px solid #dde3ed;
    }

    .dth-comment-textarea {
      width: 100%;
      min-height: 80px;
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      padding: 10px 12px;
      font-family: 'Barlow', sans-serif;
      font-size: 13px;
      resize: vertical;
      background: #fff;
      color: var(--text);
      box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .dth-comment-textarea:focus {
      outline: none;
      border-color: #1a5496;
      box-shadow: 0 0 0 3px rgba(26,84,150,.1);
    }

    .dth-btn-save {
      background: #1a7a3c;
      color: #fff;
      border: none;
      border-radius: 8px;
      padding: 10px 24px;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: background .15s;
    }
    .dth-btn-save:hover { background: #155f30; }

    /* Resumo cards */
    .dth-resumo-card {
      background: #fff;
      border: 1px solid #dde3ed;
      border-radius: 10px;
      padding: 18px 20px;
      box-shadow: 0 1px 6px rgba(30,40,80,.06);
    }

    .dth-resumo-card-title {
      font-size: 13px;
      font-weight: 700;
      color: #1a2636;
      margin-bottom: 14px;
      padding-bottom: 10px;
      border-bottom: 2px solid #eef0f5;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .dth-servico-card {
      background: #fff;
      border: 1px solid #dde3ed;
      border-radius: 10px;
      padding: 16px 18px;
      box-shadow: 0 1px 4px rgba(30,40,80,.05);
    }

    .dth-servico-card-title {
      font-size: 12px;
      font-weight: 700;
      color: #5a6a7e;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 12px;
    }

    .dth-servico-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .dth-servico-table th {
      background: #f0f4f8;
      padding: 6px 10px;
      text-align: center;
      font-weight: 700;
      border: 1px solid #dde3ed;
      color: #1a2636;
    }

    .dth-servico-table td {
      padding: 6px 10px;
      border: 1px solid #dde3ed;
      text-align: center;
    }

    .dth-servico-table input,
    .dth-servico-table [contenteditable] {
      pointer-events: none !important;
      user-select: none !important;
      background: transparent !important;
      border: none !important;
      cursor: default !important;
    }

    /* dth-servico-table last-child removed - styled via JS */

    /* ═══════════════════════════════════════
       MODULO RELATORIO DE GESTAO
    ═══════════════════════════════════════ */
    #page-relatorio-gestao {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: #f0f4f8;
    }

    .rg-header {
      background: #fff;
      border-bottom: 1px solid #dde3ed;
      padding: 20px 36px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      position: sticky;
      top: 58px;
      z-index: 79;
    }
    body.has-ctx-nav .rg-header { top: 100px; }

    .rg-header-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .rg-header-icon {
      width: 48px;
      height: 48px;
      background: #e6f4ea;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .rg-header-icon svg { width: 26px; height: 26px; color: #1a7a3c; }

    .rg-header-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px;
      font-weight: 700;
      color: #1a2636;
      letter-spacing: .3px;
    }

    .rg-header-sub {
      font-size: 13px;
      color: #5a6a7e;
      margin-top: 2px;
    }

    .rg-content {
      flex: 1;
      padding: 28px 16px;
    }

    .rg-section-label {
      font-size: 12px;
      font-weight: 700;
      color: #5a6a7e;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 18px;
    }

    .rg-dir-item {
      display: flex;
      align-items: center;
      gap: 18px;
      background: #fff;
      border: 1.5px solid #dde3ed;
      border-radius: 12px;
      padding: 18px 20px;
      cursor: pointer;
      transition: all .18s;
      box-shadow: 0 1px 4px rgba(30,40,80,.06);
    }
    .rg-dir-item:hover {
      border-color: #1a5496;
      box-shadow: 0 4px 16px rgba(26,84,150,.13);
      transform: translateX(4px);
    }
    .rg-dir-item--dth,.rg-dir-item--dth:hover { transform:none; border-color:#1a5496; background:#f0f6ff; }
    .rg-dir-item--active { border-color: #1a5496; background: #f0f6ff; }
    .rg-dir-num {
      width: 34px; height: 34px; border-radius: 50%;
      background: #f0f4f8; border: 2px solid #dde3ed;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 800; color: #5a6a7e; flex-shrink: 0;
    }
    .rg-dir-num--active { background: #1a5496; border-color: #1a5496; color: #fff; }
    .rg-dir-body { flex: 1; min-width: 0; }
    .rg-dir-sigla { font-size: 15px; font-weight: 800; color: #1a2636; letter-spacing: .3px; margin-bottom: 2px; }
    .rg-dir-nome { font-size: 12.5px; color: #5a6a7e; margin-bottom: 8px; }
    .rg-dir-unids { display: flex; flex-wrap: wrap; gap: 6px; }
    .rg-unid-tag {
      font-size: 11px; font-weight: 700; color: #1a5496;
      background: #e8f0fb; border: 1px solid #c5d8f5;
      border-radius: 20px; padding: 2px 10px; letter-spacing: .3px;
    }
    .rg-unid-tag--active { background: #1a5496; color: #fff; border-color: #1a5496; }
    .rg-dir-arrow { color: #c0ccd8; flex-shrink: 0; transition: color .18s; }
    .rg-dir-item:hover .rg-dir-arrow,
    .rg-dir-item--active .rg-dir-arrow,
    .rg-dir-arrow--active { color: #1a5496; }

    .rg-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 18px;
      margin-bottom: 40px;
    }

    @media (max-width: 900px) { .rg-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 500px) { .rg-grid { grid-template-columns: 1fr; } }

    .rg-card {
      background: #4ade80;
      border: 2px solid #22c55e;
      border-radius: 10px;
      padding: 28px 16px;
      text-align: center;
      cursor: pointer;
      transition: transform .18s, box-shadow .18s, background .18s;
      box-shadow: 0 2px 8px rgba(34,197,94,.18);
      user-select: none;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 110px;
    }

    .rg-card:hover {
      background: #22c55e;
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(34,197,94,.32);
    }

    .rg-card:active { transform: translateY(-1px); }

    .rg-card-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 18px;
      font-weight: 800;
      color: #064e1a;
      letter-spacing: 1.5px;
      text-transform: uppercase;
    }

    .rg-card-desc {
      font-size: 11px;
      color: #0a6624;
      font-weight: 500;
    }

    .rg-card.active-card {
      background: #16a34a;
      border-color: #15803d;
      box-shadow: 0 0 0 3px #4ade8066, 0 4px 16px rgba(22,163,74,.3);
    }

    .rg-card.active-card .rg-card-label { color: #fff; }
    .rg-card.active-card .rg-card-desc  { color: rgba(255,255,255,.8); }

    /* Sub-page area */
    .rg-subpage {
      display: none;
      background: #fff;
      border-radius: 12px;
      border: 1px solid #dde3ed;
      box-shadow: 0 2px 12px rgba(30,40,80,.07);
      padding: 28px 32px;
      min-height: 200px;
      animation: fadeUp .3s ease;
    }
    .rg-subpage.active { display: block; }

    .rg-subpage-title {
      font-size: 17px;
      font-weight: 700;
      color: #1a2636;
      margin-bottom: 6px;
      padding-bottom: 12px;
      border-bottom: 2px solid #e6f4ea;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .rg-subpage-title::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 20px;
      background: #22c55e;
      border-radius: 2px;
    }

    .rg-placeholder-msg {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px 20px;
      color: #8a9ab5;
      text-align: center;
      gap: 12px;
    }

    .rg-placeholder-msg svg { width: 40px; height: 40px; opacity: .35; }
    .rg-placeholder-msg p { font-size: 14px; max-width: 300px; line-height: 1.6; }

    /* ═══════════════════════════════════════
       ABA INFORMACOES COMPLEMENTARES
    ═══════════════════════════════════════ */
    .ic-card {
      background: #fff;
      border: 1px solid #dde3ed;
      border-radius: 10px;
      padding: 20px 24px;
      box-shadow: 0 1px 4px rgba(30,40,80,.05);
    }
    .ic-card-title {
      font-size: 13.5px;
      font-weight: 700;
      color: #1a2636;
      margin-bottom: 18px;
      padding-bottom: 10px;
      border-bottom: 2px solid #eef0f5;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .ic-field-group {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-bottom: 14px;
    }
    .ic-label {
      font-size: 12px;
      font-weight: 600;
      color: #5a6a7a;
      text-transform: uppercase;
      letter-spacing: .4px;
    }
    .ic-input {
      padding: 9px 12px;
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      font-size: 13.5px;
      font-family: 'Barlow', sans-serif;
      color: var(--text);
      background: #fff;
      width: 100%;
      box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .ic-input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px #1a73e820; }
    .ic-textarea {
      border: 1px solid #dde3ed;
      border-radius: 7px;
      padding: 9px 12px;
      font-size: 13.5px;
      color: #1a2636;
      background: #fff;
      width: 100%;
      box-sizing: border-box;
      resize: vertical;
      font-family: inherit;
      line-height: 1.5;
      transition: border-color .15s;
    }
    .ic-textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px #1a73e820; }
    .ic-btn-add {
      background: #1a73e8; color: #fff; border: none; border-radius: 6px;
      padding: 5px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
    }
    .ic-btn-add:hover { background: #1558b0; }
    .cons-textarea {
      border: 1px solid #dde3ed;
      border-radius: 7px;
      padding: 9px 12px;
      font-size: 13.5px;
      color: #1a2636;
      background: #fff;
      width: 100%;
      box-sizing: border-box;
      resize: vertical;
      font-family: inherit;
      line-height: 1.5;
      transition: border-color .15s;
    }
    .cons-textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px #1a73e820; }
    .cons-char-count {
      font-size: 11px;
      color: #8a9ab5;
      text-align: right;
      margin-top: 4px;
      font-weight: 500;
    }
    .cons-pergunta-card {
      background: #f8fafc;
      border: 1.5px solid #0a3d6b;
      border-radius: 8px;
      padding: 14px;
      margin-bottom: 14px;
      transition: all 0.2s ease;
    }
    .cons-pergunta-card:hover {
      border-color: #1a7a3c;
      box-shadow: 0 2px 8px rgba(26, 122, 60, 0.1);
    }
    .cons-pergunta-titulo {
      font-weight: 600;
      color: #0a3d6b;
      margin-bottom: 10px;
      font-size: 14px;
      display: flex;
      align-items:center;
      gap: 8px;
    }
    .ic-pergunta-card {
      background: #f8fafc;
      border: 1.5px solid #1a7a3c;
      border-radius: 8px;
      padding: 14px;
      margin-bottom: 14px;
      transition: all 0.2s ease;
    }
    .ic-pergunta-card:hover {
      border-color: #0a3d6b;
      box-shadow: 0 2px 8px rgba(10, 61, 107, 0.1);
    }
    .ic-pergunta-titulo {
      font-weight: 600;
      color: #1a7a3c;
      margin-bottom: 10px;
      font-size: 14px;
      display: flex;
      align-items:center;
      gap: 8px;
    }
    .ic-char-count {
      font-size: 11px;
      color: #8a9ab5;
      text-align: right;
      margin-top: 4px;
      font-weight: 500;
    }

    /* Cards de Perguntas Complementares */
    .pergunta-card {
      background: #f8f9fb;
      border: 1.5px solid #dde3ed;
      border-radius: 8px;
      overflow: hidden;
      transition: all 0.2s ease;
    }
    .pergunta-card:hover {
      border-color: #1a73e8;
      box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
    }
    .pergunta-card-header {
      background: linear-gradient(135deg, #1a73e8 0%, #1558b0 100%);
      padding: 14px 16px;
    }
    .pergunta-card-titulo {
      color: #fff;
      font-size: 13.5px;
      font-weight: 600;
      line-height: 1.4;
    }
    .pergunta-card-body {
      padding: 14px 16px;
    }
    .pergunta-resposta {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid #c8d0dc;
      border-radius: 5px;
      padding: 9px 12px;
      font-size: 13.5px;
      font-family: inherit;
      color: #1a2636;
      line-height: 1.5;
      resize: vertical;
      transition: border-color 0.15s;
    }
    .pergunta-resposta:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px #1a73e820;
    }

    .ic-obra-table {
      width: 100%; border-collapse: collapse; font-size: 12px; min-width: 900px;
    }
    .ic-obra-table thead tr {
      background: #1a3a5c; color: #fff;
    }
    .ic-obra-table th {
      padding: 9px 10px; text-align: center; font-weight: 700;
      letter-spacing: .3px; white-space: nowrap; border: 1px solid #2a5080;
      font-size: 11.5px;
    }
    .ic-obra-table td {
      padding: 0; border: 1px solid #dde3ed;
    }
    .ic-obra-table tbody tr:nth-child(even) { background: #f0f7ff; }
    .ic-obra-table tbody tr:hover { background: #e3f0ff; }
    .ic-obra-table td input, .ic-obra-table td select {
      border: none; background: transparent; width: 100%;
      padding: 6px 8px; font-size: 12px; box-sizing: border-box;
      text-align: center; font-family: inherit;
    }
    .ic-obra-table td input:focus, .ic-obra-table td select:focus {
      outline: 2px solid #1a73e8; outline-offset: -2px; background: #fff;
    }
    .ic-obra-table td.obra-desc input { text-align: left; font-weight: 600; }
    .ic-obra-table td.obra-val input  { text-align: right; color: #1a7a3c; font-weight: 700; }

    #tbl-ic-indicadores td { padding: 8px 12px; border-bottom: 1px solid #eef0f5; font-size: 13px; }
    #tbl-ic-indicadores tr:last-child td { border-bottom: none; }
    #tbl-ic-indicadores input {
      border: 1px solid #dde3ed; border-radius: 5px; padding: 4px 8px;
      font-size: 12.5px; width: 100%; box-sizing: border-box;
    }

    /* ═══════════════════════════════════════
       DASHBOARD PPA - DARK THEME
    ═══════════════════════════════════════ */
    #page-dashboard-ppa { display:none; padding-top: 100px; }

    .dash-nav-btn {
      background: transparent;
      border: none;
      color: #8ab4d4;
      font-size: 13px;
      font-weight: 700;
      padding: 6px 16px;
      cursor: pointer;
      border-radius: 6px;
      letter-spacing: .5px;
      transition: all .15s;
      white-space: nowrap;
    }
    .dash-nav-btn:hover { background: #00d4ff22; color: #00d4ff; }
    .dash-nav-btn.active { background: #00d4ff22; color: #00d4ff; border-bottom: 2px solid #00d4ff; border-radius: 6px 6px 0 0; }

    .dash-filter-chip {
      background: #1e2a3a;
      border: 1px solid #2a3a50;
      color: #8ab4d4;
      font-size: 11px;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 6px;
      cursor: pointer;
      transition: all .15s;
      white-space: nowrap;
      letter-spacing: .3px;
      user-select: none;
    }
    .dash-filter-chip:hover { border-color: #00d4ff88; color: #00d4ff; }
    .dash-filter-chip.active { background: #003a52; border-color: #00d4ff; color: #00d4ff; font-weight: 700; }

    .kpi-card-dark {
      background: #161b27;
      border: 1px solid #00d4ff33;
      border-top: 3px solid #00d4ff;
      border-radius: 10px;
      padding: 14px 18px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .kpi-label { font-size: 10px; color: #5a7a9a; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
    .kpi-value { font-size: 20px; font-weight: 800; color: #fff; }
    .kpi-sub   { font-size: 11px; color: #5a7a9a; }

    #tbody-dash-detalhe tr { border-bottom: 1px solid #1e2a3a; }
    #tbody-dash-detalhe tr:hover { background: #1a2535 !important; }
    #tbody-dash-detalhe td { padding: 7px 10px; color: #cdd6e0; }
    #tbl-dash-arrecad tr:nth-child(even) { background: #1a2030; }
    #tbl-dash-arrecad tr:hover td { background: #1e2a3a !important; }

    /* ═══════════════════════════════════════
       MODULO REVISAO DO PPA
    ═══════════════════════════════════════ */
    #page-revisao-ppa {
      display: none;
      flex-direction: column;
      min-height: 100vh;
      padding-top: 100px;
      background: #f4f6fb;
    }

    /* ── Topbar interna do modulo ── */
    .ppa-topbar {
      background: #fff;
      border-bottom: 1px solid #dde3ed;
      padding: 0 32px;
      display: flex;
      align-items: center;
      gap: 0;
      position: sticky;
      top: 100px;
      z-index: 90;
      overflow-x: auto;
    }

    .ppa-tab {
      padding: 14px 18px;
      font-size: 13px;
      font-weight: 600;
      color: #5f6b7c;
      cursor: pointer;
      border-bottom: 3px solid transparent;
      white-space: nowrap;
      transition: color 0.18s, border-color 0.18s;
      user-select: none;
    }

    .ppa-tab:hover { color: #7b1fa2; }

    .ppa-tab.active {
      color: #7b1fa2;
      border-bottom-color: #7b1fa2;
    }

    /* ── Conteudo das abas ── */
    .ppa-content {
      flex: 1;
      padding: 28px 32px;
    }

    .ppa-section { display: none; }
    .ppa-section.active { display: block; }

    /* ── Header da secao ── */
    .ppa-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px;
      flex-wrap: wrap;
      gap: 12px;
    }

    .ppa-section-title {
      font-size: 18px;
      font-weight: 700;
      color: #1a2636;
    }

    .ppa-section-title span {
      font-size: 13px;
      font-weight: 500;
      color: #7b1fa2;
      background: #f3e5f5;
      padding: 3px 10px;
      border-radius: 12px;
      margin-left: 10px;
    }

    /* ── Card container ── */
    .ppa-card {
      background: #fff;
      border: 1px solid #dde3ed;
      border-radius: 10px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.06);
      overflow: hidden;
      margin-bottom: 24px;
    }

    .ppa-card-header {
      padding: 14px 20px;
      background: #7b1fa2;
      color: #fff;
      font-size: 13.5px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .ppa-card-header.green  { background: #1a7a3c; }
    .ppa-card-header.blue   { background: #0a3d6b; }
    .ppa-card-header.orange { background: #c25e00; }
    .ppa-card-header.gray   { background: #4a5568; }

    /* ── Tabela PPA ── */
    .ppa-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .ppa-table th {
      background: #f7f8fc;
      color: #3d4a5c;
      font-weight: 700;
      padding: 10px 14px;
      text-align: left;
      border-bottom: 2px solid #dde3ed;
      white-space: nowrap;
    }

    .ppa-table th.right { text-align: right; }
    .ppa-table th.center { text-align: center; }

    .ppa-table td {
      padding: 10px 14px;
      border-bottom: 1px solid #eef0f5;
      color: #2d3748;
      vertical-align: middle;
    }

    .ppa-table td.right  { text-align: right; }
    .ppa-table td.center { text-align: center; }

    .ppa-table tr:last-child td { border-bottom: none; }

    .ppa-table tr:hover td { background: #faf8ff; }

    .ppa-table tr.total-row td {
      background: #f0e8f8;
      font-weight: 700;
      color: #4a0e72;
      border-top: 2px solid #ce93d8;
    }

    .ppa-table tr.subtotal-row td {
      background: #f7f3fc;
      font-weight: 600;
      color: #6a1b9a;
      font-size: 12.5px;
    }

    .ppa-table td input[type=text],
    .ppa-table td input[type=number] {
      width: 100%;
      border: 1.5px solid #c8d0dc;
      border-radius: 4px;
      padding: 5px 8px;
      font-size: 12.5px;
      font-family: inherit;
      color: #1a2636;
      background: #fff;
      box-sizing: border-box;
      text-align: right;
      transition: border-color 0.15s;
    }

    .ppa-table td input:focus {
      outline: none;
      border-color: #1a73e8;
      box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
      background: #f8fbff;
    }

    /* ── Badge programa ── */
    .badge-prog {
      display: inline-block;
      padding: 2px 9px;
      border-radius: 12px;
      font-size: 11.5px;
      font-weight: 700;
      background: #ede7f6;
      color: #4a148c;
    }

    /* ── Botoes PPA ── */
    .ppa-btn {
      padding: 8px 18px;
      border-radius: 7px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: background 0.18s;
    }

    .ppa-btn-primary { background: #7b1fa2; color: #fff; }
    .ppa-btn-primary:hover { background: #6a1b9a; }
    .ppa-btn-outline { background: #fff; color: #7b1fa2; border: 1.5px solid #7b1fa2; }
    .ppa-btn-outline:hover { background: #f3e5f5; }

    /* ── Em desenvolvimento placeholder ── */
    .ppa-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 32px;
      text-align: center;
      color: #8a9ab5;
    }

    .ppa-placeholder svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
    .ppa-placeholder h3 { font-size: 16px; font-weight: 700; color: #4a5568; margin-bottom: 8px; }
    .ppa-placeholder p  { font-size: 13.5px; max-width: 360px; line-height: 1.6; }

    /* ── Grid 2 col ── */
    .ppa-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    @media (max-width: 860px) {
      .ppa-grid-2 { grid-template-columns: 1fr; }
      .ppa-topbar { top: 100px; }
      .ppa-content { padding: 16px; }
    }

  
    /* ══ PAINEL AJUSTES ══ */
    #ajustes-overlay {
      display: none; position: fixed; inset: 0;
      z-index: 8000; background: rgba(10,20,40,.55);
      backdrop-filter: blur(3px);
    }
    #ajustes-overlay.aberto { display: block; }

    #ajustes-panel {
      position: fixed; top: 0; right: -840px; bottom: 0;
      width: 820px; max-width: 98vw;
      background: #fff;
      box-shadow: -8px 0 40px rgba(10,30,70,.22);
      display: flex; flex-direction: column;
      z-index: 8001;
      transition: right .28s cubic-bezier(.4,0,.2,1);
    }
    #ajustes-panel.aberto { right: 0; }

    .aj-hdr {
      background: var(--primary); color: #fff;
      padding: 0 22px; height: 54px;
      display: flex; align-items: center; gap: 12px;
      flex-shrink: 0;
    }
    .aj-hdr-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 18px; font-weight: 700; flex: 1;
    }
    .aj-close {
      background: rgba(255,255,255,.15); border: none; color: #fff;
      width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
      font-size: 18px; display: flex; align-items: center; justify-content: center;
      transition: background .15s;
    }
    .aj-close:hover { background: rgba(255,255,255,.3); }

    .aj-tabs {
      background: #f4f6fb; border-bottom: 2px solid #dde3ed;
      padding: 0 20px; display: flex; flex-shrink: 0; overflow-x: auto;
    }
    .aj-tab {
      padding: 11px 16px; font-size: 12.5px; font-weight: 600;
      color: #5a6a7e; background: none; border: none;
      border-bottom: 3px solid transparent; cursor: pointer;
      font-family: 'Barlow', sans-serif; white-space: nowrap;
      transition: color .15s, border-color .15s; margin-bottom: -2px;
    }
    .aj-tab:hover { color: var(--primary); }
    .aj-tab.ativo { color: var(--primary); border-bottom-color: var(--primary); }

    .aj-body { flex: 1; overflow-y: auto; padding: 20px; }
    .aj-sec { display: none; }
    .aj-sec.ativo { display: block; }

    .aj-bloco {
      background: #f8fafc; border: 1px solid #dde3ed;
      border-radius: 10px; padding: 16px 18px; margin-bottom: 14px;
    }
    .aj-bloco-titulo {
      font-size: 11.5px; font-weight: 700; color: #3a4a5e;
      text-transform: uppercase; letter-spacing: .6px;
      margin-bottom: 12px; padding-bottom: 8px;
      border-bottom: 1px solid #e2e8f0;
    }
    .aj-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
    .aj-grade.full { grid-template-columns: 1fr; }
    .aj-grade.tres { grid-template-columns: 1fr 1fr 1fr; }
    .aj-campo { display: flex; flex-direction: column; gap: 3px; }
    .aj-label { font-size: 11px; font-weight: 600; color: #5a6a7e;
                text-transform: uppercase; letter-spacing: .4px; }
    .aj-input, .aj-select, .aj-textarea {
      border: 1.5px solid #dde3ed; border-radius: 7px;
      padding: 7px 11px; font-size: 13px; color: #1a2636;
      font-family: 'Barlow', sans-serif; background: #fff;
      transition: border-color .15s; box-sizing: border-box; width: 100%;
    }
    .aj-input:focus, .aj-select:focus, .aj-textarea:focus {
      outline: none; border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(10,61,107,.1);
    }
    .aj-textarea { resize: vertical; min-height: 68px; }
    .aj-cor { width: 40px; height: 34px; border: 1.5px solid #dde3ed;
              border-radius: 7px; cursor: pointer; padding: 2px 3px; }
    .aj-cor-row { display: flex; gap: 7px; align-items: center; }
    .aj-cor-row .aj-input { flex: 1; }

    .aj-btn {
      border: none; border-radius: 7px; padding: 7px 16px;
      font-size: 12.5px; font-weight: 600; cursor: pointer;
      font-family: 'Barlow', sans-serif;
      display: inline-flex; align-items: center; gap: 5px;
      transition: background .15s, transform .1s;
    }
    .aj-btn:active { transform: scale(.97); }
    .aj-btn-p  { background: var(--primary); color: #fff; }
    .aj-btn-p:hover { background: var(--primary-light); }
    .aj-btn-s  { background: #1a7a3c; color: #fff; }
    .aj-btn-s:hover { background: #155f30; }
    .aj-btn-o  { background: #fff; color: var(--text); border: 1.5px solid #dde3ed; }
    .aj-btn-o:hover { border-color: var(--primary); color: var(--primary); }
    .aj-btn-d  { background: #fce8e6; color: #c0392b; }
    .aj-btn-d:hover { background: #f5c6c2; }
    .aj-btn-sm { padding: 5px 11px; font-size: 11.5px; }

    .aj-lista { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
    .aj-item {
      background: #fff; border: 1px solid #dde3ed; border-radius: 7px;
      padding: 8px 12px; display: flex; align-items: center; gap: 8px; font-size: 12.5px;
    }
    .aj-item-label { flex: 1; color: #1a2636; font-weight: 500; }
    .aj-item-tipo  { font-size: 10.5px; color: #8a9ab5; background: #f0f3f8;
                     padding: 2px 7px; border-radius: 10px; }

    .aj-toggle-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 7px 0; border-bottom: 1px solid #f0f3f8;
    }
    .aj-toggle-row:last-child { border-bottom: none; }
    .aj-toggle-lbl { font-size: 13px; color: #2d3748; }
    .aj-toggle-sub { font-size: 11px; color: #8a9ab5; }

    .aj-grade-add {
      display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 8px;
    }
    .aj-add-card {
      background: #fff; border: 2px dashed #d0d8e8; border-radius: 9px;
      padding: 14px 8px; text-align: center; cursor: pointer;
      transition: border-color .15s, background .15s;
      font-size: 11.5px; font-weight: 600; color: #5a6a7e;
      display: flex; flex-direction: column; align-items: center; gap: 7px;
    }
    .aj-add-card:hover { border-color: var(--primary); color: var(--primary); background: #f0f5ff; }
    .aj-add-card svg { width: 22px; height: 22px; opacity: .65; }
    .aj-add-card:hover svg { opacity: 1; }

    .aj-rodape {
      background: #f8fafc; border-top: 1px solid #dde3ed;
      padding: 12px 20px; display: flex; align-items: center;
      justify-content: space-between; flex-shrink: 0; gap: 10px;
    }
    .aj-msg-ok {
      font-size: 12.5px; color: #1a7a3c; display: none;
      align-items: center; gap: 5px;
    }
    .aj-msg-ok.vis { display: inline-flex; }

    .aj-tema-grid { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }

  
    /* ── GLOBAL CONTEXT NAV BAR ──────────────────────────────── */
    #gma-ctx-nav {
      display: none;
      position: fixed;
      top: 58px;
      left: 0; right: 0;
      z-index: 996;
      background: #1a3a5c;
      border-bottom: 2px solid rgba(255,255,255,0.1);
      padding: 0 24px;
      height: 42px;
      align-items: center;
      gap: 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }
    #gma-ctx-nav.visible { display: flex; }
    .ctx-back-btn {
      display: flex; align-items: center; gap: 5px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.2);
      color: #fff;
      border-radius: 6px;
      padding: 4px 12px;
      font-size: 12px; font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: background .15s;
      text-decoration: none;
      margin-right: 14px;
    }
    .ctx-back-btn:hover { background: rgba(255,255,255,0.22); }
    .ctx-breadcrumb {
      display: flex; align-items: center; gap: 0;
      flex: 1; overflow: hidden;
    }
    .ctx-crumb {
      display: flex; align-items: center; gap: 5px;
      color: rgba(255,255,255,0.65);
      font-size: 12px; font-weight: 500;
      white-space: nowrap;
      text-decoration: none;
      padding: 3px 8px;
      border-radius: 5px;
      cursor: pointer;
      transition: color .15s, background .15s;
    }
    .ctx-crumb:hover { color: #fff; background: rgba(255,255,255,0.1); }
    .ctx-crumb.active { color: #fff; font-weight: 700; cursor: default; }
    .ctx-crumb.active:hover { background: transparent; }
    .ctx-sep {
      color: rgba(255,255,255,0.3);
      font-size: 14px;
      margin: 0 2px;
      flex-shrink: 0;
    }
    .ctx-module-badge {
      background: rgba(255,255,255,0.15);
      color: #fff;
      border-radius: 5px;
      padding: 3px 10px;
      font-size: 11px; font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      white-space: nowrap;
    }
    .ctx-shortcuts {
      display: flex; align-items: center; gap: 6px;
      margin-left: 14px;
    }
    .ctx-shortcut-btn {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.18);
      color: rgba(255,255,255,0.8);
      border-radius: 5px;
      padding: 3px 10px;
      font-size: 11px; font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      text-decoration: none;
      transition: background .15s, color .15s;
    }
    .ctx-shortcut-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

    /* Offset all pages that need the ctx nav */
    /* padding-top handled per-page */
    /* Monitoramento already has complex padding - override carefully */
    body.has-ctx-nav #page-monitoramento,
    body.has-ctx-nav #page-acoes,
    body.has-ctx-nav #page-acao-detalhe,
    body.has-ctx-nav #page-relatorio-gestao,
    body.has-ctx-nav #page-rg-dth,
    body.has-ctx-nav #page-revisao-ppa,
    body.has-ctx-nav #page-dashboard-ppa,
    body.has-ctx-nav #page-modulo-branco,
    body.has-ctx-nav #page-relatorio-geral,
    body.has-ctx-nav #page-relatorio-rg,
    body.has-ctx-nav #page-relatorio-ppa { padding-top: calc(58px + 42px + 10px) !important; }

    /* ══════════════════════════════════════════════
       EDIÇÃO INLINE DE ELEMENTOS (Modo Admin)
       ══════════════════════════════════════════════ */

    /* Wrapper editável — contorno ao hover */
    .ei-editavel {
      position: relative !important;
      outline: 2px dashed transparent;
      outline-offset: 3px;
      transition: outline-color .2s, box-shadow .2s;
    }
    .ei-editavel:hover {
      outline-color: #1a73e8;
      box-shadow: 0 0 0 4px rgba(26,115,232,0.10);
      z-index: 50;
    }

    /* Botão de edição no canto */
    .ei-btn-edit {
      position: absolute;
      top: -8px;
      right: -8px;
      width: 28px;
      height: 28px;
      background: #1a73e8;
      color: #fff;
      border: 2px solid #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 13px;
      font-weight: 700;
      z-index: 100;
      box-shadow: 0 2px 8px rgba(26,115,232,0.35);
      opacity: 0;
      transform: scale(0.7);
      transition: opacity .2s, transform .2s;
      pointer-events: none;
      line-height: 1;
    }
    .ei-editavel:hover .ei-btn-edit {
      opacity: 1;
      transform: scale(1);
      pointer-events: all;
    }
    .ei-btn-edit:hover {
      background: #1558b0;
      transform: scale(1.1) !important;
    }

    /* Badge vinculado */
    .ei-badge-vinculado {
      position: absolute;
      top: -8px;
      left: -8px;
      background: #ff9800;
      color: #fff;
      font-size: 9px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 8px;
      border: 2px solid #fff;
      z-index: 100;
      box-shadow: 0 1px 4px rgba(255,152,0,0.3);
      opacity: 0;
      transition: opacity .2s;
      pointer-events: none;
    }
    .ei-editavel:hover .ei-badge-vinculado {
      opacity: 1;
    }

    /* Tipo badge */
    .ei-badge-tipo {
      position: absolute;
      bottom: -6px;
      left: 50%;
      transform: translateX(-50%);
      background: #0a3d6b;
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      padding: 1px 7px;
      border-radius: 6px;
      white-space: nowrap;
      z-index: 100;
      opacity: 0;
      transition: opacity .2s;
      pointer-events: none;
    }
    .ei-editavel:hover .ei-badge-tipo {
      opacity: 1;
    }

    /* Popover */
    .ei-popover {
      position: fixed;
      z-index: 10001;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
      width: 360px;
      max-height: 80vh;
      overflow-y: auto;
      font-family: 'Barlow', sans-serif;
      animation: eiFadeIn .2s ease;
    }
    @keyframes eiFadeIn {
      from { opacity: 0; transform: translateY(-8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .ei-popover-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 18px 10px;
      border-bottom: 1px solid #eef0f4;
    }
    .ei-popover-titulo {
      font-size: 14px;
      font-weight: 700;
      color: #1a2636;
    }
    .ei-popover-close {
      background: none;
      border: none;
      font-size: 16px;
      color: #8a9ab5;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 4px;
    }
    .ei-popover-close:hover { background: #f0f0f0; color: #c0392b; }
    .ei-popover-aviso {
      background: linear-gradient(135deg, #fff3cd, #ffe6cc);
      border-left: 4px solid #ff9800;
      padding: 8px 14px;
      margin: 10px 14px 0;
      border-radius: 6px;
      font-size: 11px;
      color: #7a5d00;
      font-weight: 500;
    }
    .ei-popover-body {
      padding: 14px 18px;
    }
    .ei-popover-body label {
      display: block;
      font-size: 10px;
      font-weight: 700;
      color: #5a6a7e;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 4px;
    }
    .ei-popover-body input[type="text"],
    .ei-popover-body input[type="number"],
    .ei-popover-body textarea,
    .ei-popover-body select {
      width: 100%;
      padding: 7px 10px;
      font-size: 12px;
      font-family: 'Barlow', sans-serif;
      border: 1.5px solid #dde3ed;
      border-radius: 6px;
      background: #fafbfc;
      box-sizing: border-box;
      margin-bottom: 10px;
      transition: border-color .15s;
    }
    .ei-popover-body input:focus,
    .ei-popover-body textarea:focus,
    .ei-popover-body select:focus {
      border-color: #1a73e8;
      outline: none;
      background: #fff;
    }
    .ei-popover-body textarea { min-height: 50px; resize: vertical; }
    .ei-popover-body .ei-cor-row {
      display: flex;
      gap: 6px;
      align-items: center;
      margin-bottom: 10px;
    }
    .ei-popover-body .ei-cor-row input[type="color"] {
      width: 32px;
      height: 32px;
      border: 1.5px solid #dde3ed;
      border-radius: 6px;
      cursor: pointer;
      padding: 1px;
      margin-bottom: 0;
    }
    .ei-popover-body .ei-cor-row input[type="text"] { flex: 1; margin-bottom: 0; }
    .ei-popover-body .ei-toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      padding: 4px 0;
    }
    .ei-popover-body .ei-toggle-label {
      font-size: 12px;
      font-weight: 600;
      color: #1a2636;
    }
    .ei-popover-footer {
      display: flex;
      gap: 6px;
      padding: 10px 18px 14px;
      border-top: 1px solid #eef0f4;
    }
    .ei-btn {
      border: none;
      border-radius: 6px;
      padding: 7px 14px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      transition: background .15s;
    }
    .ei-btn-salvar  { background: #1a73e8; color: #fff; }
    .ei-btn-salvar:hover { background: #1558b0; }
    .ei-btn-excluir { background: #d63638; color: #fff; }
    .ei-btn-excluir:hover { background: #b02a2d; }
    .ei-btn-cancelar { background: #eef0f4; color: #5a6a7e; }
    .ei-btn-cancelar:hover { background: #dde3ed; }

    /* Overlay escuro atrás do popover */
    #edicao-inline-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.18);
      z-index: 10000;
    }

    /* Header button active state */
    #btn-modo-edicao.ativo {
      background: rgba(26,115,232,0.25) !important;
      color: #90caf9 !important;
    }
    #btn-modo-edicao.ativo span { color: #90caf9; }

    /* ── Toolbar flutuante para edição direta ── */
    #ei-toolbar {
      position: fixed;
      z-index: 10002;
      background: #1a2636;
      border-radius: 10px;
      padding: 6px 8px;
      display: flex;
      gap: 6px;
      box-shadow: 0 6px 24px rgba(0,0,0,0.30), 0 0 0 1px rgba(255,255,255,0.06);
      animation: eiFadeIn .15s ease;
    }
    #ei-toolbar button {
      background: none;
      border: 1.5px solid rgba(255,255,255,0.2);
      color: #fff;
      padding: 6px 14px;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Barlow', sans-serif;
      transition: background .15s, border-color .15s;
      white-space: nowrap;
    }
    #ei-toolbar button:first-child {
      background: #1a73e8;
      border-color: #1a73e8;
    }
    #ei-toolbar button:first-child:hover { background: #1558b0; }
    #ei-toolbar button:hover { background: rgba(255,255,255,0.1); }
    #ei-toolbar button:last-child { border-color: rgba(255,193,7,0.5); color: #ffc107; }
    #ei-toolbar button:last-child:hover { background: rgba(255,193,7,0.15); }

    /* ── Estilo do elemento em edição direta (contenteditable) ── */
    .ei-editando {
      outline: 2.5px solid #1a73e8 !important;
      outline-offset: 3px;
      background: rgba(26,115,232,0.05) !important;
      min-height: 1em;
      cursor: text !important;
      border-radius: 4px;
    }
    .ei-editando:focus {
      box-shadow: 0 0 0 4px rgba(26,115,232,0.15);
    }

    /* ── Hover em modo edição para elementos de texto ── */
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) p:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) span:not(.ei-badge-tipo):not(.ei-toggle-label):hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) li:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) td:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) th:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) label:not(.aj-label):not(.toggle-switch):hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) small:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) strong:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) em:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) dd:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) dt:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) blockquote:hover,
    body.ei-modo-edicao [id^="page-"]:not([style*="display: none"]) figcaption:hover,
    body.ei-modo-edicao header p:hover,
    body.ei-modo-edicao header span:hover,
    body.ei-modo-edicao #main-year-bar span:hover {
      outline: 2px dashed rgba(26,115,232,0.5) !important;
      outline-offset: 2px;
      cursor: text;
      border-radius: 3px;
    }

