* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
  margin: 0;
  color: #1f2937;
  line-height: 1.5;
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f8;
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 12px 30px rgba(29, 35, 41, 0.08);
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sub-title {
  margin: 0 0 20px;
  color: #6f7682;
}

.login-form {
  display: grid;
  gap: 12px;
}

label {
  color: #5a677d;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
button {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 14px;
  font-size: 14px;
  transition: all 0.2s ease;
}

button {
  border: none;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

button:active {
  transform: translateY(0);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.app-body {
  background: #f4f6f8;
}

.app-layout {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 230px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid #e6ebf3;
  box-shadow: 8px 0 28px rgba(13, 30, 64, 0.05);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

.menu-item {
  display: block;
  padding: 11px 13px;
  color: #4b576a;
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.menu-item.active,
.menu-item:hover {
  background: #f4f8ff;
  color: #204080;
  border-color: #d9e5fb;
  box-shadow: 0 4px 10px rgba(43, 90, 180, 0.08);
}

.sidebar-foot {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.sidebar-foot a {
  color: #2f6df6;
  text-decoration: none;
}

.content {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #e7edf6;
  box-shadow: 0 7px 18px rgba(16, 38, 77, 0.05);
}

.metric-card span {
  color: #6a7280;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.panel {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border-radius: 14px;
  border: 1px solid #e7edf6;
  box-shadow: 0 10px 26px rgba(16, 36, 74, 0.05);
  padding: 18px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #12213f;
}

.tab-nav {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-link {
  display: inline-block;
  text-decoration: none;
  color: #465061;
  background: #f5f8fc;
  border: 1px solid #d8e2f1;
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab-link.active {
  color: #1f3b77;
  background: #e9f1ff;
  border-color: #c8d8fb;
  box-shadow: 0 4px 10px rgba(52, 95, 181, 0.12);
}

.search-input {
  width: min(420px, 100%);
  margin-bottom: 12px;
  background: #f8fbff;
}

.cards-content .panel {
  padding: 20px;
}

.cards-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.cards-toolbar-spacer {
  flex: 1 1 auto;
}

.cards-toolbar-form {
  margin: 0;
}

.cards-toolbar-import {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.cards-create-form {
  align-items: flex-end;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.cards-create-form label {
  margin-bottom: 4px;
}

.cards-create-form > label {
  min-width: 44px;
}

.unlimited-quota-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 4px 2px;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.unlimited-quota-toggle input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-height: auto;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
  transform: scale(1.2);
}

.cards-create-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cards-create-duration-stack {
  min-width: 170px;
}

.cards-create-duration-stack select {
  width: 100%;
}

.cards-create-form input,
.cards-create-form select,
.cards-create-form button {
  min-height: 38px;
}

.cards-search-input {
  width: min(520px, 100%);
}

.cards-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.cards-filter-tab {
  min-width: 112px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #dbe5f1;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cards-filter-tab:hover {
  background: #eef5ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.cards-filter-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.small-number {
  width: 72px;
  min-width: 72px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  padding: 10px 8px;
  font-size: 14px;
  vertical-align: middle;
}

th {
  color: #4e5f7d;
  font-weight: 700;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.empty-row {
  text-align: center;
  color: #7b8595;
}

.error-box,
.success-box {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.error-box {
  background: #fff1f1;
  color: #b33d3d;
  border-color: #ffd3d3;
}

.success-box {
  background: #edf9f1;
  color: #2d7a45;
  border-color: #cdeed8;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.action-cell form {
  margin: 0;
}

.warn-btn {
  background: #f59e0b;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.warn-btn:hover {
  background: #d97706;
}

.danger-btn {
  background: #ef4444;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

.danger-btn:hover {
  background: #dc2626;
}

.success-btn {
  background: #10b981;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.success-btn:hover {
  background: #059669;
}

.info-btn {
  background: #6b7280;
  box-shadow: 0 1px 2px rgba(107, 114, 128, 0.2);
}

.info-btn:hover {
  background: #4b5563;
}

.monitor-btn {
  background: #10b981;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.monitor-btn:hover {
  background: #059669;
}

.monitor-btn.has-alert {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: alertBlink 1s infinite;
}

.monitor-btn.has-alert:hover {
  background: #dc2626;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
  line-height: 1.2;
}

.status-pill.enabled {
  color: #246f40;
  background: #e7f7ed;
  border-color: #c6e8d3;
}

.status-pill.disabled {
  color: #8f6700;
  background: #fff4dd;
  border-color: #f1ddb0;
}

.status-pill.expired,
.status-pill.exhausted {
  color: #a23636;
  background: #fee9e9;
  border-color: #f6c7c7;
}

.status-pill.sync {
  color: #1d4ed8;
  background: #e8f0ff;
  border-color: #c6d7ff;
}

.status-pill.alert {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.setting-form {
  max-width: 420px;
  display: grid;
  gap: 12px;
}

.card-table {
  width: 100%;
  min-width: 1280px;
}

.card-table th,
.card-table td {
  text-align: center;
  white-space: nowrap;
}

.cards-content .card-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7faff;
  border-bottom: 1px solid #dde8f8;
}

.cards-content .card-table tbody td {
  padding: 13px 8px;
}

.cards-content .card-table tbody td:first-child {
  font-weight: 700;
  color: #3f4c64;
}

.cards-content .card-table tbody tr:hover td {
  background: #f9fbff;
}

.card-actions-cell {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.card-cell-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bound-ip-input {
  width: 168px;
  min-height: 34px;
}

.text-muted {
  color: #6b7280;
  font-size: 14px;
}

.form-hint {
  color: #6b7280;
  font-size: 12px;
}

.duration-form-hint {
  line-height: 1.4;
  white-space: normal;
  max-width: 220px;
}

.mini-icon-btn {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mini-icon-btn:hover {
  background: #f9fafb;
  color: #111827;
}

.expires-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.duration-label {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.expires-time {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.mini-btn {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 10px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mini-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.quota-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.quota-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.quota-used {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
}

.quota-total {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.copyable-key {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.copyable-key:hover {
  color: #2f6df6;
}

.copyable-key.copied {
  color: #2e9f5a;
}

.new-key-row td {
  background: #eef9f2 !important;
  transition: background-color 0.6s ease;
}

.new-generated-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.new-generated-tip {
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

.new-generated-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.new-generated-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #cfe6d7;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f4fcf7 0%, #effaf3 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.new-generated-item:hover {
  transform: translateY(-1px);
  border-color: #8dd3a7;
  box-shadow: 0 8px 20px rgba(39, 120, 74, 0.12);
}

.new-generated-badge {
  flex: 0 0 auto;
  background: #16a34a;
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.new-generated-key {
  flex: 1;
  min-width: 0;
  color: #14532d;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  word-break: break-all;
}

.new-generated-index {
  flex: 0 0 auto;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal-mask.show {
  display: flex;
}

.modal-card {
  width: min(900px, 90vw);
  height: 80vh;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: 1px solid #ddd;
  color: #666;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
  border-color: #ccc;
}

.modal-body {
  padding: 0;
  overflow: auto;
  flex: 1;
}

.modal-body .table-wrapper {
  margin: 0;
}

.quota-history-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.quota-history-tab {
  min-width: 112px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #d8e2f1;
  box-shadow: none;
}

.quota-history-tab:hover {
  background: #eef5ff;
  color: #1d4ed8;
}

.quota-history-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.quota-history-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  border: 1px solid #e2e8f0;
}

.quota-history-modal-card {
  width: min(1020px, 94vw);
  height: auto;
  max-height: 78vh;
}

.quota-history-table-wrapper {
  overflow-x: auto;
}

.quota-history-table {
  min-width: 920px;
  table-layout: auto;
}

.quota-history-table th,
.quota-history-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.quota-history-table th:nth-child(1),
.quota-history-table td:nth-child(1) {
  min-width: 150px;
}

.quota-history-table th:nth-child(2),
.quota-history-table td:nth-child(2) {
  min-width: 96px;
}

.quota-history-table td:nth-child(2) .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
}

.quota-history-table th:nth-child(3),
.quota-history-table td:nth-child(3),
.quota-history-table th:nth-child(4),
.quota-history-table td:nth-child(4),
.quota-history-table th:nth-child(5),
.quota-history-table td:nth-child(5) {
  min-width: 92px;
}

.quota-history-table th:nth-child(6),
.quota-history-table td:nth-child(6) {
  min-width: 320px;
}

.quota-history-table td:nth-child(6) {
  white-space: normal;
  word-break: break-word;
  line-height: 1.6;
}

.modal-body table {
  border-top: none;
}

.modal-body th {
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.used-account-list {
  display: grid;
  gap: 10px;
}

.ua-card {
  border: 1px solid #e8eef8;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(20, 47, 88, 0.05);
}

.ua-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ua-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(140deg, #1ca6ff, #0967d2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.ua-user {
  flex: 1;
  min-width: 0;
}

.ua-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ua-sub {
  margin-top: 2px;
  color: #71829b;
  font-size: 12px;
  font-weight: 600;
}

.ua-status {
  background: #ecfdf4;
  color: #059669;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.ua-tags {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
}

.ua-tag {
  background: #f1f5ff;
  color: #24457a;
  border: 1px solid #d8e4ff;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ua-tag.active {
  background: #e8fcf3;
  color: #0d8c5b;
  border-color: #baf0d9;
}

.ua-progress {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.ua-progress-title {
  display: flex;
  justify-content: space-between;
  color: #6b7280;
  font-size: 18px;
  font-weight: 700;
}

.ua-progress-title span {
  color: #10b981;
}

.ua-progress-bar {
  width: 100%;
  height: 12px;
  margin: 10px 0;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.ua-progress-bar > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #37d996, #10b981);
}

.ua-progress-meta {
  color: #111827;
  font-size: 30px;
  font-weight: 800;
}

.ua-progress-remaining {
  text-align: right;
  color: #9ca3af;
  font-size: 22px;
  font-weight: 700;
}

.ua-foot {
  margin-top: 6px;
  color: #8a96ab;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

.ua-credentials {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ua-credentials-item,
.ua-extra-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5edf8;
}

.ua-credentials-item span,
.ua-extra-item span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.ua-credentials-item strong,
.ua-extra-item strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.ua-extra {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

#usedAccountModal {
  background: rgba(10, 20, 40, 0.46);
  backdrop-filter: blur(6px);
}

#usedAccountModal .used-account-modal-card {
  width: min(760px, 88vw);
  height: auto;
  max-height: 76vh;
  border-radius: 16px;
  border: 1px solid #e4ebf7;
  box-shadow: 0 16px 48px rgba(15, 32, 68, 0.22);
  overflow: hidden;
}

#usedAccountModal .modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f8;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#usedAccountModal .modal-head h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

#usedAccountModal .modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  padding: 0;
  border: 1px solid #d8e1f0;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

#usedAccountModal .modal-close:hover {
  background: #f3f7ff;
  border-color: #b9c8e2;
  color: #334155;
}

#usedAccountModal .used-account-modal-body {
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
}

@media (max-width: 1024px) {
  .content {
    padding: 20px;
  }

  .panel {
    padding: 14px;
  }

  .card-table {
    min-width: 1180px;
  }

  .cards-toolbar {
    gap: 8px;
  }

  .cards-create-form {
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .login-card {
    width: calc(100vw - 24px);
    max-width: 420px;
    padding: 22px;
  }

  h1 {
    font-size: 22px;
  }

  .app-layout {
    display: block;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #eaedf2;
    padding: 14px;
    gap: 10px;
  }

  .sidebar nav {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .menu-item {
    margin-bottom: 0;
    padding: 9px 12px;
  }

  .sidebar-foot {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .content {
    padding: 12px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card strong {
    font-size: 22px;
  }

  .panel-title {
    font-size: 16px;
  }

  .inline-form {
    gap: 8px;
  }

  .inline-form input,
  .inline-form select,
  .inline-form button {
    min-height: 38px;
  }

  .cards-toolbar {
    margin-bottom: 10px;
  }

  .cards-toolbar-form,
  .cards-toolbar-import,
  .monitor-btn,
  .cards-filter-tab {
    width: 100%;
  }

  .cards-toolbar-form button,
  .cards-toolbar-import button {
    width: 100%;
  }

  .cards-toolbar-import input[type='file'] {
    width: 100%;
  }

  .cards-toolbar-spacer {
    display: none;
  }

  .cards-create-form {
    padding: 10px;
    gap: 8px;
  }

  .cards-create-form > label {
    width: 100%;
  }

  .cards-create-form input,
  .cards-create-form select,
  .cards-create-form button {
    width: 100%;
  }

  .small-number {
    width: 66px;
    min-width: 66px;
  }

  th,
  td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .action-cell {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .action-cell button {
    padding: 7px 10px;
    font-size: 12px;
  }

  .card-cell-inline input[type='text'] {
    width: 140px !important;
  }

  .card-actions-cell {
    min-width: 240px;
    justify-content: center;
  }

  .ua-name {
    font-size: 14px;
  }

  .ua-status {
    font-size: 11px;
    padding: 4px 9px;
  }


  .ua-progress-meta {
    font-size: 24px;
  }

  .ua-progress-remaining {
    font-size: 18px;
  }

  .card-table {
    min-width: 1040px;
  }

  .modal-card {
    width: 94vw;
    height: 86vh;
    max-height: 86vh;
  }

  #usedAccountModal .used-account-modal-card {
    width: 94vw;
    max-height: 82vh;
  }

  #usedAccountModal .used-account-modal-body {
    padding: 10px;
  }
}

@keyframes alertBlink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }
  50% {
    opacity: 0.75;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}
