/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Malgun Gothic', sans-serif; background: #f0f2f5; color: #333; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login Page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-box { background: #fff; border-radius: 12px; padding: 40px 32px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); text-align: center; }
.login-box h1 { font-size: 28px; color: #1e3a5f; margin-bottom: 4px; }
.login-subtitle { color: #666; margin-bottom: 24px; font-size: 14px; }

/* Alert */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group small { display: block; margin-top: 4px; color: #888; font-size: 12px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-container { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; text-decoration: none; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; text-decoration: none; }
.btn-full { width: 100%; }

/* Layout */
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px; background: #1e293b; color: #fff; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid #334155; }
.sidebar-header h2 { font-size: 20px; font-weight: 700; }
.sidebar-subtitle { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  color: #cbd5e1; font-size: 14px; transition: all 0.2s;
}
.nav-item:hover { background: #334155; color: #fff; text-decoration: none; }
.nav-item.active { background: #2563eb; color: #fff; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #334155; }
.user-info { font-size: 13px; color: #94a3b8; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.badge { background: #2563eb; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.logout-btn { color: #94a3b8; font-size: 13px; }
.logout-btn:hover { color: #fff; }

/* Main Content */
.main-content { margin-left: 240px; flex: 1; padding: 24px 32px; min-height: 100vh; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; color: #1e293b; }

/* Summary Cards */
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-left: 4px solid; }
.card-total { border-left-color: #2563eb; }
.card-contracting { border-left-color: #f59e0b; }
.card-working { border-left-color: #10b981; }
.card-done { border-left-color: #6b7280; }
.card-label { font-size: 13px; color: #6b7280; margin-bottom: 4px; }
.card-value { font-size: 28px; font-weight: 700; color: #1e293b; }

/* Tables */
.table-container { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.table-container h2 { font-size: 16px; margin-bottom: 16px; color: #1e293b; }
table { width: 100%; border-collapse: collapse; }
thead th { background: #f8fafc; padding: 10px 12px; text-align: left; font-size: 13px; color: #64748b; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
tbody tr:hover { background: #f8fafc; }
.text-right { text-align: right; min-width: 110px; }
.empty-row { text-align: center; color: #94a3b8; padding: 32px !important; }

/* Status Badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-contracting { background: #fef3c7; color: #92400e; }
.status-working { background: #d1fae5; color: #065f46; }
.status-done { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fef2f2; color: #dc2626; }

/* Type Badge (종류) */
.type-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.type-repair { background: #f1f5f9; color: #475569; }
.type-new { background: #dbeafe; color: #1d4ed8; }

/* Toggle */
.toggle { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.toggle.on { background: #d1fae5; color: #065f46; }
.toggle.off { background: #f1f5f9; color: #94a3b8; }

/* Filter Bar */
.filter-bar { margin-bottom: 16px; }
.filter-bar select { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; min-width: 200px; }

/* Search Bar */
.search-bar { display: flex; gap: 8px; align-items: center; }
.search-bar select { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; min-width: 120px; }
.search-bar input[type="text"] { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; width: 200px; }
.search-bar input[type="text"]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Summary Inline */
.summary-inline { background: #fff; padding: 12px 20px; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); font-size: 14px; }
.highlight { color: #2563eb; font-weight: 700; font-size: 16px; }

/* Detail */
.detail-container { max-width: 800px; }
.detail-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.detail-header h2 { font-size: 20px; color: #1e293b; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-item { display: flex; flex-direction: column; }
.detail-label { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.detail-value { font-size: 14px; font-weight: 500; }
.detail-total { color: #2563eb; font-size: 16px; font-weight: 700; }
.detail-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.detail-section h3 { font-size: 14px; color: #64748b; margin-bottom: 8px; }
.detail-section p { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.detail-actions { margin-top: 24px; padding-top: 20px; border-top: 2px solid #e2e8f0; display: flex; gap: 12px; }
.file-list { list-style: none; padding: 0; }
.file-list li { padding: 6px 0; }
.file-list a { font-size: 14px; }

/* Rate Badge */
.rate-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.rate-full { background: #d1fae5; color: #065f46; }
.rate-mid { background: #fef3c7; color: #92400e; }
.rate-low { background: #fee2e2; color: #dc2626; }

/* Approval Inline Detail */
.approval-row { cursor: pointer; transition: background 0.15s; }
.approval-row:hover { background: #eef2ff !important; }
.approval-row.expanded { background: #eef2ff; border-left: 3px solid #2563eb; }

.detail-row td { padding: 0 !important; border-bottom: 2px solid #e2e8f0; }
.inline-detail { background: #f8fafc; }
.inline-detail-inner { padding: 16px 20px; }
.inline-detail-header { margin-bottom: 12px; }
.inline-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: #475569; }
.inline-detail-meta span { white-space: nowrap; }

.inner-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: 12px; border: 1px solid #e2e8f0; }
.inner-table thead th { background: #f1f5f9; padding: 20px 18px; font-size: 13px; color: #475569; border-bottom: 1px solid #e2e8f0; white-space: nowrap; text-align: center; }
.inner-table tbody td { padding: 20px 18px; font-size: 14px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; text-align: center; line-height: 1.8; }
.inner-table tfoot td { padding: 20px 18px; font-size: 14px; background: #f8fafc; border-top: 2px solid #e2e8f0; text-align: center; }
.inner-table .text-right { text-align: right; min-width: 110px; }

.inline-files { margin: 8px 0; font-size: 13px; }
.inline-files a { margin-right: 12px; }
.inline-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; }
.detail-loading { padding: 20px; text-align: center; color: #94a3b8; font-size: 14px; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Item Cards (Approval Form) */
.items-container { border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; background: #f8fafc; }

.item-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 12px; position: relative;
}
.item-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9;
}
.item-num { font-size: 13px; font-weight: 700; color: #2563eb; }

.item-row-line {
  display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.item-field { display: flex; flex-direction: column; flex: 1; min-width: 120px; }
.item-field-wide { flex: 2; min-width: 200px; }
.item-field label {
  font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 4px;
}
.item-field input {
  width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 5px;
  font-size: 13px; background: #fff;
}
.item-field input:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.item-field input[readonly] { background: #f0f7ff; color: #2563eb; font-weight: 600; }

.btn-remove {
  background: #fee2e2; color: #dc2626; border: none; border-radius: 4px;
  width: 28px; height: 28px; font-size: 18px; cursor: pointer; line-height: 1;
}
.btn-remove:hover { background: #fecaca; }

.total-display-input { font-size: 18px !important; font-weight: 700 !important; color: #2563eb !important; background: #f0f7ff !important; }

/* Text Center */
.text-center { text-align: center; }

/* Cost Summary */
.cost-summary { display: flex; gap: 32px; align-items: center; }
.highlight-primary { color: #2563eb; font-weight: 700; font-size: 16px; }

/* Paid Toggle */
.paid-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.paid-toggle {
  padding: 4px 12px; border-radius: 14px; font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.paid-yes { background: #d1fae5; color: #065f46; }
.paid-yes:hover { background: #a7f3d0; }
.paid-no { background: #fee2e2; color: #dc2626; }
.paid-no:hover { background: #fecaca; }
.paid-date { font-size: 11px; color: #64748b; white-space: nowrap; }

/* Log Groups */
.log-group { margin-bottom: 20px; }
.log-group-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid #2563eb;
}
.log-group-header h2 { font-size: 17px; color: #1e293b; margin: 0; }
.log-group-count {
  background: #e0e7ff; color: #3730a3; padding: 2px 10px;
  border-radius: 10px; font-size: 12px; font-weight: 600;
}
.log-group-total { margin-left: auto; font-size: 14px; color: #475569; }
.log-group-total strong { color: #2563eb; font-size: 15px; }
.log-group table { table-layout: fixed; width: 100%; }
.log-group th:nth-child(1), .log-group td:nth-child(1) { width: 45px; text-align: center; }
.log-group th:nth-child(2), .log-group td:nth-child(2) { width: 120px; }
.log-group th:nth-child(3), .log-group td:nth-child(3) { width: 170px; }
.log-group th:nth-child(4), .log-group td:nth-child(4) { width: 130px; }
.log-group th:nth-child(5), .log-group td:nth-child(5) { width: 110px; text-align: right; }
.log-group th:nth-child(6), .log-group td:nth-child(6) { width: 90px; text-align: center; }
.log-group th:nth-child(7), .log-group td:nth-child(7) { width: 90px; text-align: center; }
.log-group th:nth-child(8), .log-group td:nth-child(8) { width: 65px; text-align: center; }
.log-group th:nth-child(9), .log-group td:nth-child(9) { width: 55px; text-align: center; }
.log-group td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-desc { font-size: 13px; color: #64748b; }

/* Bank Balance Table */
.bank-section { margin-bottom: 24px; }
.bank-section h2 { font-size: 16px; margin-bottom: 12px; color: #1e293b; }
.bank-table thead th { text-align: center; }
.bank-table tbody td { text-align: center; }
.bank-table .text-right { text-align: right; }
.bank-name-cell { font-weight: 600; text-align: left !important; white-space: nowrap; }
.bank-value { cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: background 0.15s; }
.bank-value:hover { background: #e0e7ff; }
.bank-current { color: #2563eb; font-weight: 700; }
.bank-note { font-size: 13px; color: #64748b; }
.bank-edit-input {
  width: 120px; padding: 4px 8px; border: 2px solid #2563eb; border-radius: 4px;
  font-size: 14px; text-align: right; outline: none;
}
.bank-edit-input[type="text"] { text-align: left; width: 150px; }
.bank-table tfoot td { background: #f8fafc; border-top: 2px solid #e2e8f0; font-size: 14px; }
.bank-table tfoot strong { color: #1e293b; }

/* Deposit Check */
.deposit-check { width: 18px; height: 18px; cursor: pointer; accent-color: #2563eb; }
.btn-excel { background: #10b981; color: #fff; margin-left: auto; }
.btn-excel:hover { background: #059669; text-decoration: none; }

/* Permission Badges */
.perm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500; margin: 1px 2px;
}
.perm-on { background: #e0e7ff; color: #3730a3; }

/* Permission Checkbox Group */
.perm-check-group {
  display: flex; flex-wrap: wrap; gap: 12px; padding: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
}
.perm-check-group .checkbox-label { font-size: 14px; min-width: 120px; }

/* Labor Sub-tabs */
.labor-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; }
.labor-tab {
  padding: 10px 24px; font-size: 14px; font-weight: 600; color: #64748b;
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.labor-tab:hover { color: #1e293b; text-decoration: none; }
.labor-tab.active { color: #2563eb; border-bottom-color: #2563eb; }

/* Attendance Table */
.attendance-table { border-collapse: collapse; table-layout: fixed; }
.attendance-table th, .attendance-table td { padding: 3px 2px; font-size: 12px; text-align: center; border: 1px solid #e2e8f0; height: 22px; }
.attendance-table th.att-fixed, .attendance-table td.att-fixed { background: #fff; white-space: nowrap; text-align: center; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; }
.attendance-table thead th { background: #f8fafc; font-weight: 600; color: #475569; }
.att-name { font-weight: 600; }
.att-resident { font-size: 11px; color: #475569; overflow: hidden; text-overflow: ellipsis; }
.att-bank { font-size: 10px; color: #64748b; }
.att-trade { font-size: 11px; }
.att-day { line-height: 1; }
.att-cell { cursor: pointer; transition: background 0.15s; }
.att-cell:hover { background: #e0e7ff; }
.att-cell span:not(:empty) { font-weight: 600; color: #1d4ed8; }
.att-day, .att-cell { text-align: center !important; }
.att-sun, th.att-sun { background: #fef2f2 !important; color: #dc2626 !important; }
.att-sat, th.att-sat { background: #eff6ff !important; color: #2563eb !important; }
.att-total { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.att-wage { font-size: 12px; text-align: right !important; padding: 5px 8px !important; white-space: nowrap; cursor: pointer; }
.att-wage:hover { background: #e0e7ff; }
.att-wage-total { font-size: 12px; text-align: right !important; padding: 5px 8px !important; color: #2563eb; white-space: nowrap; }
.att-row-top td { border-bottom: none; }
.att-row-bottom td { border-top: 1px dashed #cbd5e1; }
.att-row-top td[rowspan] { border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.att-empty { background: #f8fafc; }
.att-deduct { font-size: 11px; text-align: right !important; padding: 3px 6px !important; white-space: nowrap; color: #dc2626; }
.att-deduct-sum { background: #fef2f2; font-size: 12px; color: #b91c1c; vertical-align: middle; }
.att-net { background: #f0fdf4; font-size: 12px; color: #16a34a; vertical-align: middle; }
.attendance-table thead th.att-total,
.attendance-table thead th.att-wage,
.attendance-table thead th.att-wage-total,
.attendance-table thead th.att-deduct,
.attendance-table thead th.att-deduct-sum,
.attendance-table thead th.att-net { text-align: center !important; }
.attendance-table thead th.att-deduct { background: #fff1f2; color: #991b1b; }
.attendance-table thead th.att-net { background: #f0fdf4; color: #166534; }
.wage-input { width: 80px; padding: 2px 4px; font-size: 12px; text-align: right; border: 1px solid #3b82f6; border-radius: 4px; outline: none; }

/* Responsive */
/* Modal */
.modal-overlay { position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1000;display:flex;align-items:center;justify-content:center; }
.modal-content { background:#fff;border-radius:12px;max-width:900px;width:90%;max-height:80vh;overflow-y:auto;box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.modal-header { display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e5e7eb; }
.modal-header h3 { font-size:16px;color:#1e3a5f; }
.modal-close { background:none;border:none;font-size:24px;cursor:pointer;color:#64748b;padding:0 4px; }
.modal-close:hover { color:#1e3a5f; }
.modal-body { padding:20px; }
.company-link { color:#2563eb;cursor:pointer;text-decoration:underline; }
.company-link:hover { color:#1d4ed8; }

/* Confirmation badge */
.confirm-badge { display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:12px;font-size:12px;font-weight:600;cursor:pointer;border:none;transition:all 0.2s; }
.confirm-badge.confirmed { background:#dcfce7;color:#16a34a;border:1px solid #86efac; }
.confirm-badge.unconfirmed { background:#fef9c3;color:#ca8a04;border:1px solid #fde047; }
.confirm-badge.pending { background:#dbeafe;color:#2563eb;border:1px solid #93c5fd; }
.confirm-badge:hover { opacity:0.8; }

/* Mobile Header */
.mobile-header {
  display: none; position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: #1e293b; color: #fff; z-index: 200;
  align-items: center; padding: 0 16px; gap: 12px;
}
.hamburger-btn {
  background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 4px 8px;
}
.mobile-title { font-size: 16px; font-weight: 700; }
.sidebar-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 150;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%); transition: transform 0.3s ease; z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 60px 12px 16px; }
  .summary-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .summary-cards .card { padding: 12px; }
  .card-value { font-size: 22px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h1 { font-size: 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-container { padding: 16px; }
  .form-actions { flex-wrap: wrap; }
  .table-container { padding: 12px; overflow-x: auto; }
  table { min-width: 600px; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input[type="text"] { width: 100%; }
  .search-bar select { min-width: 100px; }
  .filter-bar select { min-width: 150px; width: 100%; }
  .btn { padding: 8px 14px; font-size: 13px; }
  .detail-container { max-width: 100%; }
  .cost-summary { flex-direction: column; gap: 8px; align-items: flex-start; }
  .summary-inline { padding: 10px 14px; font-size: 13px; }
  .log-group table { min-width: 700px; }
  .inline-detail-meta { flex-direction: column; gap: 4px; }
  .labor-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .labor-tab { padding: 8px 16px; white-space: nowrap; font-size: 13px; }
  .attendance-table { font-size: 11px; }
  .modal-content { width: 95%; max-height: 90vh; }
  .perm-check-group { gap: 8px; }
  .items-container { padding: 10px; }
  .item-row-line { flex-direction: column; gap: 6px; }
  .item-field { min-width: auto; }
  .item-field-wide { min-width: auto; }
}
