* { box-sizing: border-box; }
body.admin-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #17202a;
}
a { color: inherit; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #dde3ea;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar nav { display: flex; gap: 10px; flex-wrap: wrap; }
.container { width: min(1200px, calc(100% - 32px)); margin: 24px auto; }
.container.narrow { width: min(820px, calc(100% - 32px)); }
.admin-card, .panel, .stat-card {
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(30, 42, 60, 0.06);
}
.admin-card { width: min(460px, calc(100% - 32px)); margin: 80px auto; padding: 28px; }
.panel { padding: 24px; margin-bottom: 24px; }
.small-card h1 { margin-top: 0; }
.muted { color: #6b7785; }
.tiny { font-size: 13px; color: #6b7785; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    padding: 10px 14px;
    background: #ffffff;
    color: #17202a;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}
.btn.primary { background: #17202a; color: #ffffff; border-color: #17202a; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: 13px; }
.form-grid { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
}
textarea { resize: vertical; }
.checkline { display: flex; align-items: center; gap: 8px; }
.checkline input { width: auto; }
.type-section {
    padding: 18px;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    background: #fafbfc;
}
.type-section h2 { margin-top: 0; font-size: 18px; }
.hidden { display: none !important; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert-success { background: #e8f7ee; border: 1px solid #bde7cc; }
.alert-error { background: #fdecec; border: 1px solid #f6c1c1; }
.alert-info { background: #edf5ff; border: 1px solid #c9ddff; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; }
.data-table th { background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6b7785; }
.copy-input { min-width: 260px; font-size: 13px; background: #fafbfc; }
.copy-input.wide { max-width: 620px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf0f4; font-size: 12px; font-weight: 700; }
.ok { color: #18864b; font-weight: 700; }
.ko { color: #b42318; font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.qr-box { display: grid; justify-items: center; gap: 12px; }
#qrcode { padding: 12px; background: #ffffff; border: 1px solid #dde3ea; border-radius: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 18px; }
.stat-card span { display: block; color: #6b7785; font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 32px; }
.grid-2-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.line-stat { display: flex; justify-content: space-between; border-bottom: 1px solid #edf0f4; padding: 9px 0; }
.mini-bar-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f4; overflow: hidden; }
.mini-bar-row em { position: absolute; left: 0; bottom: 0; height: 3px; background: #17202a; border-radius: 99px; }
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
    .topbar, .split { display: block; }
    .topbar nav { margin-top: 12px; }
    .grid-2, .grid-2-panels, .stats-grid { grid-template-columns: 1fr; }
}
