/* GesRH Angola - v4.0 - Estilos Globais */
:root {
  --primary: #1a3a5c;
  --primary-light: #2563a8;
  --primary-dark: #0f2238;
  --accent: #e07b2a;
  --accent-light: #f59e0b;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --purple: #7c3aed;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --text: #1e293b;
  --text2: #64748b;
  --text3: #94a3b8;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
a { text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── LOGIN ─────────────────────────────────────────── */
#login-screen { position: fixed; inset: 0; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.login-card { background: #fff; border-radius: var(--radius-xl); padding: 48px 40px; width: 440px; box-shadow: var(--shadow-lg); animation: fadeInUp .4s ease; }
.login-logo { text-align: center; margin-bottom: 32px; }
.logo-icon { width: 76px; height: 76px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 8px 24px rgba(26,58,92,.3); }
.logo-icon i { font-size: 34px; color: #fff; }
.login-logo h1 { font-size: 26px; font-weight: 700; color: var(--primary); }
.login-logo p { font-size: 13px; color: var(--text2); margin-top: 4px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.input-wrap { position: relative; }
.input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 14px; }
.input-wrap input { width: 100%; padding: 11px 12px 11px 36px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; transition: border-color .2s, box-shadow .2s; background: var(--surface2); }
.input-wrap input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,168,.1); background: #fff; }
.btn-login { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border-radius: var(--radius); font-size: 15px; font-weight: 600; letter-spacing: .3px; transition: all .2s; margin-top: 8px; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,58,92,.3); }
.login-demo { margin-top: 24px; padding: 16px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); }
.login-demo h4 { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.demo-btn { padding: 7px 8px; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; color: var(--text); cursor: pointer; text-align: left; transition: all .15s; }
.demo-btn:hover { border-color: var(--primary-light); background: rgba(37,99,168,.05); }
.demo-btn strong { display: block; color: var(--primary); font-size: 10px; font-weight: 700; }

/* ── APP SHELL ──────────────────────────────────────── */
#app { display: none; height: 100vh; overflow: hidden; flex-direction: column; }
#app.active { display: flex; }

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar { height: 60px; background: var(--primary); display: flex; align-items: center; padding: 0 20px; gap: 16px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.topbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-icon { width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.brand-icon i { font-size: 18px; }
.topbar-brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.topbar-brand span { font-size: 11px; opacity: .7; font-weight: 400; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn { width: 36px; height: 36px; background: rgba(255,255,255,.1); border: none; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; position: relative; }
.topbar-btn:hover { background: rgba(255,255,255,.2); }
.notif-badge { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; border: 2px solid var(--primary); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; background: rgba(255,255,255,.1); border-radius: 20px; cursor: pointer; transition: background .2s; }
.user-chip:hover { background: rgba(255,255,255,.2); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.user-chip-info { color: #fff; }
.user-chip-info .name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-chip-info .role { font-size: 10px; opacity: .7; }

/* ── LAYOUT ─────────────────────────────────────────── */
.layout { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 240px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; transition: width .3s; }
.nav-section { padding: 16px 12px 8px; }
.nav-section-title { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .8px; padding: 0 8px; margin-bottom: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); cursor: pointer; transition: all .15s; color: var(--text2); font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.nav-item:hover { background: rgba(37,99,168,.06); color: var(--primary); }
.nav-item.active { background: rgba(37,99,168,.1); color: var(--primary); font-weight: 600; }
.nav-item i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item .nbadge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }
.logout-btn { color: var(--danger) !important; }
.logout-btn:hover { background: rgba(220,38,38,.06) !important; }
.main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.page { display: none; flex: 1; flex-direction: column; padding: 24px; gap: 20px; }
.page.active { display: flex; }

/* ── PAGE HEADER ────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-title h2 { font-size: 22px; font-weight: 700; color: var(--primary); }
.page-title p { font-size: 13px; color: var(--text2); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: all .15s; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #0e7490; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }

/* ── CARDS ──────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }
.card-hover { transition: all .2s; cursor: pointer; }
.card-hover:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ── STATS ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon i { font-size: 22px; }
.stat-icon.blue { background: rgba(37,99,168,.1); color: var(--primary-light); }
.stat-icon.green { background: rgba(22,163,74,.1); color: var(--success); }
.stat-icon.orange { background: rgba(224,123,42,.1); color: var(--accent); }
.stat-icon.red { background: rgba(220,38,38,.1); color: var(--danger); }
.stat-icon.teal { background: rgba(8,145,178,.1); color: var(--info); }
.stat-icon.purple { background: rgba(124,58,237,.1); color: var(--purple); }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text2); margin-top: 3px; }
.stat-change { font-size: 12px; font-weight: 600; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── TABLE ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { padding: 10px 14px; background: var(--surface2); font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:hover { background: rgba(37,99,168,.02); }
tbody td { padding: 11px 14px; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ── BADGES ─────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-success { background: rgba(22,163,74,.1); color: var(--success); }
.badge-danger { background: rgba(220,38,38,.1); color: var(--danger); }
.badge-warning { background: rgba(217,119,6,.1); color: var(--warning); }
.badge-info { background: rgba(8,145,178,.1); color: var(--info); }
.badge-primary { background: rgba(37,99,168,.1); color: var(--primary-light); }
.badge-gray { background: rgba(100,116,139,.1); color: var(--text2); }
.badge-purple { background: rgba(124,58,237,.1); color: var(--purple); }
.badge-orange { background: rgba(224,123,42,.1); color: var(--accent); }

/* ── FORM ───────────────────────────────────────────── */
.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.fg { display: flex; flex-direction: column; gap: 5px; }
.fg label { font-size: 12px; font-weight: 600; color: var(--text2); }
.fg input, .fg select, .fg textarea { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 13px; background: var(--surface); transition: border-color .2s, box-shadow .2s; color: var(--text); }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,168,.08); }
.fg textarea { resize: vertical; min-height: 80px; }
.fg input[readonly], .fg select[disabled] { background: var(--surface2); color: var(--text2); }

/* ── MODAL ──────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-xl); width: 100%; max-width: 680px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slideIn .25s ease; }
.modal.modal-lg { max-width: 860px; }
.modal.modal-xl { max-width: 1040px; }
.modal.modal-sm { max-width: 480px; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--primary); }
.modal-close { width: 32px; height: 32px; background: var(--surface2); border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); border: none; transition: all .15s; flex-shrink: 0; }
.modal-close:hover { background: var(--border); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface2); flex-shrink: 0; }

/* ── TABS ───────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); width: fit-content; flex-wrap: wrap; }
.tab-btn { padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text2); cursor: pointer; border: none; background: none; transition: all .15s; white-space: nowrap; }
.tab-btn.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

/* ── ALERT ──────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; display: flex; align-items: flex-start; gap: 10px; border-left: 4px solid; }
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-info { background: rgba(8,145,178,.08); border-color: var(--info); color: #0e6980; }
.alert-success { background: rgba(22,163,74,.08); border-color: var(--success); color: #166534; }
.alert-warning { background: rgba(217,119,6,.08); border-color: var(--warning); color: #92400e; }
.alert-danger { background: rgba(220,38,38,.08); border-color: var(--danger); color: #991b1b; }

/* ── TIMELINE ───────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 20px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1; font-size: 13px; }
.timeline-dot.blue { background: rgba(37,99,168,.1); color: var(--primary-light); border: 2px solid rgba(37,99,168,.2); }
.timeline-dot.green { background: rgba(22,163,74,.1); color: var(--success); border: 2px solid rgba(22,163,74,.2); }
.timeline-dot.orange { background: rgba(224,123,42,.1); color: var(--accent); border: 2px solid rgba(224,123,42,.2); }
.timeline-dot.red { background: rgba(220,38,38,.1); color: var(--danger); border: 2px solid rgba(220,38,38,.2); }
.timeline-dot.gray { background: var(--surface2); color: var(--text3); border: 2px solid var(--border); }
.timeline-dot.purple { background: rgba(124,58,237,.1); color: var(--purple); border: 2px solid rgba(124,58,237,.2); }
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-content h4 { font-size: 13.5px; font-weight: 600; color: var(--text); }
.timeline-content p { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.timeline-content .time { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── PROCESSO STEPS ─────────────────────────────────── */
.proc-steps { display: flex; gap: 4px; margin: 12px 0; }
.proc-step { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.proc-step.done { background: var(--success); }
.proc-step.active { background: var(--primary-light); }
.proc-step.pending { background: var(--border); }
.proc-step.skipped { background: var(--warning); }

/* ── MISC ───────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); min-width: 260px; }
.search-bar i { color: var(--text3); font-size: 14px; }
.search-bar input { border: none; background: none; font-size: 13px; color: var(--text); flex: 1; min-width: 0; }
.search-bar input::placeholder { color: var(--text3); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 72px; height: 72px; font-size: 28px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; color: var(--text3); }
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; text-align: center; max-width: 300px; }
.proc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; transition: all .2s; cursor: pointer; }
.proc-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 13px; animation: slideInRight .3s ease; min-width: 280px; max-width: 360px; pointer-events: auto; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }
.toast i { font-size: 16px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text3); }
.loading i { font-size: 24px; animation: spin 1s linear infinite; margin-right: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chart-wrap { position: relative; height: 260px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 12px; } .text-muted { color: var(--text2); } .text-danger { color: var(--danger); }
.text-success { color: var(--success); } .text-warning { color: var(--warning); } .fw-bold { font-weight: 700; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.stars { display: flex; gap: 2px; }
.star { color: var(--accent-light); font-size: 15px; }
.star.empty { color: var(--border); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; color: var(--text2); }

/* ── DASHBOARD WIDGETS ──────────────────────────────── */
.dash-alert-bar { background: linear-gradient(135deg, #fff7ed, #fffbeb); border: 1px solid #fde68a; border-left: 4px solid var(--warning); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #92400e; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.activity-dot.blue { background: var(--primary-light); }
.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--accent); }
.activity-dot.red { background: var(--danger); }

/* ── FUNCIONARIO CARD ───────────────────────────────── */
.func-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all .2s; }
.func-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.func-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.func-card-info { flex: 1; min-width: 0; }
.func-card-info h3 { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.func-card-info p { font-size: 12px; color: var(--text2); margin-top: 2px; }
.func-card-meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── FERIAS CALENDAR ────────────────────────────────── */
.cal-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); margin-bottom: 8px; }
.cal-item:last-child { margin-bottom: 0; }
.cal-days { width: 48px; height: 48px; background: var(--primary); color: #fff; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.cal-days .num { font-size: 20px; font-weight: 700; line-height: 1; }
.cal-days .label { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; opacity: .8; }

/* ── AVALIACAO ──────────────────────────────────────── */
.rating-wrap { display: flex; gap: 8px; }
.rating-star { font-size: 28px; cursor: pointer; color: var(--border2); transition: color .15s; }
.rating-star.active { color: var(--accent-light); }
.rating-star:hover { color: var(--accent-light); }
.eval-criteria { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eval-criteria-item { padding: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); }
.eval-criteria-item label { font-size: 12px; font-weight: 600; color: var(--text2); display: block; margin-bottom: 8px; }

/* ── LGT REFERENCE ──────────────────────────────────── */
.lgt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.lgt-card-header { padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.lgt-card-header h3 { font-size: 14px; font-weight: 700; }
.lgt-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.lgt-item:last-child { border-bottom: none; }
.lgt-item .lgt-art { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }

/* ── DRAWER (Perfil lateral) ────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 900; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 380px; background: var(--surface); box-shadow: var(--shadow-lg); z-index: 950; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 32px 24px; width: 100%; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .drawer { width: 100%; }
}

/* ── PRINT ──────────────────────────────────────────── */
@media print {
  .topbar, .sidebar, .header-actions, .btn, .modal-overlay { display: none !important; }
  .page { display: block !important; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
