html { color-scheme: dark; }
/* components.css — Badges, buttons, cards, toast, modal, tabel, form */

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: 1px solid var(--glass-border); border-radius: var(--r-sm);
  background: var(--bg-3); color: var(--text); cursor: pointer; font-weight: 600;
  font-size: 14px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; text-decoration: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn:hover { background: var(--bg-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--brand-gradient); border: none; color: #fff; box-shadow: 0 4px 15px rgba(229,9,20,0.3); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 6px 20px rgba(229,9,20,0.4); }
.btn-success { background: linear-gradient(135deg, var(--ok), #059669); border: none; color: #fff; }
.btn-warn { background: var(--accent-gradient); border: none; color: #1a1a1a; box-shadow: 0 4px 15px rgba(245,158,11,0.3); }
.btn-danger { background: linear-gradient(135deg, var(--err), #dc2626); border: none; color: #fff; }
.btn-info { background: linear-gradient(135deg, var(--info), #2563eb); border: none; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-3); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.btn-block { width: 100%; }

/* =================== BADGES =================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid var(--glass-border);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(16,185,129,0.2); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245,158,11,0.2); }
.badge-err { background: var(--err-soft); color: var(--err); border-color: rgba(239,68,68,0.2); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: rgba(59,130,246,0.2); }
.badge-muted { background: var(--bg-3); color: var(--text-2); }
.badge-premium { background: rgba(255, 184, 0, 0.15); color: var(--tier-premium); border-color: rgba(255,184,0,0.3); box-shadow: 0 0 10px rgba(255,184,0,0.2); }
.badge-standard { background: rgba(59, 130, 246, 0.15); color: var(--tier-standard); border-color: rgba(59,130,246,0.3); }
.badge-basic { background: rgba(16, 185, 129, 0.15); color: var(--tier-basic); border-color: rgba(16,185,129,0.3); }
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(229,9,20,0.3); }

.badge-owner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.3));
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  animation: glow-owner 2s infinite alternate;
  font-weight: 800;
  letter-spacing: 1px;
}
@keyframes glow-owner {
  from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
  to { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 10px rgba(255, 165, 0, 0.6); filter: brightness(1.2); }
}

.tier-Premium, .tier-premium { color: var(--tier-premium); text-shadow: 0 0 10px rgba(255,184,0,0.4); font-weight: bold; }
.tier-Standard, .tier-standard { color: var(--tier-standard); font-weight: bold; }
.tier-Basic, .tier-basic { color: var(--tier-basic); font-weight: bold; }

/* =================== CARD =================== */
.card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 24px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow); transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.card-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }

/* Stat card */
.stat-card { 
  background: var(--bg-card); border: 1px solid var(--glass-border); 
  border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 8px; 
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow); transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); box-shadow: var(--shadow); }
.stat-card .stat-icon { font-size: 26px; margin-bottom: 4px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.stat-card .stat-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; }

/* =================== FORM =================== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text);
  transition: border 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand);
}
.form-textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* =================== TOAST =================== */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-left: 4px solid var(--info); border-radius: var(--r-sm);
  padding: 12px 16px; box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.toast-msg { font-size: 13px; color: var(--text-2); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }

/* =================== MODAL =================== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px); z-index: 1000; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.15s;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s;
}
.modal-lg { max-width: 800px; }
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-close { background: none; border: none; color: var(--text-2); font-size: 22px; cursor: pointer; padding: 0 6px; }
.modal-close:hover { color: var(--text); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { transform: translateY(-20px); opacity: 0; } }

/* =================== SLIDER =================== */
.slider-x {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding-bottom: 8px;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.slider-x::-webkit-scrollbar { height: 6px; }
.slider-x::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.slider-x > * {
  flex: 0 0 85%;
  scroll-snap-align: center;
}
@media (min-width: 768px) {
  .slider-x { display: grid; grid-template-columns: repeat(2, 1fr); overflow-x: visible; scroll-snap-type: none; gap: 20px; margin: 0; padding: 0; }
  .slider-x > * { flex: auto; }
}

/* =================== TABLE =================== */
.table-wrap { overflow-x: auto; overflow-y: auto; max-height: calc(100vh - 210px); border: 1px solid var(--border); border-radius: var(--r); }
table.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th, .data-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--bg-2); font-weight: 700; color: var(--text-2);
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;
  position: sticky; top: 0; z-index: 10; background: #14141c; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
}
.data-table tbody tr:hover { background: var(--bg-2); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* =================== TABS =================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 11px 18px; background: none; border: none; color: var(--text-2);
  cursor: pointer; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* =================== MISC =================== */
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border-2);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty-state-icon { font-size: 42px; margin-bottom: 10px; }

.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv-key { color: var(--text-2); }
.kv-val { font-weight: 600; text-align: right; word-break: break-word; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }


/* =================== GALLERY SLIDER =================== */
.gallery-slider {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  gap: 20px; padding-bottom: 12px; margin-top: 16px;
}
.gallery-slider::-webkit-scrollbar { height: 6px; }
.gallery-slider::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.gallery-slider > * { flex: 0 0 100%; scroll-snap-align: center; }
@media (min-width: 768px) { .gallery-slider > * { flex: 0 0 100%; } }

.form-select option { background: var(--bg-2); color: var(--text); }

