:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #0b5f73;
    --primary-dark: #083f4d;
    --danger: #b42318;
    --success-bg: #e9f8ef;
    --success-text: #137333;
    --warning-bg: #fff7e6;
    --warning-text: #946200;
    --pending-bg: #f2f4f7;
    --pending-text: #475467;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 260px; }
.brand img { height: 52px; max-width: 180px; object-fit: contain; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nav a { padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 600; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 26px auto 40px; }
.page-title { margin-bottom: 18px; }
.page-title h1 { margin: 0 0 6px; font-size: 28px; }
.page-title p { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
.card h2 { margin: 0 0 16px; font-size: 20px; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.two.wide-left { grid-template-columns: .9fr 1.3fr; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 36px; margin: 8px 0; }
.stat small { color: var(--muted); }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 700; cursor: pointer; min-height: 40px; }
.button:hover, button.button:hover { text-decoration: none; border-color: #cbd5e1; }
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.danger { color: var(--danger); border-color: #ffd0cc; }
.button.small { padding: 7px 10px; min-height: 32px; font-size: 12px; }
.button.large { font-size: 16px; padding: 13px 18px; }
.button.full { width: 100%; }
.actions.vertical { display: grid; gap: 10px; }
.form-grid { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-weight: 700; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; color: var(--text); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td small { color: var(--muted); }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.inline button { vertical-align: middle; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge.done { background: var(--success-bg); color: var(--success-text); }
.badge.progress { background: var(--warning-bg); color: var(--warning-text); }
.badge.pending { background: var(--pending-bg); color: var(--pending-text); }
.flash { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-weight: 700; }
.flash.success { background: var(--success-bg); color: var(--success-text); }
.flash.error { background: #fff1f0; color: var(--danger); }
.notice { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.list.compact { display: grid; gap: 10px; }
.list-row { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.list-row span, .list-row small { color: var(--muted); }
.cards-list { display: grid; gap: 14px; }
.training-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: #fff; }
.training-card h3 { margin: 10px 0 6px; font-size: 19px; }
.training-card p { margin: 0 0 8px; color: var(--muted); }
.training-view { display: grid; gap: 18px; }
.training-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); }
.video { width: 100%; max-height: 640px; background: #000; border-radius: 14px; }
.pdf-frame { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.download-box { border: 1px dashed #cbd5e1; border-radius: 16px; padding: 24px; background: #f8fafc; }
.complete-form { padding-top: 10px; border-top: 1px solid var(--line); }
.filter-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-form label { min-width: min(420px, 100%); }
.login-bg { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #e5f3f6, #f5f7fb 42%, #eef2f7 100%); }
.login-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 18px 60px rgba(15, 23, 42, .10); }
.install-card { width: min(720px, 100%); }
.login-logo { width: 220px; max-height: 90px; object-fit: contain; display: block; margin: 0 auto 18px; }
.login-card h1 { margin: 0 0 8px; text-align: center; font-size: 24px; }
.login-card p { text-align: center; }
.footer { text-align: center; color: var(--muted); padding: 26px 12px 36px; font-size: 13px; }
@media (max-width: 900px) {
    .topbar { position: static; flex-direction: column; align-items: stretch; padding: 14px 16px; }
    .brand { min-width: 0; }
    .nav { justify-content: flex-start; }
    .grid.stats, .grid.two, .grid.two.wide-left { grid-template-columns: 1fr; }
    .training-card { align-items: stretch; flex-direction: column; }
    .training-card .button { width: 100%; }
    .page-title h1 { font-size: 24px; }
}
@media (max-width: 560px) {
    .container { width: calc(100% - 22px); margin-top: 16px; }
    .card { padding: 16px; border-radius: 14px; }
    .brand img { height: 44px; max-width: 150px; }
    .nav a { padding: 8px 9px; }
    th, td { padding: 10px 8px; }
}
