.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 16px; }
.stat-card { background: #fff; border-radius: 12px; border: 1px solid #ecedef; padding: 14px 16px; }
.stat-card .k { font-size: 12px; color: #6b7280; }
.stat-card .v { font-size: 22px; font-weight: 700; margin-top: 4px; color: #111827; }
.admin { padding: 0; overflow-y: auto; }
.card-section { background: #fff; border-top: 1px solid #ecedef; padding: 16px 20px; }
.card-section:first-of-type { border-top: none; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #1f2937; }
.actions-row { display: flex; gap: 8px; align-items: center; }
.csv-hint { font-size: 12px; color: #6b7280; margin: 0 0 10px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f1f2f5; white-space: nowrap; }
.data-table th { background: #fafbfc; color: #374151; font-weight: 600; }
.data-table tr:hover td { background: #fafbfc; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; }
.tag.role-admin { background: #fef3c7; color: #92400e; }
.tag.role-user { background: #eef2ff; color: #4338ca; }
.tag.disabled { background: #fee2e2; color: #991b1b; }
.tag.active { background: #dcfce7; color: #166534; }
.btn.small { padding: 4px 8px; font-size: 12px; }
.user-box .btn { padding: 4px 10px; font-size: 12px; }
.dlg { width: min(640px, 92vw); padding: 0; border: none; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.dlg::backdrop { background: rgba(15,18,30,.45); }
.dlg-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f1f2f5; }
.dlg-title-static { font-weight: 600; font-size: 15px; }
.dlg-body { padding: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid2 label.full { grid-column: 1 / -1; }
.grid2 input, .grid2 select { width: 100%; padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; }
.dlg-body label { display: block; font-size: 12px; color: #374151; }
.dlg-body input, .dlg-body select, .dlg-body textarea { margin-top: 4px; width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; font-family: inherit; }
.dlg-body textarea { resize: vertical; min-height: 60px; }
.dlg-body input:focus, .dlg-body select:focus, .dlg-body textarea:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.msg { color: #b91c1c; font-size: 12px; grid-column: 1/-1; min-height: 16px; margin: 0; }
.msg.ok { color: #047857; }
.tbl-link { color: #4f46e5; cursor: pointer; background: none; border: none; padding: 0; font: inherit; }
.tbl-link:hover { text-decoration: underline; }
.ops-cell { display: flex; gap: 6px; flex-wrap: wrap; }
