/* ================================================================
   YouthSMM Panel - Shared Styles
   Telegram Mini App Design Language
   ================================================================ */

/* ── CSS Variables (Telegram Theme) ── */
:root {
  --tg-bg: var(--tg-theme-bg-color, #17212b);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #232e3c);
  --tg-text: var(--tg-theme-text-color, #f5f5f5);
  --tg-hint: var(--tg-theme-hint-color, #708499);
  --tg-link: var(--tg-theme-link-color, #5288c1);
  --tg-button: var(--tg-theme-button-color, #5288c1);
  --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
  --tg-header-bg: var(--tg-theme-header_bg_color, #17212b);
  --tg-accent: var(--tg-theme-accent-text-color, #5288c1);
  --tg-section-bg: var(--tg-theme-section-bg-color, #1e2c3a);
  --tg-section-header: var(--tg-theme-section-header-text-color, #708499);
  --tg-destructive: var(--tg-theme-destructive-text-color, #ec3942);
  --tg-subtitle: var(--tg-theme-subtitle-text-color, #708499);

  /* Custom panel colors */
  --panel-card-bg: var(--tg-secondary-bg);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  --panel-radius: 12px;
  --panel-radius-sm: 8px;
  --panel-radius-lg: 16px;

  --green: #3fb950;
  --red: #ec3942;
  --yellow: #f0a500;
  --orange: #f07800;
  --blue: var(--tg-button);
  --purple: #9b59b6;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

/* ── Light Mode Override ── */
@media (prefers-color-scheme: light) {
  :root {
    --tg-bg: var(--tg-theme-bg-color, #ffffff);
    --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #f4f4f5);
    --tg-text: var(--tg-theme-text-color, #000000);
    --tg-hint: var(--tg-theme-hint-color, #999999);
    --tg-link: var(--tg-theme-link-color, #2678b6);
    --tg-button: var(--tg-theme-button-color, #2678b6);
    --panel-border: rgba(0, 0, 0, 0.08);
    --panel-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  }
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--tg-bg);
  color: var(--tg-text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: var(--font);
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Layout ── */
.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  padding: 0 16px;
}

/* ── Header ── */
.app-header {
  background: var(--tg-header-bg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--panel-border);
}

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

.app-header .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--tg-button), var(--purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.app-header h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-text);
}

.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tg-button), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

/* ── Balance Card ── */
.balance-card {
  background: linear-gradient(135deg, var(--tg-button) 0%, var(--purple) 100%);
  border-radius: var(--panel-radius-lg);
  padding: 20px;
  margin: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--panel-shadow);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: 60px;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.balance-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.btn-balance-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--panel-radius-sm);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.btn-balance-action:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Tab Navigation ── */
.tab-nav {
  display: flex;
  background: var(--tg-bg);
  border-bottom: 1px solid var(--panel-border);
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 57px;
  z-index: 90;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-hint);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.tab-btn.active {
  color: var(--tg-button);
  border-bottom-color: var(--tg-button);
}

.tab-btn:hover:not(.active) {
  color: var(--tg-text);
}

.tab-content {
  display: none;
  padding: 16px;
  flex: 1;
}

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

/* ── Search Box ── */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--tg-text);
  font-size: 14px;
  transition: border-color var(--transition);
}

.search-box input:focus {
  border-color: var(--tg-button);
}

.search-box input::placeholder {
  color: var(--tg-hint);
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tg-hint);
  font-size: 16px;
  pointer-events: none;
}

/* ── Category Pills ── */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--tg-secondary-bg);
  color: var(--tg-hint);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}

.pill.active {
  background: var(--tg-button);
  color: var(--tg-button-text);
  border-color: var(--tg-button);
}

.pill:hover:not(.active) {
  color: var(--tg-text);
  border-color: var(--tg-hint);
}

/* ── Service Cards ── */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-card {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--tg-button);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(82, 136, 193, 0.2);
}

.service-card:active {
  transform: translateY(0);
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.service-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-text);
  line-height: 1.4;
  flex: 1;
}

.service-category-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(82, 136, 193, 0.15);
  color: var(--tg-button);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.service-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.service-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--tg-hint);
}

.service-meta-item .value {
  font-weight: 600;
  color: var(--tg-text);
}

.service-rate {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

/* ── Order Form Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--tg-bg);
  border-radius: var(--panel-radius-lg) var(--panel-radius-lg) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition);
  padding: 20px 16px 32px;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tg-secondary-bg);
  border: none;
  color: var(--tg-hint);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--tg-button);
  color: white;
}

.drag-handle {
  width: 36px;
  height: 4px;
  background: var(--panel-border);
  border-radius: 2px;
  margin: -8px auto 16px;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-hint);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius-sm);
  color: var(--tg-text);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--tg-button);
  box-shadow: 0 0 0 3px rgba(82, 136, 193, 0.15);
}

.form-input::placeholder {
  color: var(--tg-hint);
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23708499' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-hint {
  font-size: 12px;
  color: var(--tg-hint);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--panel-radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--tg-button);
  color: var(--tg-button-text);
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(82, 136, 193, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--tg-secondary-bg);
  color: var(--tg-text);
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
  border-color: var(--tg-button);
  color: var(--tg-button);
}

.btn-danger {
  background: rgba(236, 57, 66, 0.15);
  color: var(--red);
  border: 1px solid rgba(236, 57, 66, 0.3);
}

.btn-danger:hover {
  background: var(--red);
  color: white;
}

.btn-success {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.btn-success:hover {
  background: var(--green);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
}

/* ── Order Cards ── */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 14px;
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-id {
  font-size: 12px;
  font-family: monospace;
  color: var(--tg-hint);
  background: var(--tg-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending { background: rgba(240, 165, 0, 0.15); color: var(--yellow); }
.status-processing { background: rgba(82, 136, 193, 0.15); color: var(--blue); }
.status-inprogress { background: rgba(82, 136, 193, 0.15); color: var(--blue); }
.status-completed { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.status-partial { background: rgba(240, 120, 0, 0.15); color: var(--orange); }
.status-cancelled { background: rgba(236, 57, 66, 0.15); color: var(--red); }
.status-failed { background: rgba(236, 57, 66, 0.15); color: var(--red); }
.status-refunded { background: rgba(155, 89, 182, 0.15); color: var(--purple); }

.order-service-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.order-link {
  font-size: 12px;
  color: var(--tg-link);
  margin-bottom: 8px;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.order-meta-item {
  font-size: 12px;
  color: var(--tg-hint);
}

.order-meta-item span {
  font-weight: 600;
  color: var(--tg-text);
}

.order-progress {
  margin-top: 10px;
  background: var(--tg-bg);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
}

.order-progress-bar {
  height: 100%;
  background: var(--tg-button);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 16px;
  text-align: center;
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--tg-text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--tg-hint);
}

/* ── Table (Admin) ── */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--panel-radius);
  border: 1px solid var(--panel-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--tg-secondary-bg);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--tg-text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(82, 136, 193, 0.05);
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-text);
}

.section-count {
  font-size: 12px;
  color: var(--tg-hint);
  background: var(--tg-secondary-bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Loading States ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  flex-direction: column;
  gap: 12px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--panel-border);
  border-top-color: var(--tg-button);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-text {
  font-size: 14px;
  color: var(--tg-hint);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-text);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--tg-hint);
  line-height: 1.5;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--tg-text);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--panel-shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--yellow); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}

/* ── Price Summary Box ── */
.price-summary {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius-sm);
  padding: 14px;
  margin: 16px 0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 4px 0;
}

.price-row.total {
  border-top: 1px solid var(--panel-border);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
  font-weight: 700;
}

.price-row .label {
  color: var(--tg-hint);
}

.price-row .value {
  color: var(--tg-text);
  font-weight: 500;
}

.price-row.total .value {
  color: var(--green);
}

/* ── Add Money Form ── */
.amount-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.preset-btn {
  padding: 10px;
  border-radius: var(--panel-radius-sm);
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  color: var(--tg-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.preset-btn:hover, .preset-btn.selected {
  background: var(--tg-button);
  border-color: var(--tg-button);
  color: var(--tg-button-text);
}

/* ── Admin API Card ── */
.api-card {
  background: var(--tg-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 14px;
  margin-bottom: 10px;
}

.api-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.api-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-text);
}

.api-url {
  font-size: 12px;
  color: var(--tg-hint);
  margin-bottom: 4px;
  word-break: break-all;
}

.api-key-masked {
  font-size: 12px;
  color: var(--tg-hint);
  font-family: monospace;
}

/* ── Textarea ── */
textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ── Access Denied ── */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 24px;
}

.access-denied-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.access-denied h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--red);
}

.access-denied p {
  font-size: 15px;
  color: var(--tg-hint);
  line-height: 1.6;
}

/* ── Service Info Box ── */
.service-info-box {
  background: rgba(82, 136, 193, 0.08);
  border: 1px solid rgba(82, 136, 193, 0.2);
  border-radius: var(--panel-radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.service-info-box .service-info-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-text);
  margin-bottom: 6px;
}

.service-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-info-meta-item {
  font-size: 13px;
  color: var(--tg-hint);
}

.service-info-meta-item strong {
  color: var(--tg-text);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--panel-border);
  margin: 16px 0;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  background: var(--red);
  color: white;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.pagination .btn {
  padding: 8px 14px;
  font-size: 13px;
}

.pagination .page-info {
  font-size: 13px;
  color: var(--tg-hint);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tg-hint);
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-hint { color: var(--tg-hint); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.text-warning { color: var(--yellow); }
.text-primary { color: var(--tg-button); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 17px; }
.font-mono { font-family: monospace; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .balance-amount { font-size: 26px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .amount-presets { grid-template-columns: repeat(3, 1fr); }
  .tab-btn { padding: 10px 12px; font-size: 13px; }
}

@media (min-width: 481px) {
  .app-wrapper {
    border-left: 1px solid var(--panel-border);
    border-right: 1px solid var(--panel-border);
  }
}
