* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #111111);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f0f0f0);
  color: var(--tg-theme-text-color, #111111);
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
}

.hidden {
  display: none !important;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid var(--tg-theme-hint-color, #cccccc);
  background: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #111111);
  font-size: 14px;
}

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

button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}

button:active {
  opacity: 0.8;
}

.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-wrap;
}

.result.ok {
  background: rgba(50, 180, 90, 0.15);
}

.result.warn {
  background: rgba(220, 60, 60, 0.15);
}

.pending-card {
  border: 1px solid var(--tg-theme-hint-color, #cccccc);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.pending-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pending-card .actions button {
  margin-bottom: 0;
}

.btn-approve {
  background: #34a853 !important;
}

.btn-reject {
  background: #ea4335 !important;
}

.row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.row input {
  flex: 1;
}

.row button {
  width: auto;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--tg-theme-secondary-bg-color, #e0e0e0) !important;
  color: var(--tg-theme-text-color, #111111) !important;
}

.or-divider {
  text-align: center;
  font-size: 12px;
  color: var(--tg-theme-hint-color, #888888);
  margin: -4px 0 10px;
}

.hint {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #888888);
  line-height: 1.4;
}

.file-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--tg-theme-text-color, #111111);
}

.files-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--tg-theme-secondary-bg-color, #f0f0f0);
  font-size: 12px;
  max-width: 100%;
}

.file-chip .remove-file {
  cursor: pointer;
  font-weight: bold;
  color: #ea4335;
}
