:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar-bg); color: #fff; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-header { padding: 1.25rem; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid #334155; }
.nav-item { display: block; padding: .85rem 1.25rem; color: #cbd5e1; text-decoration: none; transition: background .2s; }
.nav-item:hover, .nav-item.active { background: var(--sidebar-hover); color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--card); padding: .75rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.topbar-title { font-size: 1.1rem; font-weight: 600; }
.topbar-user { color: var(--muted); font-size: .875rem; margin-right: 1rem; text-decoration: none; }
.topbar-user:hover { color: var(--primary); }
.content { padding: 1.5rem; flex: 1; }
.footer { padding: 1rem 1.5rem; text-align: center; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--border); background: var(--card); }

.card { background: var(--card); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.card-header h2 { font-size: 1.1rem; }
.card-body { padding: 1.25rem; }

.btn { display: inline-block; padding: .55rem 1rem; border: none; border-radius: 6px; cursor: pointer; font-size: .875rem; text-decoration: none; transition: all .2s; line-height: 1.4; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .4rem; font-size: .875rem; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 6px; font-size: .9rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { margin-top: 1.5rem; display: flex; gap: .5rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 600; color: var(--muted); white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }

.tag { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 500; }
.tag-trial { background: #fef3c7; color: #92400e; }
.tag-probation { background: #dbeafe; color: #1e40af; }
.tag-formal { background: #dcfce7; color: #166534; }
.tag-resigned { background: #f1f5f9; color: #64748b; }
.tag-warehouse { background: #e0e7ff; color: #3730a3; }
.tag-warning { background: #fef3c7; color: #92400e; }

.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 6px; font-size: .875rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; padding: 1rem; }
.pagination-info { color: var(--muted); font-size: .875rem; }

.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .875rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.asset-check-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: .5rem; }
.asset-check-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; }
.asset-check-item:hover { background: #f8fafc; }

.salary-result { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 1rem; margin-top: 1rem; }
.salary-row { display: flex; justify-content: space-between; padding: .25rem 0; font-size: .875rem; }
.salary-total { font-size: 1.25rem; font-weight: 700; color: #166534; margin-top: .5rem; display: flex; justify-content: space-between; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-box { background: var(--card); padding: 2.5rem; border-radius: 12px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }

.info-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; font-size: .875rem; }
.info-box p { margin-bottom: .25rem; }

@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
}
