/* ANTIGRAVITY — Clean Anthropic Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2e2e2e;
  --bg-elevated: #333333;
  --accent: #D97757;
  --accent-hover: #E08A6D;
  --text-primary: #ECECEC;
  --text-secondary: #A0A0A0;
  --text-tertiary: #6B6B6B;
  --success: #4CAF50;
  --warning: #FFB74D;
  --error: #EF5350;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #D97757 0%, #C66A4D 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
}

#status {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

#status.online { color: var(--success); }
#status.online::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

/* Navigation */
.segments {
  display: flex;
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.segment {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
}

.segment:hover { color: #ccc; }
.segment.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Sections */
.section { display: none; }
.section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-brand {
  background: var(--accent);
  color: white;
}
.btn-brand:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 200ms ease;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.icon-btn.danger:hover {
  background: rgba(239,83,80,0.15);
  color: var(--error);
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-body { padding: 20px; }

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.key-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.key-meta {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.key-mini-stats {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
}

.key-status {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 100px;
}

.key-status.active {
  background: rgba(76,175,80,0.15);
  color: var(--success);
}

.key-status.paused {
  background: rgba(255,183,77,0.15);
  color: var(--warning);
}

.key-info-block {
  padding: 16px 20px;
  background: var(--bg-primary);
}

.key-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.key-info-row + .key-info-row {
  border-top: 1px solid var(--border);
}

.key-info-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.key-info-value {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'SF Mono', monospace;
}

.key-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-primary);
}

.copy-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--accent);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Dashboard Stats */
.dashboard-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.dashboard-tabs {
  display: flex;
  padding: 4px;
  gap: 4px;
  background: #141414;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 150ms ease;
}

.dash-tab:hover { color: #999; }
.dash-tab.active {
  background: var(--accent);
  color: white;
}

.dashboard-hero {
  padding: 32px 20px 20px;
  text-align: center;
}

.hero-value {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.hero-label {
  font-size: 14px;
  color: #666;
}

.dashboard-supporting {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 24px;
}

.support-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.support-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.support-label {
  font-size: 13px;
  color: #666;
}

.support-divider { color: #444; }

/* Users Table */
.users-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.users-header {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.users-table-header {
  display: grid;
  grid-template-columns: 1fr 80px 90px;
  padding: 10px 16px;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.2);
}

.user-row {
  display: grid;
  grid-template-columns: 1fr 80px 90px;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.user-row:last-child { border-bottom: none; }
.user-name { color: var(--text-primary); font-weight: 500; }
.user-requests { color: #888; text-align: center; }
.user-cost { color: var(--accent); text-align: right; font-weight: 500; }

/* Pool Accounts */
.account-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.account-email {
  font-size: 15px;
  font-weight: 500;
  font-family: 'SF Mono', monospace;
}

.account-status {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 100px;
}

.account-status.ok { background: rgba(76,175,80,0.15); color: var(--success); }
.account-status.warn { background: rgba(255,183,77,0.15); color: var(--warning); }
.account-status.bad { background: rgba(239,83,80,0.15); color: var(--error); }

.quota-track {
  height: 4px;
  background: var(--bg-primary);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 16px;
}

.quota-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 400ms ease;
}

.quota-fill.high { background: var(--success); }
.quota-fill.mid { background: var(--warning); }
.quota-fill.low { background: var(--error); }

.account-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quota-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Toggle */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: 100px;
  transition: all 200ms ease;
}

.toggle-track::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: all 200ms ease;
}

.toggle input:checked + .toggle-track { background: var(--success); }
.toggle input:checked + .toggle-track::before {
  transform: translateX(20px);
  background: white;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms ease;
}

.modal.show { opacity: 1; visibility: visible; }

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.modal.show .modal-sheet { transform: translateY(0); }

.modal-sheet::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 100px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .btn { flex: 1; }

/* Forms */
.input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: all 200ms ease;
}

.input::placeholder { color: var(--text-tertiary); }
.input:focus { border-color: var(--accent); }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Accounts Container (Modal) */
.accounts-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.accounts-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.accounts-toggle-row span {
  font-size: 14px;
  font-weight: 500;
}

.accounts-list {
  max-height: 200px;
  overflow-y: auto;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
}

.account-row:last-child { border-bottom: none; }
.account-row:hover { background: rgba(255,255,255,0.03); }
.account-row.disabled { opacity: 0.4; pointer-events: none; }

.account-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.account-row span {
  font-size: 14px;
  color: #a0a0a0;
  font-family: 'SF Mono', monospace;
}

.accounts-counter {
  padding: 10px 16px;
  font-size: 12px;
  color: #666;
  background: rgba(0,0,0,0.2);
  text-align: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 2000;
  opacity: 0;
  transition: all 300ms ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: rgba(239,83,80,0.15);
  border-color: rgba(239,83,80,0.3);
  color: var(--error);
}

/* Empty States */
.empty {
  text-align: center;
  padding: 32px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-text {
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 100px;
}

/* Pool Dashboard */
.pool-hero {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.pool-hero-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.pool-hero-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
}

.pool-hero-total {
  font-size: 24px;
  color: var(--text-tertiary);
}

.pool-hero-label {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.pool-quota-bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.pool-quota-fill {
  height: 100%;
  background: var(--success);
  border-radius: 100px;
  transition: width 500ms ease;
}

.pool-quota-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.pool-list-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pool-list-header {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pool-list {
  max-height: 400px;
  overflow-y: auto;
}

.pool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 150ms ease;
}

.pool-row:last-child { border-bottom: none; }
.pool-row:hover { background: rgba(255,255,255,0.03); }

.pool-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pool-row-dot.active { background: var(--success); }
.pool-row-dot.warning { background: var(--warning); }
.pool-row-dot.error { background: var(--error); }

.pool-row-email {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-family: 'SF Mono', monospace;
}

.pool-row-quota {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: right;
}

.pool-row-quota.low { color: var(--error); }
.pool-row-quota.mid { color: var(--warning); }

.pool-row-arrow {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Account Detail Modal */
.account-detail-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.account-detail-header span:first-child {
  display: block;
  font-size: 16px;
  font-weight: 600;
  font-family: 'SF Mono', monospace;
  margin-bottom: 8px;
}

.account-detail-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  background: rgba(76,175,80,0.15);
  color: var(--success);
}

.account-detail-badge.warning {
  background: rgba(255,183,77,0.15);
  color: var(--warning);
}

.account-detail-badge.error {
  background: rgba(239,83,80,0.15);
  color: var(--error);
}

.account-detail-section {
  margin-bottom: 20px;
}

.account-detail-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-detail-quota-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.account-detail-quota-fill {
  height: 100%;
  background: var(--success);
  border-radius: 100px;
  transition: width 300ms ease;
}

.account-detail-quota-fill.mid { background: var(--warning); }
.account-detail-quota-fill.low { background: var(--error); }

.account-detail-quota-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-tertiary);
}

.account-detail-protection {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
}

.account-detail-protection.active {
  border-color: rgba(239,83,80,0.3);
  background: rgba(239,83,80,0.1);
}

.account-detail-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.account-detail-toggle-row span {
  font-size: 14px;
  font-weight: 500;
}

.prot-active {
  color: var(--error);
  font-weight: 500;
  margin-bottom: 12px;
}

.prot-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prot-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.prot-stat span:first-child {
  color: var(--text-tertiary);
}

.prot-stat span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.shield-icon {
  display: inline-block;
  vertical-align: middle;
  color: var(--accent);
}

/* Full-Width Segmented Control */
.header {
  margin-bottom: 20px;
}

.segments {
  display: flex;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.segment {
  flex: 1;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #777;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  white-space: nowrap;
}

.segment:hover {
  color: #aaa;
  background: rgba(255,255,255,0.03);
}

.segment.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Improved Tabs Container */
.segments {
  display: flex;
  width: 100%;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.segment {
  flex: 1;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  background: rgba(255,255,255,0.04);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
}

.segment:hover {
  color: #bbb;
  background: rgba(255,255,255,0.08);
}

.segment.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Integrated Pool Dashboard */
.pool-dashboard {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.pool-stats-row {
  display: flex;
  padding: 20px;
  gap: 16px;
}

.pool-stat-item {
  flex: 1;
  text-align: center;
}

.pool-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.pool-stat-total {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.pool-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  margin-bottom: 10px;
}

.pool-stat-divider {
  width: 1px;
  background: var(--border);
  margin: 8px 0;
}

.pool-mini-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}

.pool-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.pool-dot.inactive {
  background: var(--text-tertiary);
  opacity: 0.3;
}

.pool-mini-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  overflow: hidden;
}

.pool-mini-fill {
  height: 100%;
  background: var(--success);
  border-radius: 100px;
  transition: width 400ms ease;
}

.pool-section-divider {
  height: 1px;
  background: var(--border);
  margin: 0 20px;
}

.pool-list-title {
  padding: 14px 20px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pool-accounts {
  max-height: 350px;
  overflow-y: auto;
}

.pool-accounts .pool-row {
  padding: 12px 20px;
}

/* More spacing between tabs and content */
.pool-dashboard {
  margin-top: 8px;
}

/* Fix button alignment after removing titles */
.section-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* Structured Create Modal */
.create-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.create-modal-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.create-section {
  margin-bottom: 20px;
}

.create-section-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.create-accounts-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.create-accounts-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.create-accounts-toggle span {
  font-size: 14px;
  font-weight: 500;
}

.create-accounts-divider {
  height: 1px;
  background: var(--border);
}

.create-accounts-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 0;
}

.create-accounts-list.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.create-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 150ms ease;
}

.create-account-row:hover {
  background: rgba(255,255,255,0.03);
}

.create-account-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.create-account-row .email {
  flex: 1;
  font-size: 14px;
  font-family: 'SF Mono', monospace;
}

.create-account-row .quota {
  font-size: 12px;
  color: var(--text-tertiary);
}

.create-account-row .quota.low {
  color: var(--error);
}

.create-accounts-hint {
  text-align: right;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* Fix create account rows */
.create-account-row {
  display: flex !important;
  width: 100%;
}

.create-accounts-list {
  display: flex;
  flex-direction: column;
}

/* Premium Account Picker */
.create-accounts-list {
  position: relative;
}

.create-accounts-list.disabled::after {
  content: 'Доступ ко всем аккаунтам';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,26,26,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
  border-radius: 0 0 12px 12px;
}

.create-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 150ms ease;
}

.create-account-row:last-child {
  border-bottom: none;
}

.create-account-row:hover {
  background: rgba(255,255,255,0.04);
}

/* Custom checkbox */
.create-account-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.create-account-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.create-account-row input[type="checkbox"]:checked::after {
  content: '✓';
  display: block;
  text-align: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  line-height: 16px;
}

.create-account-row .email {
  flex: 1;
  font-size: 14px;
  font-family: 'SF Mono', monospace;
  color: var(--text-primary);
}

.create-account-row .quota {
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
  min-width: 40px;
  text-align: right;
}

.create-account-row .quota.mid {
  color: var(--warning);
}

.create-account-row .quota.low {
  color: var(--error);
}

/* Proxy Card in Account Modal */
.account-proxy-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.proxy-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.proxy-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.proxy-status-dot.online {
  background: var(--success);
}

.proxy-status-dot.offline {
  background: var(--error);
}

#proxy-status-text {
  font-size: 14px;
  font-weight: 500;
}

.proxy-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.proxy-info-row span:first-child {
  color: var(--text-tertiary);
}

.proxy-info-row span:last-child {
  color: var(--text-primary);
  font-family: 'SF Mono', monospace;
}


/* ==================== MODERATION TAB (Claude Style) ==================== */

/* Badge on tab button */
.mod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.mod-badge:empty {
  display: none;
}

/* Threat Level Block */
.mod-threat-block {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.mod-threat-header {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.mod-threat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mod-threat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
}

.mod-threat-dot.medium {
  background: #f59e0b;
}

.mod-threat-dot.high {
  background: #ef4444;
}

.mod-threat-text {
  font-size: 18px;
  font-weight: 600;
  color: #fafafa;
}

.mod-threat-bar {
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.mod-threat-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.mod-threat-bar-fill.medium {
  background: #f59e0b;
}

.mod-threat-bar-fill.high {
  background: #ef4444;
}

.mod-threat-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #a1a1aa;
}

.mod-threat-summary strong {
  color: #fafafa;
}

.mod-threat-divider {
  color: #3a3a3a;
}

/* Stats Title */
.mod-stats-title {
  font-size: 14px;
  font-weight: 500;
  color: #fafafa;
  margin-bottom: 12px;
}

.mod-stats-period {
  color: #71717a;
  font-weight: 400;
}

/* Stats Grid */
.mod-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.mod-stat-card-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  transition: border-color 0.2s ease;
}

.mod-stat-card-new:hover {
  border-color: #3a3a3a;
}

.mod-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fafafa;
  line-height: 1;
  margin-bottom: 6px;
}

.mod-stat-name {
  font-size: 12px;
  color: #71717a;
  text-align: center;
  line-height: 1.3;
}

/* Divider */
.mod-divider {
  height: 1px;
  background: #2a2a2a;
  margin: 20px 0;
}

/* Section Row */
.mod-section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mod-section-title {
  font-size: 15px;
  font-weight: 500;
  color: #fafafa;
}

.mod-section-count {
  font-size: 13px;
  color: #71717a;
}

/* Filter Button */
.mod-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-filter-btn:hover {
  border-color: #3a3a3a;
  color: #fafafa;
}

.mod-filter-btn svg {
  opacity: 0.6;
}

/* Filter Dropdown */
.mod-filter-dropdown {
  position: absolute;
  right: 16px;
  margin-top: 4px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.mod-filter-dropdown.hidden {
  display: none;
}

.mod-filter-option {
  padding: 10px 16px;
  font-size: 13px;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mod-filter-option:hover {
  background: #2a2a2a;
  color: #fafafa;
}

/* Queue and History */
.mod-queue, .mod-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Empty State */
.mod-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
}

.mod-empty-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  margin-bottom: 12px;
}

.mod-empty-icon svg {
  width: 24px;
  height: 24px;
  stroke: #22c55e;
}

.mod-empty-title {
  font-size: 15px;
  font-weight: 500;
  color: #fafafa;
  margin-bottom: 4px;
}

.mod-empty-desc {
  font-size: 13px;
  color: #71717a;
  text-align: center;
}

/* Report Card */
.mod-report-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 14px;
  border-left: 3px solid #2a2a2a;
  transition: all 0.2s ease;
}

.mod-report-card:hover {
  border-color: #3a3a3a;
}

.mod-report-card.high-risk {
  border-left-color: #ef4444;
}

.mod-report-card.suspicious {
  border-left-color: #f59e0b;
}

.mod-report-card.ok {
  border-left-color: #22c55e;
}

.mod-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.mod-report-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mod-report-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #71717a;
}

.mod-report-dot.high-risk { background: #ef4444; }
.mod-report-dot.suspicious { background: #f59e0b; }
.mod-report-dot.ok { background: #22c55e; }

.mod-report-status {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
}

.mod-report-status.high-risk { color: #ef4444; }
.mod-report-status.suspicious { color: #f59e0b; }
.mod-report-status.ok { color: #22c55e; }

.mod-report-key {
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
}

.mod-report-time {
  font-size: 12px;
  color: #71717a;
}

.mod-report-summary {
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Report Actions */
.mod-report-actions {
  display: flex;
  gap: 8px;
}

.mod-action-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #1f1f1f;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-action-btn:hover {
  border-color: #3a3a3a;
  color: #fafafa;
}

.mod-action-btn.primary {
  background: #da7756;
  border-color: #da7756;
  color: #fff;
}

.mod-action-btn.primary:hover {
  background: #e08a6a;
}

.mod-action-btn.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* History Item */
.mod-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-history-item:hover {
  border-color: #3a3a3a;
}

.mod-history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mod-history-dot.high-risk { background: #ef4444; }
.mod-history-dot.suspicious { background: #f59e0b; }
.mod-history-dot.ok { background: #22c55e; }

.mod-history-key {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #fafafa;
}

.mod-history-status {
  font-size: 12px;
  color: #71717a;
}

.mod-history-time {
  font-size: 12px;
  color: #71717a;
}

.mod-history-action {
  font-size: 11px;
  padding: 2px 8px;
  background: #2a2a2a;
  border-radius: 4px;
  color: #71717a;
}

/* Confirm Modal */
.mod-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mod-confirm-modal.hidden {
  display: none;
}

.mod-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
}

.mod-confirm-sheet {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  padding: 24px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mod-confirm-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 28px;
}

.mod-confirm-icon.ignore {
  background: rgba(34, 197, 94, 0.1);
}

.mod-confirm-icon.block {
  background: rgba(239, 68, 68, 0.1);
}

.mod-confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #fafafa;
  text-align: center;
  margin-bottom: 8px;
}

.mod-confirm-desc {
  font-size: 14px;
  color: #a1a1aa;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 24px;
}

.mod-confirm-actions {
  display: flex;
  gap: 10px;
}

.mod-confirm-btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-confirm-btn.cancel {
  background: #2a2a2a;
  border: none;
  color: #a1a1aa;
}

.mod-confirm-btn.cancel:hover {
  background: #3a3a3a;
  color: #fafafa;
}

.mod-confirm-btn.confirm {
  background: #da7756;
  border: none;
  color: #fff;
}

.mod-confirm-btn.confirm:hover {
  background: #e08a6a;
}

.mod-confirm-btn.confirm.danger {
  background: #ef4444;
}

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

/* Fix spacing from tabs */
.section-content {
  margin-top: 16px;
}

/* Fix section header spacing */
.section-header {
  margin-top: 16px;
}

/* Timer Block */
.mod-timer-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  margin-bottom: 16px;
}

.mod-timer-label {
  font-size: 12px;
  color: #71717a;
}

.mod-timer-value {
  font-size: 20px;
  font-weight: 700;
  color: #da7756;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

.mod-timer-btn {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-timer-btn:hover {
  border-color: #da7756;
  color: #da7756;
}

.mod-timer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mod-timer-btn.running {
  border-color: #22c55e;
  color: #22c55e;
}

/* Compact Timer */
.mod-timer-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  margin-bottom: 16px;
}

.mod-timer-compact .mod-timer-label {
  font-size: 13px;
  color: #71717a;
}

.mod-timer-compact .mod-timer-value {
  font-size: 16px;
  font-weight: 700;
  color: #da7756;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

.mod-timer-icon-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #71717a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-timer-icon-btn:hover {
  border-color: #da7756;
  color: #da7756;
}

.mod-timer-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mod-timer-icon-btn.running {
  border-color: #22c55e;
  color: #22c55e;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Gate — access denied page */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  padding: 20px;
}
.gate.hidden { display: none; }
.gate-content { text-align: center; max-width: 320px; }
.gate-icon { margin-bottom: 24px; opacity: 0.7; }
.gate-title { font-size: 24px; font-weight: 700; color: #e0e0e0; margin-bottom: 10px; }
.gate-text { font-size: 15px; color: #888; line-height: 1.6; }
.gate-text strong { color: #D97757; font-weight: 600; }
