#admin { min-height: 100%; display: flex; flex-direction: column; }
.admin-main { width: min(920px, 100%); margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 20px; }
.panel { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); padding: 20px; }
.panel h2 { font-size: 17px; margin: 0; }
.sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.sub.small { font-size: 12px; margin-top: 10px; }
.sub.center { text-align: center; padding: 20px 0 6px; }
.row-center { display: flex; gap: 8px; justify-content: center; }

.add-form { display: grid; grid-template-columns: 2fr 1.5fr auto auto; gap: 12px; align-items: end; margin-top: 16px; }
.add-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.add-form input[type=text] { height: 36px; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; font-size: 14px; color: var(--text); }
.add-form input:focus, #in-search:focus { outline: 2px solid #c5d9f7; border-color: var(--accent); }
.check-inline { flex-direction: row !important; align-items: center; height: 36px; font-weight: 500 !important; color: var(--text) !important; font-size: 14px !important; white-space: nowrap; }
.add-form .btn { height: 36px; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.count { color: var(--muted); font-weight: 500; }
#in-search { height: 34px; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; width: 220px; max-width: 100%; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.u-name { font-weight: 600; }
.u-mail { color: var(--muted); font-size: 13px; word-break: break-all; }
.u-name input { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 5px; padding: 2px 4px; margin-left: -5px; width: 100%; max-width: 260px; background: transparent; }
.u-name input:hover { border-color: var(--border); }
.u-name input:focus { border-color: var(--accent); outline: none; background: #fff; }
.role { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #f0f2f5; color: var(--muted); }
.pill.admin { background: #fff4e5; color: #b26a00; }
.pill.you { background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
td.date { color: var(--muted); font-size: 13px; white-space: nowrap; }
td.act { text-align: right; width: 1%; }
.btn-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.btn-remove:hover:not(:disabled) { background: #fce8e6; color: var(--red); }
.btn-remove:disabled { opacity: .3; cursor: default; }

@media (max-width: 680px) {
  .add-form { grid-template-columns: 1fr; }
  .add-form .btn { width: 100%; }
}
