.icon { width: 18px; height: 18px; vertical-align: middle; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; min-height: 38px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-primary); font-size: var(--font-sm); font-weight: 500; text-decoration: none; transition: background var(--motion-fast),border-color var(--motion-fast); }
.btn:hover:not(:disabled) { border-color: var(--accent-primary); background: var(--bg-surface); }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-edge); box-shadow: inset 0 1px var(--surface-sheen); }
.btn-primary:hover:not(:disabled) { background: var(--accent-fill-hover); color: var(--on-accent); }
.btn-danger { color: var(--status-error); border-color: var(--status-offline); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn:disabled { color: var(--text-muted); background: var(--bg-inset); border-color: var(--border-subtle); }
.btn[aria-busy='true'] { color: var(--accent-primary); }
.btn-icon { width: 38px; padding: 7px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--border-subtle); border-radius: 3px; font-size: .65rem; font-weight: 600; letter-spacing: .35px; line-height: 1.4; white-space: nowrap; color: var(--text-secondary); background: var(--bg-inset); }
.badge-owner { color: var(--accent-primary); border-color: var(--border-strong); background: var(--accent-wash); box-shadow: inset 2px 0 var(--accent-primary); padding-inline: 9px; }
.badge-admin, .badge-manager { color: var(--accent-secondary); border-color: var(--accent-edge); background: var(--accent-wash); }
.badge-dj { color: var(--text-secondary); border-color: var(--border-strong); }
.badge-success,.badge-ready { color: var(--status-ready); }
.badge-warning,.badge-stale { color: var(--status-stale); }
.badge-degraded { color: var(--status-degraded); }
.badge-offline,.badge-disabled { color: var(--status-offline); }
.badge-error,.badge-locked { color: var(--status-error); border-color: var(--accent-edge); background: var(--accent-wash); }
.badge-unknown { color: var(--status-unknown); }
.status-badge .icon { width: 12px; height: 12px; }
.card { border: 1px solid var(--border-subtle); background: linear-gradient(135deg,var(--surface-sheen),transparent 45%),var(--bg-surface); border-radius: var(--radius-md); padding: 20px; min-width: 0; box-shadow: var(--shadow-soft); }
.card-header,.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.card-header h2,.section-header h2 { font-size: 1.07rem; }
.card-header h2 { display: flex; align-items: center; gap: 10px; }
.card-header .icon { color: var(--accent-primary); }
.card-footer { border-top: 1px solid var(--border-subtle); margin-top: 16px; padding-top: 12px; }
.card-link { font-size: var(--font-xs); text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.metric { display: flex; flex-direction: column; gap: 5px; }
.metric-label { color: var(--text-muted); font-size: var(--font-xs); }
.metric-value { font-size: 1.5rem; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: var(--font-xs); color: var(--text-muted); margin-left: 4px; }
.metric-bar { height: 5px; background: var(--bg-inset); border-radius: 2px; overflow: hidden; }
.metric-fill { height: 100%; background: var(--accent-primary); max-width: 100%; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; }
.field > label { color: var(--text-secondary); font-size: var(--font-xs); font-weight: 600; }
.field-hint { color: var(--text-muted); font-size: var(--font-xs); }
input, select, textarea { min-width: 0; max-width: 100%; min-height: 39px; width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-inset); color: var(--text-primary); padding: 9px 11px; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
input[type='checkbox'] { width: 18px; min-height: 18px; accent-color: var(--accent-fill); }
input[aria-invalid='true'] { border-color: var(--status-error); }
input:disabled, select:disabled { color: var(--text-muted); }
.toolbar { align-items: flex-end; margin-bottom: 20px; }
.toolbar .field { flex: 1; min-width: 120px; }
.toolbar .field:first-child { flex: 2; min-width: 200px; }
.form-error,.error-state { color: var(--status-error); font-size: var(--font-sm); }
.form-error:empty { display: none; }
.error-state { padding: 18px; border: 1px solid var(--status-offline); background: var(--bg-surface); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.empty-state { display: flex; align-items: center; flex-direction: column; text-align: center; justify-content: center; padding: 35px 20px; min-height: 165px; gap: 10px; }
.empty-state > .icon { height: 29px; width: 29px; color: var(--accent-primary); margin-bottom: 3px; }
.empty-state p { color: var(--text-muted); max-width: 420px; font-size: var(--font-sm); }
.table-wrap { width: 100%; overflow: auto; scrollbar-width: thin; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: var(--font-sm); }
th { padding: 13px 14px; text-transform: uppercase; font-size: .63rem; letter-spacing: .6px; color: var(--text-muted); background: var(--bg-inset); font-weight: 600; }
td { padding: 13px 14px; border-top: 1px solid var(--border-subtle); max-width: 300px; overflow-wrap: anywhere; vertical-align: middle; }
tbody tr:hover { background: var(--accent-wash); }
tbody tr:focus-within { background: var(--accent-wash); }
td .btn { min-height: 33px; padding: 6px 10px; font-size: var(--font-xs); }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 17px 0 0; color: var(--text-muted); font-size: var(--font-xs); }
.pagination .field { flex-direction: row; align-items: center; gap: 8px; }
.pagination select { width: 80px; min-height: 34px; padding: 5px 7px; }
.pagination .btn { min-height: 34px; }
.detail-list { display: grid; grid-template-columns: minmax(110px,.8fr) minmax(0,1.2fr); gap: 13px 18px; margin: 0; font-size: var(--font-sm); }
.detail-list dt { color: var(--text-muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 11px; margin-bottom: 17px; border-bottom: 1px solid var(--border-subtle); }
.tabs button { background: transparent; border: 1px solid transparent; padding: 8px 10px; color: var(--text-muted); border-radius: var(--radius-sm); white-space: nowrap; }
.tabs [aria-selected='true'],.tabs .active { background: var(--accent-wash); color: var(--accent-secondary); border-color: var(--accent-edge); box-shadow: inset 0 -2px var(--accent-edge); }
dialog::backdrop { background: var(--backdrop); }
.drawer,.modal { color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-raised); }
.drawer { margin: 0 0 0 auto; width: min(620px,100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px; border-bottom: 1px solid var(--border-strong); background: linear-gradient(110deg,var(--accent-wash),var(--bg-inset)); box-shadow: inset 3px 0 var(--accent-edge); }
.dialog-header h2 { overflow-wrap: anywhere; font-size: 1.35rem; }
.dialog-body { padding: 23px; overflow-wrap: anywhere; }
.modal { width: min(480px,calc(100vw - 30px)); padding: 0; border-radius: var(--radius-lg); max-height: calc(100dvh - 30px); }
.modal .dialog-body { display: flex; flex-direction: column; gap: 18px; }
.modal .actions { padding: 0 23px 23px; }
.danger-panel { border-top: 1px solid var(--accent-edge); padding-top: 20px; margin-top: 8px; }
.danger-panel > h3 { color: var(--accent-secondary); font: 400 1.15rem var(--font-title); }
.toast-region { position: fixed; bottom: 22px; right: 22px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(400px,calc(100vw - 32px)); }
.toast { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-strong); box-shadow: var(--shadow-raised); border-radius: var(--radius-md); padding: 15px; display: flex; gap: 10px; align-items: flex-start; }
.toast button { margin-left: auto; }
.skeleton { display: flex; flex-direction: column; gap: 15px; padding: 20px; min-height: 200px; }
.skeleton-line { height: 28px; background: var(--bg-elevated); border-radius: var(--radius-sm); animation: breathe 1.7s ease-in-out infinite alternate; }
.skeleton-line:nth-child(2n) { width: 72%; }
@keyframes breathe { to { opacity: .45; } }
@media(max-width:540px) { .card { padding: 16px; } .btn, .tabs button { min-height: 44px; } .toolbar { align-items: stretch; } .toolbar .field,.toolbar .field:first-child { flex-basis: 100%; min-width: 0; } .dialog-header,.dialog-body { padding: 19px; } .pagination { align-items: flex-start; } .detail-list { gap: 13px 12px; grid-template-columns: 1fr 1.2fr; } }
