/* INOVATECH — folha de estilos do clone */
:root {
  --primary: #1e3a5f;
  --primary-dark: #152b48;
  --primary-soft: #e8eef6;
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #64748b;
  --green: #16a34a;
  --green-dark: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
.resource-link:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-brand {
  background: linear-gradient(160deg, #1e3a5f 0%, #152b48 55%, #102038 100%);
  color: #fff; padding: 56px 7%; display: flex; flex-direction: column; justify-content: center;
  gap: 22px; position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07); right: -180px; bottom: -180px;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02);
}
.login-logo { display: flex; align-items: center; gap: 16px; }
.login-logo .mark {
  width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; border: 1px solid rgba(255,255,255,.2);
}
.login-logo h1 { margin: 0; font-size: 24px; letter-spacing: .3px; }
.login-logo p { margin: 2px 0 0; color: #b9c9de; font-size: 13px; }
.login-brand .tagline { font-size: 18px; font-weight: 600; max-width: 460px; }
.login-brand .meta { color: #b9c9de; line-height: 1.9; max-width: 480px; font-size: 14px; }
.login-brand .meta p { margin: 0; }
.login-side { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 25px; margin: 0 0 6px; color: var(--primary); }
.login-card > p { color: var(--muted); margin: 0 0 28px; }
.login-card label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 6px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.password-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 6px; }
.login-card .btn-primary { width: 100%; margin-top: 24px; height: 44px; }
.login-hint { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: linear-gradient(180deg, #1e3a5f, #172f4d 55%, #142a45);
  color: #dce6f2; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30;
}
.sidebar-head { display: flex; align-items: center; gap: 12px; padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-head .mark { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; }
.sidebar-head strong { display: block; color: #fff; font-size: 14px; letter-spacing: .4px; }
.sidebar-head small { display: block; color: #a9bdd4; font-size: 11px; }
.sidebar nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 2px 0; border-radius: 8px;
  color: #c8d6e6; text-decoration: none; font-size: 13.5px; transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; }
.nav-section { margin: 22px 12px 8px; font-size: 10.5px; letter-spacing: 1.4px; color: #8fa6c0; font-weight: 700; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #22a06b; color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who strong { display: block; color: #fff; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who small { display: block; color: #a9bdd4; font-size: 11px; }
.logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 20px 18px; background: none; border: 0; color: #c8d6e6; font-size: 13px; }
.logout:hover { color: #fff; }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; padding: 30px 34px 60px; }
.content { max-width: 1120px; margin: 0 auto; }
.mobile-toggle.btn { display: none; }

/* ---------- Typography / layout helpers ---------- */
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 25px; line-height: 1.2; margin: 0; color: var(--text); }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.section-title { font-size: 17px; font-weight: 700; margin: 30px 0 14px; color: var(--text); }
.section-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0 14px; }
.section-row .section-title { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 12.5px; letter-spacing: .7px; text-transform: uppercase; color: #334155; }
.card-body { padding: 18px; }
.stat-card { padding: 18px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-value { font-size: 27px; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { color: var(--muted); font-size: 12.5px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13px; font-weight: 600; transition: .15s; text-decoration: none; }
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: #fef2f2; border-color: #fecaca; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-icon { padding: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 700; color: #334155; }
.field .req { color: var(--red); }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d5dbe3; border-radius: 8px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,.1); }
textarea { resize: vertical; min-height: 90px; }
select[multiple] { min-height: 130px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
input[type="color"] { padding: 3px; height: 40px; }
.form-section { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--primary); margin: 24px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.filter-panel { padding: 18px; margin-bottom: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.error { color: var(--red); font-size: 12px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 11.5px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.plenamente { background: #dcfce7; color: #15803d; }
.badge.satisfatoriamente { background: #dbeafe; color: #1d4ed8; }
.badge.parcialmente { background: #fef3c7; color: #b45309; }
.badge.insatisfatoriamente { background: #fee2e2; color: #b91c1c; }
.badge.nao_efetivada { background: #f1f5f9; color: #475569; }
.badge.axis-pensamento { background: #e0e7ff; color: #4338ca; }
.badge.axis-mundo { background: #d1fae5; color: #047857; }
.badge.axis-cultura { background: #f3e8ff; color: #7e22ce; }
.badge.active { background: #dcfce7; color: #15803d; }
.badge.inactive { background: #f1f5f9; color: #64748b; }
.badge.role { background: var(--primary-soft); color: var(--primary); }
.badge.year { background: #f1f5f9; color: #475569; }
.badge.code { background: var(--primary); color: #fff; letter-spacing: .4px; }

/* ---------- Lists / tables ---------- */
.record-card { padding: 16px 18px; display: grid; grid-template-columns: 20px 1fr auto; gap: 14px; align-items: start; }
.record-card .body { min-width: 0; }
.record-card .desc { margin: 8px 0; font-size: 13px; color: #334155; }
.record-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.record-card .obs { margin-top: 8px; font-size: 12px; color: #475569; background: #f8fafc; border-left: 3px solid #cbd5e1; padding: 7px 10px; }
.record-card .actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); background: #fafbfc; white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:hover { background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }
.skill-card { padding: 16px; display: grid; gap: 10px; align-content: start; }
.skill-card .code { font-weight: 800; color: var(--primary); font-size: 13px; letter-spacing: .4px; }
.skill-card .desc { color: #334155; font-size: 13px; }
.axiscard { padding: 18px; border-radius: 12px; border: 1px solid; min-height: 210px; }
.axiscard.blue { background: #eff6ff; border-color: #bfdbfe; }
.axiscard.green { background: #f0fdf4; border-color: #bbf7d0; }
.axiscard.purple { background: #faf5ff; border-color: #e9d5ff; }
.axiscard h3 { margin: 12px 0 8px; font-size: 15px; }
.axiscard p { margin: 0; font-size: 12.5px; color: #475569; }
.quick-btn { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text); }
.quick-btn:hover { border-color: var(--primary); color: var(--primary); background: #f8fafc; }
.quick-btn svg { color: var(--primary); }
details.year { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
details.year summary { padding: 14px 16px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; list-style: none; }
details.year summary::-webkit-details-marker { display: none; }
details.year[open] summary { border-bottom: 1px solid var(--border); background: #fafbfc; }
.year-list { padding: 12px 16px; display: grid; gap: 10px; }
.year-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: start; font-size: 12.5px; }
.year-item code { color: var(--primary); font-weight: 700; }

/* ---------- Charts ---------- */
.chart-body { padding: 16px 18px; }
.pie-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.legend { display: grid; gap: 9px; font-size: 12px; color: #475569; }
.legend span.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 8px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; margin: 11px 0; font-size: 12px; }
.bar-row .label { color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 13px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.bar-row .value { text-align: right; font-weight: 700; color: var(--text); }

/* ---------- Calendar ---------- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-day { min-height: 62px; border-radius: 8px; padding: 6px; border: 1px solid transparent; }
.cal-day.has-event { background: #f1f5f9; }
.cal-day.today { background: var(--primary); color: #fff; }
.cal-day .num { font-size: 12px; font-weight: 600; text-align: center; display: block; }
.cal-event { font-size: 9.5px; padding: 2px 4px; border-radius: 4px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.holiday { background: #fee2e2; color: #b91c1c; }
.cal-event.school { background: #dbeafe; color: #1d4ed8; }
.cal-event.recess { background: #fef3c7; color: #b45309; }
.event-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.event-item:last-child { border: 0; }
.event-date { font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 3px 7px; border-radius: 6px; font-size: 11px; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.toast { position: fixed; right: 24px; bottom: 24px; background: #1f2937; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 90; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 13px; }
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Print ---------- */
@media print {
  .sidebar, .btn, .logout, .page-head .row, .no-print { display: none !important; }
  .main { margin: 0; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { padding: 36px 24px; }
  .login-brand .meta { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 18px 14px 50px; }
  .mobile-toggle.btn { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 40; }
  .mobile-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .record-card { grid-template-columns: 20px 1fr; }
  .record-card .actions { grid-column: 2; justify-content: flex-start; }
  .bar-row { grid-template-columns: 90px 1fr 30px; }
}
