/* ================================================================
   FECEJ 2026 — Admin Panel Stylesheet
   ================================================================ */

/* ── ADMIN BODY ── */
.admin-body { background: #f0f4f8; }

/* ── LOGIN SCREEN ── */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #6d28d9 50%, #1e40af 100%);
  padding: 24px;
  position: relative;
}
.login-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='40' cy='40' r='36' stroke='%23ffffff' stroke-opacity='.04' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='20' stroke='%23ffffff' stroke-opacity='.04' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") center;
}

.login-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 48px 44px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  position: relative; z-index: 1;
  backdrop-filter: blur(10px);
}
.login-logo {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #1e40af, #6d28d9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem; color: #fff;
  box-shadow: 0 8px 24px rgba(37,99,235,.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,99,235,.4); }
  50%       { box-shadow: 0 8px 36px rgba(37,99,235,.6); }
}

.login-card h1 { font-size: 1.55rem; font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.login-sub { color: #64748b; font-size: .9rem; margin-bottom: 28px; }

.login-error {
  background: #fee2e2; color: #dc2626;
  border-radius: 8px; padding: 11px 14px;
  font-size: .875rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  text-align: left;
  animation: shake .3s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.login-input-wrap {
  position: relative; margin-bottom: 16px;
}
.login-input-wrap i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; font-size: .95rem;
}
.login-input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
  letter-spacing: 1px;
  transition: border-color .2s, box-shadow .2s;
  color: #1e293b;
}
.login-input-wrap input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,.5); }
.btn-login:disabled { opacity: .7; cursor: wait; transform: none; }

.login-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: #64748b; text-decoration: none;
  font-size: .875rem; margin-top: 20px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all .2s;
}
.login-back:hover { color: #1e40af; background: #eff6ff; }

/* ================================================================
   ADMIN PANEL
   ================================================================ */
.admin-panel {
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ── HEADER ── */
.admin-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #fff; padding: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.admin-container {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
}
.admin-header .admin-container {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.admin-header-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 1rem; font-weight: 700; letter-spacing: -.3px;
}
.admin-header-brand i { font-size: 1.3rem; opacity: .9; }

.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,.14);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.btn-nav:hover {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

/* ── MAIN ── */
.admin-main {
  flex: 1;
  padding: 28px 24px;
}

.admin-loading {
  text-align: center; padding: 80px 20px; color: #64748b;
}
.admin-loading .loader-ring { margin-bottom: 16px; }

/* ── FILTER BAR ── */
.filter-bar {
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  margin-bottom: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.filter-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 220px;
}
.filter-search i {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; pointer-events: none;
}
.filter-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 2px solid #e2e8f0;
  border-radius: 9px;
  font-size: .88rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.filter-search input:focus {
  outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.filter-selects {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.filter-selects select {
  padding: 10px 32px 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 9px;
  font-size: .85rem;
  font-family: inherit;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2394a3b8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
  transition: border-color .2s;
  min-width: 175px;
  white-space: nowrap;
}
.filter-selects select:focus { outline: none; border-color: #2563eb; }

.btn-filter-clear {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: #f8fafc; color: #64748b;
  border: 2px solid #e2e8f0;
  border-radius: 9px; font-size: .85rem;
  font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.btn-filter-clear:hover { background: #e2e8f0; color: #1e293b; }

.btn-rel-cat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  background: #2563eb; color: #ffffff;
  border: none;
  border-radius: 9px; font-size: .85rem;
  font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.btn-rel-cat:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 16px;
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
  position: relative;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, #2563eb);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  color: #fff;
}
.stat-blue   { background: #3b82f6; }
.stat-green  { background: #10b981; }
.stat-pink   { background: #f43f5e; }
.stat-orange { background: #f59e0b; }
.stat-purple { background: #8b5cf6; }

.text-green { color: #10b981 !important; }

.stat-info { flex: 1; min-width: 0; }
.stat-label {
  display: block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: #64748b;
}
.stat-value {
  display: block; font-size: 1.8rem; font-weight: 800;
  color: #1e293b; line-height: 1.2;
}
.stat-small { font-size: 1.2rem; }

/* ── CHARTS ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.chart-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.chart-card h3 {
  font-size: .9rem; font-weight: 700; color: #1e293b;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.chart-card h3 i { color: #2563eb; }
.chart-bar-item { margin-bottom: 12px; }
.chart-label {
  display: flex; justify-content: space-between;
  font-size: .8rem; color: #475569;
  margin-bottom: 5px; font-weight: 500;
}
.chart-label strong { color: #1e293b; font-weight: 700; }
.bar-track { background: #e2e8f0; height: 8px; border-radius: 4px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 4px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(90deg, #1e40af, #60a5fa);
}
.bar-fill.orange { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.bar-fill.green  { background: linear-gradient(90deg, #059669, #34d399); }
.bar-fill.purple { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.chart-empty { color: #94a3b8; font-size: .85rem; text-align: center; padding: 20px; }

/* ── TABLE CARD ── */
.table-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 10px;
}
.table-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  background: linear-gradient(90deg, #f8fafc, #fff);
}
.table-card-header h2 {
  font-size: .95rem; font-weight: 700; color: #1e293b;
  display: flex; align-items: center; gap: 9px;
}
.table-card-header h2 i { color: #2563eb; }
.table-count { font-size: .82rem; color: #64748b; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; }

.table-scroll { overflow-x: auto; max-height: 560px; overflow-y: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 1100px; }
.admin-table thead { position: sticky; top: 0; z-index: 10; }
.admin-table thead th {
  background: #f8fafc;
  padding: 12px 14px;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #475569;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: .86rem;
  vertical-align: top;
  color: #334155;
}
.admin-table tbody tr:hover { background: #f8fafc; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.cell-alunos {
  white-space: pre-line;
  font-size: .8rem;
  color: #475569;
  max-width: 200px;
  line-height: 1.6;
}

/* BADGES */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem; font-weight: 700;
  white-space: nowrap; letter-spacing: .3px;
}
.badge-novo      { background: #dbeafe; color: #1d4ed8; }
.badge-execucao  { background: #fef3c7; color: #b45309; }
.badge-concluido { background: #d1fae5; color: #065f46; }
.badge-cat       { background: #ede9fe; color: #5b21b6; }
.badge-sim       { background: #d1fae5; color: #065f46; }
.badge-nao       { background: #fee2e2; color: #991b1b; }

/* TABLE ACTION BUTTONS */
.btn-tbl {
  background: none; border: none;
  cursor: pointer; padding: 6px 8px;
  border-radius: 6px; font-size: .9rem;
  transition: all .15s;
}
.btn-tbl-view  { color: #2563eb; }
.btn-tbl-view:hover  { background: #dbeafe; }
.btn-tbl-edit  { color: #f59e0b; }
.btn-tbl-edit:hover  { background: #fef3c7; }
.btn-tbl-del   { color: #ef4444; }
.btn-tbl-del:hover   { background: #fee2e2; }

/* EMPTY STATE */
.empty-state {
  text-align: center; padding: 60px 20px; color: #94a3b8;
}
.empty-state i { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: .95rem; }

/* ── ADMIN FOOTER ── */
.admin-footer {
  background: #0f172a; color: #64748b;
  padding: 18px 24px; margin-top: auto;
}
.admin-footer .admin-container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; font-size: .8rem;
}
.admin-footer strong { color: #e2e8f0; }

/* ================================================================
   MODAIS ADMIN
   ================================================================ */
.modal-header-bar {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff; padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 16px 16px 0 0;
}
.modal-header-bar h3 {
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.modal-close-btn {
  background: rgba(255,255,255,.15); border: none;
  color: #fff; font-size: 1.5rem; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  line-height: 1;
}
.modal-close-btn:hover { background: rgba(255,255,255,.3); }

/* DETAIL MODAL */
.detail-box {
  text-align: left; padding: 0;
  max-width: 680px; max-height: 88vh;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-scroll-body {
  flex: 1; overflow-y: auto;
  padding: 22px 24px;
}
.modal-footer-bar {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 0 0 16px 16px;
  text-align: right;
}
.detail-row {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 12px; padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: .88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-key { font-weight: 700; color: #475569; }
.detail-val { color: #1e293b; word-break: break-word; }

/* EDIT MODAL */
.edit-box {
  text-align: left; padding: 0;
  max-width: 860px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
}
.edit-header {
  background: linear-gradient(135deg, #d97706, #f59e0b) !important;
}
.edit-form-body { flex: 1; overflow-y: auto; padding: 24px; }

.edit-section {
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1.5px solid #f1f5f9;
}
.edit-section:last-child { border-bottom: none; }
.edit-section-title {
  font-size: .9rem; font-weight: 700; color: #92400e;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.edit-section-title i { color: #f59e0b; }

.edit-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-form-group { display: flex; flex-direction: column; margin-bottom: 14px; }
.edit-form-group label {
  font-size: .8rem; font-weight: 600;
  color: #475569; margin-bottom: 6px;
}
.edit-form-group input,
.edit-form-group select,
.edit-form-group textarea {
  padding: 9px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
  outline: none; border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

/* Edit toggles */
.edit-toggle-group { display: flex; gap: 10px; margin-top: 4px; }
.edit-toggle-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: .875rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all .2s;
}
.edit-toggle-btn:hover { border-color: #f59e0b; }
.edit-toggle-btn.active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border-color: #f59e0b; color: #fff;
  box-shadow: 0 3px 10px rgba(245,158,11,.3);
}
.edit-toggle-btn.active-no {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: #ef4444; color: #fff;
}

/* Edit tables */
.edit-table {
  width: 100%; border-collapse: collapse;
  font-size: .83rem; margin-bottom: 10px;
}
.edit-table th {
  background: #fef3c7;
  padding: 9px 10px; text-align: left;
  font-size: .72rem; text-transform: uppercase;
  letter-spacing: .4px; color: #92400e;
  border-bottom: 2px solid #fde68a;
}
.edit-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.edit-table tr:last-child td { border-bottom: none; }
.edit-table input, .edit-table select {
  width: 100%; padding: 7px 9px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: .83rem; font-family: inherit;
}
.edit-table input:focus, .edit-table select:focus {
  outline: none; border-color: #f59e0b;
}
.edit-num-cell { font-weight: 700; color: #f59e0b; text-align: center; width: 36px; }
.edit-total-cell { text-align: right; font-weight: 600; color: #16a34a; white-space: nowrap; }

.edit-table tfoot td {
  font-size: .88rem; font-weight: 700;
  background: #fef3c7; padding: 10px;
  border-top: 2px solid #fde68a;
}
.edit-grand-total { color: #16a34a; font-size: 1rem; }

.btn-add-edit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: #fff; border: 2px solid #f59e0b;
  color: #92400e; border-radius: 7px;
  font-size: .8rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all .2s;
}
.btn-add-edit:hover { background: #f59e0b; color: #fff; }
.btn-del-edit {
  background: none; border: none; cursor: pointer;
  color: #94a3b8; padding: 4px 6px; border-radius: 5px;
  font-size: .9rem; transition: all .15s;
}
.btn-del-edit:hover { color: #ef4444; background: #fee2e2; }

/* Edit Actions */
.edit-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  padding-top: 18px; margin-top: 6px;
  border-top: 2px solid #f1f5f9;
  flex-wrap: wrap;
}
.btn-save-edit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; border: none;
  border-radius: 9px; font-size: .9rem;
  font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 12px rgba(16,185,129,.35);
}
.btn-save-edit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,185,129,.4); }
.btn-save-edit:disabled { opacity: .7; cursor: wait; }
.btn-cancel-edit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: #fff; color: #64748b;
  border: 2px solid #e2e8f0;
  border-radius: 9px; font-size: .9rem;
  font-weight: 600; font-family: inherit; cursor: pointer;
  transition: all .2s;
}
.btn-cancel-edit:hover { background: #f1f5f9; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: #1e293b; color: #fff;
  padding: 13px 22px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  font-size: .88rem; font-weight: 500;
  z-index: 3000; pointer-events: none;
  max-width: 340px;
  display: flex; align-items: center; gap: 8px;
  transform: translateY(20px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error   { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.info    { background: linear-gradient(135deg, #1e40af, #2563eb); }

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body > *:not(#printArea) { display: none !important; }
  #printArea {
    display: block !important; position: absolute; top: 0; left: 0;
    width: 100%; font-family: Arial, sans-serif; background: #fff;
  }
  .print-header {
    text-align: center; border-bottom: 2px solid #1e40af;
    padding-bottom: 6px; margin-bottom: 8px;
  }
  .print-header h1 { font-size: 12pt; color: #1e40af; text-transform: uppercase; }
  .print-header p  { font-size: 8pt; color: #666; }
  .print-summary {
    display: flex; gap: 6px; margin-bottom: 8px;
    font-size: 7pt;
  }
  .print-summary .si {
    flex: 1; border: 1px solid #bbb; padding: 4px;
    text-align: center;
  }
  .print-summary .si strong { display: block; font-size: 10pt; color: #1e40af; }
  .print-table {
    width: 100%; border-collapse: collapse;
    font-size: 6.5pt; table-layout: fixed;
  }
  .print-table th {
    background: #1e40af; color: #fff;
    padding: 3px 2px; border: 1px solid #1e40af;
    font-size: 6pt; text-transform: uppercase;
  }
  .print-table td {
    padding: 3px 2px; border: 1px solid #ddd;
    vertical-align: top; word-wrap: break-word; line-height: 1.3;
  }
  .print-table tr:nth-child(even) td { background: #f8fafc; }
  .print-total-row td {
    background: #e0e7ff !important;
    font-weight: bold; border: 1.5px solid #1e40af !important;
    font-size: 7.5pt; padding: 4px 2px;
  }
  .print-footer {
    margin-top: 8px; padding-top: 4px;
    border-top: 1px solid #ccc;
    font-size: 6.5pt; text-align: center; color: #666;
  }
}

/* ================================================================
   RESPONSIVO ADMIN
   ================================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3,1fr); }
  .charts-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; gap: 2px; }
  .edit-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-header .admin-container { padding: 12px 16px; }
  .btn-nav span { display: none; }
  .filter-selects select { min-width: 120px; }
}

/* Refinamento visual FECEJ — 01/10/2026 */
.admin-panel, .admin-main, #adminContent { min-width: 0; max-width: 100%; }
.admin-main.admin-container { width: 100%; max-width: 1440px; box-sizing: border-box; }
.stats-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.stat-card { min-width: 0; padding: 18px 14px; gap: 12px; box-shadow: 0 2px 8px rgba(15,23,42,.045); }
.stat-card:has(#statTotal) { order: 0; }
.stat-card:has(#statNovos) { order: 1; --card-accent: #2563eb; }
.stat-card:has(#statExecucao) { order: 2; --card-accent: #d97706; }
.stat-card:has(#statConcluidos) { order: 3; --card-accent: #059669; }
.stat-card:has(#statCusto) { order: 4; --card-accent: #7c3aed; }
.stat-pink { background: #2563eb; }
.stat-value { font-variant-numeric: tabular-nums; }
.stat-small { font-size: clamp(1rem,1.55vw,1.25rem); overflow-wrap: anywhere; }
.charts-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.chart-card { min-width: 0; padding: 20px; }
.chart-label { gap: 12px; line-height: 1.4; }
.chart-label span { overflow-wrap: anywhere; }
.chart-label strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.filter-bar { flex-wrap: wrap; overflow: visible; }
.filter-search { flex: 1 1 240px; min-width: 0; }
.filter-selects { flex: 1 1 440px; min-width: 0; flex-wrap: wrap; }
.filter-selects select { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.table-scroll { width: 100%; max-height: 640px; }
.admin-table { table-layout: fixed; min-width: 1080px; }
.admin-table th:nth-child(1) { width: 44px; }
.admin-table th:nth-child(2) { width: 170px; }
.admin-table th:nth-child(3) { width: 142px; }
.admin-table th:nth-child(4) { width: 260px; }
.admin-table th:nth-child(5) { width: 132px; }
.admin-table th:nth-child(6) { width: 158px; }
.admin-table th:nth-child(7) { width: 160px; }
.admin-table th:nth-child(8) { width: 112px; }
.admin-table th:nth-child(9) { width: 116px; }
.admin-table tbody td { padding: 14px 12px; vertical-align: middle; overflow-wrap: anywhere; }
.project-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; color: #1e293b; }
.badge-cat { white-space: normal; line-height: 1.4; border-radius: 8px; letter-spacing: 0; }
.team-summary { display: flex; flex-direction: column; gap: 4px; background: transparent; border: 0; padding: 6px 0; text-align: left; font: inherit; color: #1d4ed8; cursor: pointer; }
.team-summary span { font-size: .75rem; text-decoration: underline; text-underline-offset: 3px; }
.team-summary:focus-visible, .btn-tbl:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
@media (max-width: 1020px) {
 .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .charts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .chart-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
 .admin-main.admin-container { padding: 18px 14px; }
 .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .stat-card { padding: 14px 12px; gap: 8px; }
 .stat-card:has(#statCusto) { grid-column: 1 / -1; }
 .stat-icon { width: 36px; height: 36px; font-size: 1rem; }
 .stat-label { font-size: .65rem; }
 .stat-value { font-size: 1.5rem; }
 .stat-small { font-size: 1.25rem; }
 .charts-grid { grid-template-columns: minmax(0,1fr); }
 .chart-card:last-child { grid-column: auto; }
 .filter-bar { padding: 14px; }
 .filter-search, .filter-selects { flex-basis: 100%; }
 .filter-selects select { flex-basis: 100%; width: 100%; }
 .admin-header-brand { font-size: .9rem; }
 .admin-header .admin-container { gap: 12px; }
 .btn-nav { padding: 9px 12px; }
}
