:root {
  --primary: #167563;
  --primary-hover: #115c4e;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-main: #243248;
  --text-muted: #69788c;
  --border-color: #e2e8f0;
  --border-radius: 10px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  outline: none;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

button:focus-visible, a:focus-visible, th:focus-visible {
  outline: 3px solid #83cbb9;
  outline-offset: 3px;
}

button:hover:not(:disabled) {
  background: #f9fafb;
}

button.btn-primary,
#applyFiltersButton,
#createRecordButton,
button[type="submit"] {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

button.btn-primary:hover,
#applyFiltersButton:hover,
#createRecordButton:hover,
button[type="submit"]:hover {
  background: var(--primary-hover);
}

button.btn-cancel {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

button.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

button.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 117, 99, 0.12);
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

#batchImportText {
  min-height: 200px;
  font-family: monospace;
  font-size: 13px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 82px;
  padding: 16px 28px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.admin-header h1 {
  margin: 0 0 4px 0;
  font-size: 19px;
  font-weight: 600;
}

.admin-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 82px);
  margin: 0;
}

.admin-sidebar {
  align-self: start;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 14px;
  min-height: calc(100vh - 82px);
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  width: 100%;
  text-align: left;
}

.admin-nav-item.is-active {
  color: var(--primary);
  background: #e9f4f0;
  border-color: #d7ebe4;
  font-weight: 650;
}

.admin-nav-item.is-active:hover {
  background: #dcefe7;
}

.admin-content {
  min-width: 0;
  padding: 28px;
}

.admin-content > .admin-section {
  margin: 0;
}

.admin-content > .admin-section[hidden] {
  display: none;
}

.admin-section,
.action-bar,
.public-batch-eligibility,
.filter-section,
.table-wrap,
.pagination-bar {
  margin: 0 32px 24px;
}

.admin-content .action-bar,
.admin-content .public-batch-eligibility,
.admin-content .filter-section,
.admin-content .table-wrap,
.admin-content .pagination-bar,
.admin-content #batchDeleteProgressSection {
  margin-right: 0;
  margin-left: 0;
}

.admin-content #batchDeleteProgressSection {
  margin-bottom: 24px;
}

.section-heading,
.admin-section-placeholder {
  padding: 0;
  margin-bottom: 24px;
  background: transparent;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.5px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading p,
.admin-section-placeholder {
  margin-top: 6px;
  margin-bottom: 0;
  color: var(--text-muted);
}

.access-password-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.access-password-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.access-password-form input {
  width: 180px;
  min-width: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.access-password-form button {
  width: auto;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.action-bar-left,
.action-bar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.action-bar-right {
  justify-content: flex-end;
}

.management-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(120px, 160px)) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 24px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

#opApplicationsSection .management-filter-bar {
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 180px) auto auto;
}

.public-batch-eligibility {
  padding: 16px 20px;
  background: #edf7f3;
  border: 1px solid #d6eae1;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.public-batch-eligibility.has-warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.public-batch-eligibility-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 6px;
}

.public-batch-eligibility-head strong {
  font-size: 15px;
}

.public-batch-eligibility-head span,
.public-batch-eligibility-details {
  color: var(--text-muted);
  font-size: 14px;
}

.public-batch-eligibility-details {
  margin: 0;
}

.filter-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.filter-section.hidden {
  display: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.table-wrap {
  overflow: auto;
  max-height: min(68vh, 900px);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
  font-size: 14px;
}

#phoneInventoryTable th:first-child,
#phoneInventoryTable td:first-child {
  width: 44px;
  text-align: center;
  white-space: nowrap;
}

#phoneInventorySection .batch-selection-bar {
  border-top: 1px solid var(--border-color);
  border-radius: 10px;
}

#phoneInventoryTable td[data-column-key="phoneSmsUrl"] a {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#phoneInventoryTable .phone-inventory-extraction-cell {
  white-space: nowrap;
}

#phoneInventoryTable .phone-inventory-extraction-cell button {
  margin-left: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
}

#recordTable [data-column-key="select"] {
  text-align: center;
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

tbody tr:hover {
  background: #f9fafb;
}

td .row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cell-truncate {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.cell-truncate-op {
  display: block;
}

.cell-truncate-link {
  display: block;
}

.cell-truncate-op-nickname {
  display: block;
}

#recordTable {
  table-layout: fixed;
  min-width: 1450px;
}

#recordTable col.record-col-select {
  width: 2.5%;
}

#recordTable col.record-col-order {
  width: 4%;
}

#recordTable col.record-col-google-account {
  width: 7.5%;
}

#recordTable col.record-col-google-password {
  width: 5.5%;
}

#recordTable col.record-col-google-assist {
  width: 5.5%;
}

#recordTable col.record-col-google-expire {
  width: 6%;
}

#recordTable col.record-col-uid {
  width: 4%;
}

#recordTable col.record-col-uid-created {
  width: 5.5%;
}

#recordTable col.record-col-phone-number {
  width: 6.5%;
}

#recordTable col.record-col-phone-expire {
  width: 6%;
}

#recordTable col.record-col-phone-connected {
  width: 7%;
}

#recordTable col.record-col-phone-status {
  width: 4%;
}

#recordTable col.record-col-phone-model {
  width: 4.5%;
}

#recordTable col.record-col-op {
  width: 7%;
}

#recordTable col.record-col-op-nickname {
  width: 5%;
}

#recordTable col.record-col-op-link {
  width: 6.5%;
}

#recordTable col.record-col-op-expire {
  width: 6%;
}

#recordTable col.record-col-remark {
  width: 5%;
}

#recordTable col.record-col-actions {
  width: 6%;
}

#recordTable th,
#recordTable td {
  padding: 13px 8px;
  font-size: 12px;
}

#recordTable td {
  overflow-wrap: anywhere;
}

#recordTable .row-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 4px;
}

#recordTable .row-actions button {
  padding: 5px 7px;
  font-size: 12px;
  white-space: nowrap;
}

#shortOpTable {
  table-layout: fixed;
  min-width: 1100px;
}

#shortOpTable .cell-truncate {
  display: table-cell;
  width: auto;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#shortOpTable col.short-op-col-code { width: 7%; }
#shortOpTable col.short-op-col-link { width: 10%; }
#shortOpTable col.short-op-col-app-name { width: 9%; }
#shortOpTable col.short-op-col-app-id { width: 9%; }
#shortOpTable col.short-op-col-value { width: 16%; }
#shortOpTable col.short-op-col-owner { width: 8%; }
#shortOpTable col.short-op-col-status { width: 7%; }
#shortOpTable col.short-op-col-expire { width: 12%; }
#shortOpTable col.short-op-col-remark { width: 8%; }
#shortOpTable col.short-op-col-actions { width: 14%; }

#shortOpTable th,
#shortOpTable td,
#opApplicationTable th,
#opApplicationTable td {
  padding: 12px 10px;
  font-size: 13px;
}

#shortOpTable .row-actions,
#opApplicationTable .row-actions {
  gap: 6px;
}

#shortOpTable .row-actions button,
#opApplicationTable .row-actions button {
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
}

#opApplicationTable {
  table-layout: fixed;
  min-width: 0;
}

.status-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  white-space: nowrap;
}

.status-label.is-disabled {
  color: #991b1b;
  background: #fee2e2;
}

.status-label.is-offline {
  color: #4b5563;
  background: #f3f4f6;
}

.status-label.is-unbound {
  color: #92400e;
  background: #fef3c7;
}

.default-label {
  color: var(--primary);
  font-weight: 600;
}

.empty-table-cell {
  padding: 36px 16px;
  color: var(--text-muted);
  text-align: center !important;
}

.import-result-summary {
  min-height: 22px;
  margin: 0;
  font-weight: 600;
}

.import-error-list {
  max-height: 180px;
  margin: 0;
  padding-left: 24px;
  overflow: auto;
  color: #b91c1c;
  font-size: 13px;
}

@media (max-width: 1366px) {
  #recordTable th,
  #recordTable td {
    padding: 10px 6px;
  }
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.page-size-control select {
  width: auto;
  min-width: 92px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.dialog-heading {
  display: grid;
  gap: 6px;
}

.stack-form label {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: -8px;
  color: var(--text-main);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.checkbox-inline input[type="checkbox"] {
  width: auto;
}

.wifi-preview-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f9fafb;
  text-align: center;
}

.wifi-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.wifi-preview-image {
  width: 180px;
  height: 180px;
  max-width: 100%;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  object-fit: contain;
}

.wifi-preview-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  word-break: break-all;
}

.form-error {
  color: #ef4444;
}

dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border: 0;
  border-radius: 16px;
  padding: 28px;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
}

dialog::backdrop {
  background: rgba(23, 37, 56, 0.4);
  backdrop-filter: blur(3px);
}

dialog h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.dialog-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.import-help {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 16px;
  border-radius: 8px;
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.6;
}

.import-help p {
  margin-top: 0;
  font-weight: 600;
}

.import-help ul {
  margin: 0;
  padding-left: 20px;
}

.import-help code {
  background: #dbeafe;
  padding: 2px 4px;
  border-radius: 4px;
}

.batch-import-progress {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 12px;
}

.batch-import-progress.hidden {
  display: none;
}

.batch-import-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
}

.batch-import-progress-track {
  width: 100%;
  height: 10px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
}

.batch-import-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5 0%, #0ea5e9 100%);
  transition: width 0.25s ease;
}

.batch-import-progress-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.batch-action-progress {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.batch-action-progress.hidden {
  display: none;
}

.batch-action-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
}

.batch-action-progress-track {
  width: 100%;
  height: 10px;
  background: #fee2e2;
  border-radius: 999px;
  overflow: hidden;
}

.batch-action-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316 0%, #dc2626 100%);
  transition: width 0.25s ease;
}

.batch-action-progress-bar.danger {
  background: linear-gradient(90deg, #fb7185 0%, #dc2626 100%);
}

.batch-action-progress-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.dialog-menu,
menu {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

#adminToastStack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1200;
  display: grid;
  gap: 12px;
}

.admin-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.96);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feedback-dialog {
  width: min(440px, calc(100vw - 32px));
}

.feedback-dialog-form {
  gap: 20px;
}

.admin-brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: #1b3547; color: #fff; font-size: 17px; font-weight: 750; letter-spacing: -1px;
}
.brand-divider { margin: 0 8px; color: #bac4d0; }
.header-actions button, .header-actions a { font-size: 12px; padding: 7px 11px; }
#logoutButton { color: var(--text-muted); border-color: transparent; }
.nav-caption, .eyebrow {
  margin: 0 0 12px; font-size: 10px; font-weight: 650; letter-spacing: 1.6px;
  color: #8290a2; text-transform: uppercase;
}
.nav-caption { padding-left: 13px; font-size: 11px; }
.section-heading .eyebrow { margin: 0 0 7px; font-size: 10px; color: #8290a2; }
.nav-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.sidebar-note { margin: auto 0 0; padding: 32px 12px 0; font-size: 11px; color: var(--text-muted); }
.sidebar-note > span:last-child { display: block; margin: 7px 0 0 12px; font-size: 10px; color: #95a0af; }
.sidebar-dot { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--primary); }
.count-badge {
  display: inline-flex; vertical-align: middle; padding: 3px 9px; margin-left: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--text-muted);
  border: 1px solid var(--border-color); border-radius: 6px; background: #fff;
}
#recordsSection .action-bar { margin-bottom: 0; border-radius: 10px 10px 0 0; box-shadow: none; }
.batch-selection-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 18px;
  margin-bottom: 20px; background: #fbfcfd; border: 1px solid var(--border-color);
  border-top: 0; border-radius: 0 0 10px 10px;
}
.selection-count { color: var(--primary); font-size: 12px; font-weight: 650; }
.selection-hint { color: #8390a0; font-size: 11px; }
.batch-selection-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.batch-selection-actions button { padding: 5px 9px; font-size: 11px; }
.btn-danger-quiet { color: #bb4245; background: #fff; border-color: #edcfd1; }
.btn-danger-quiet:hover:not(:disabled) { color: #a72e35; background: #fff2f2; }
.public-batch-eligibility { padding: 13px 17px; box-shadow: none; }
.public-batch-eligibility-head strong { font-size: 12px; }
.public-batch-eligibility-head span, .public-batch-eligibility-details { font-size: 12px; }
.public-batch-eligibility.has-warning { background: #fffaf0; border-color: #efdfbb; }
.public-batch-eligibility.has-warning strong { color: #96662d; }
#phoneInventoryFilterForm { grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(120px, 190px)) auto auto; }
.management-filter-bar, .filter-section { border: 1px solid var(--border-color); box-shadow: none; }
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; background: #fff; border: 1px solid var(--border-color);
  border-bottom: 0; border-radius: 10px 10px 0 0;
}
.table-order-status { font-size: 11px; color: var(--text-muted); }
.column-settings-button { padding: 5px 11px; font-size: 12px; }
th[draggable="true"] { cursor: grab; user-select: none; transition: background-color .15s; }
th[draggable="true"]:hover { color: var(--primary); background: #edf5f2; }
th.is-dragging { opacity: .4; cursor: grabbing; }
th.is-drop-target { box-shadow: inset 3px 0 var(--primary); background: #deeee8; }
#recordTable th { white-space: normal; line-height: 1.5; font-size: 11px; }
tbody tr:nth-child(even) { background: #fcfdfe; }
tbody tr:hover { background: #f1f7f5; }
#phoneInventoryTable { min-width: 1000px; }
#userTable { min-width: 800px; }
#userTable .row-actions button { padding: 6px 10px; font-size: 12px; }
.pagination-bar { gap: 10px; padding: 12px 16px; box-shadow: none; border: 1px solid var(--border-color); font-size: 12px; }
.pagination-bar > label { margin-right: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pagination-bar select { width: auto; min-width: 68px; padding: 6px 8px; }
.pagination-bar button { padding: 6px 11px; font-size: 12px; }
.pagination-bar span { color: var(--text-muted); }
.page-size-control { font-size: 12px; }
.column-settings-dialog { width: min(520px, calc(100vw - 32px)); }
.column-order-list { max-height: 48vh; overflow-y: auto; list-style: none; margin: 20px 0 12px; padding: 0 6px 0 0; }
.column-order-list li { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-bottom: 1px solid #edf0f4; }
.column-order-list li:nth-child(odd) { background: #f7f9fb; border-radius: 6px; }
.column-order-label { font-size: 13px; white-space: pre; }
.column-order-list button { padding: 4px 11px; margin-left: 6px; }
.column-settings-note { color: var(--text-muted); font-size: 12px; }
.column-settings-footer { border-top: 1px solid var(--border-color); padding-top: 16px; display: flex; justify-content: space-between; gap: 8px; }
.column-settings-footer > div { display: flex; gap: 8px; }
.column-settings-footer button { padding: 8px 12px; }
.record-action-options { display: grid; gap: 10px; margin-top: 20px; }
.record-action-options button { text-align: left; }
.record-action-options span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 3px; }
#recordActionsDialog { max-width: 430px; }
.dialog-menu { position: sticky; bottom: -28px; background: #fff; padding-bottom: 12px; z-index: 2; }
.admin-auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #edf2f5; }
.auth-card { width: min(100%, 420px); padding: 38px; background: #fff; border: 1px solid var(--border-color); border-radius: 18px; box-shadow: 0 16px 50px #2432480d; }
.auth-card .brand-mark { margin-bottom: 26px; }
.auth-card h1 { margin: 0; font-size: 26px; }
.auth-subtitle { margin: 8px 0 26px; color: var(--text-muted); font-size: 13px; }
.auth-card .eyebrow { margin-bottom: 9px; }
.auth-card button[type="submit"] { margin-top: 8px; padding: 11px; }

@media (max-width: 1200px) {
  .admin-content { padding: 22px; }
  #shortOpsSection .management-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .selection-hint { display: none; }
}

@media (max-width: 900px) {
  .admin-header { align-items: flex-start; flex-wrap: wrap; gap: 16px; padding: 18px; }
  .header-actions { flex-wrap: wrap; }
  .admin-content { padding: 20px 16px; }
  .admin-sidebar .nav-caption, .sidebar-note { display: none; }
  .admin-sidebar .admin-nav-item { font-size: 12px; padding: 8px 10px; }
  .public-batch-eligibility-head { flex-wrap: wrap; gap: 4px; }
  .batch-selection-actions { margin-left: 0; }
  #phoneInventoryFilterForm, #shortOpsSection .management-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagination-bar { flex-wrap: wrap; gap: 8px; }
  .pagination-bar > label { flex-basis: 100%; }
  .table-toolbar { padding: 10px; }
  .table-order-status { max-width: 65%; }
  .section-heading h2 { font-size: 23px; }
  .admin-layout {
    display: block;
    margin: 0;
  }

  .admin-sidebar {
    position: static;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 0;
    padding: 10px;
    border-radius: 0;
  }

  .admin-nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .management-filter-bar,
  #opApplicationsSection .management-filter-bar {
    grid-template-columns: 1fr;
  }

  #opApplicationTable {
    min-width: 760px;
  }
}

.queue-settings-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.queue-settings-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.queue-settings-form input[type="checkbox"] { width: auto; margin: 0; }
.queue-settings-form select { width: auto; margin: 0; }
