* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, Arial, sans-serif; background: #f3f5f9; color: #1f2937; }
header { background: #1e3a5f; color: #fff; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
header h1 { margin: 0; font-size: 20px; }
header a, header button { color: #fff; text-decoration: none; background: rgba(255,255,255,.15); border: 0; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; margin-left: 8px; }
header a:hover, header button:hover { background: rgba(255,255,255,.28); }
main { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card-link { display: block; background: #fff; border-radius: 12px; padding: 32px 24px; text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(0,0,0,.08); text-align: center; transition: transform .1s, box-shadow .1s; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.card-link .ico { font-size: 40px; }
.card-link h2 { margin: 10px 0 4px; font-size: 20px; color: #1e3a5f; }
.card-link p { margin: 0; color: #6b7280; font-size: 14px; }
.panel { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 18px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; color: #1e3a5f; }
.grid8 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
label { font-size: 12px; color: #6b7280; display: block; margin-bottom: 3px; }
input, select { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; background: #fff; }
input:focus, select:focus { outline: 2px solid #93c5fd; border-color: #3b82f6; }
button.btn { background: #2563eb; color: #fff; border: 0; padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; }
button.btn:hover { background: #1d4ed8; }
button.btn.gray { background: #64748b; }
button.btn.green { background: #16a34a; }
button.btn.red { background: #dc2626; }
button.btn.sm { padding: 5px 10px; font-size: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search], .toolbar input[type=text] { max-width: 280px; }
.toolbar select { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th { background: #e8eef7; text-align: left; padding: 9px 10px; position: sticky; top: 0; white-space: nowrap; }
td { padding: 6px 10px; border-bottom: 1px solid #eef1f6; white-space: nowrap; }
td input { padding: 5px 6px; min-width: 90px; }
tr:hover td { background: #f8fafc; }
.num { text-align: right; }
.muted { color: #6b7280; font-size: 13px; }
.msg { padding: 10px 14px; border-radius: 6px; margin: 10px 0; font-size: 14px; }
.msg.ok { background: #dcfce7; color: #166534; }
.msg.err { background: #fee2e2; color: #991b1b; }
.msg.warn { background: #fef3c7; color: #92400e; }
.login-box { max-width: 360px; margin: 12vh auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.login-box h1 { margin: 0 0 18px; font-size: 22px; color: #1e3a5f; text-align: center; }
.login-box .row { margin-bottom: 14px; }
.line-row { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
