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

:root {
  --black:   #191A23;
  --green:   #B9FF66;
  --white:   #ffffff;
  --gray-bg: #F3F3F3;
  --gray-lt: #e8e8e8;
  --gray-md: #9CA3AF;

  --primary:       var(--black);
  --primary-hover: #2d2e3a;
  --danger:  #dc2626;
  --warning: #d97706;
  --success: #16a34a;

  --bg:      var(--gray-bg);
  --surface: var(--white);
  --border:  var(--gray-lt);
  --text:    var(--black);
  --text-muted: var(--gray-md);
  --radius:  10px;
  --shadow:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'PingFang SC',
               'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── App layout ── */
.app-layout { display: flex; flex: 1; min-height: 0; }

/* ═══════════════════════════════════════
   SIDEBAR  (dark)
═══════════════════════════════════════ */
.sidebar {
  width: 220px;
  background: var(--black);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .25s ease;
  overflow: hidden;
  z-index: 50;
}
.sidebar.collapsed { width: 64px; }

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 14px 14px;
  flex-shrink: 0;
}
.logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  letter-spacing: -.5px;
  transition: opacity .2s, max-width .25s;
  overflow: hidden;
}
.sidebar.collapsed .logo { flex: none; }
.sidebar.collapsed .logo-text { display: none; }
.sidebar.collapsed .sidebar-top { justify-content: center; }

/* ── Logo preview (temp) ── */
.logo-preview-stack { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 8px; }
.lps-item { display: flex; align-items: center; gap: 10px; }
.lps-num { color: var(--green); font-size: 11px; font-weight: 700; min-width: 12px; flex-shrink: 0; }
.lps-logo { font-size: 20px; max-width: none; }
.lps-ph { background: var(--green); color: var(--black); font-weight: 700; padding: 0 6px; border-radius: 5px; letter-spacing: -.5px; }
.lps-ph-outline { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }

/* ── Logo badge ── */
.logo-badge { display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: var(--black); font-size: 11px; font-weight: 900; width: 21px; height: 16px; border-radius: 4px; letter-spacing: 0; vertical-align: middle; margin-right: 3px; flex-shrink: 0; }
.logo-pal { color: var(--green); }

.sidebar-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  width: 24px; height: 24px;
  cursor: pointer;
  font-size: 10px;
  color: rgba(255,255,255,.98);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.16); color: #fff; }

.sidebar-new {
  margin: 0 12px 16px;
  width: calc(100% - 24px);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-shrink: 0;
  padding-left: 46.5px !important;
  overflow: hidden;
  gap: 6px;
  background: var(--green) !important;
  color: var(--black) !important;
  border-color: var(--green) !important;
  font-weight: 700;
  border-radius: 10px;
}
.sidebar-new:hover { background: #a8ef55 !important; border-color: #a8ef55 !important; }
.sidebar-new-plus { font-size: 20px; line-height: 1; }
.sidebar-new-label { white-space: nowrap; transition: opacity .15s, width .15s; }
.sidebar.collapsed .sidebar-new-label { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-new { width: 36px; height: 36px; margin: 0 auto 8px; padding: 0 !important; display: flex; align-items: center; justify-content: center; background: transparent !important; border: 2px solid var(--green) !important; border-radius: 8px; }
.sidebar.collapsed .sidebar-new .sidebar-new-plus { color: var(--green); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0; height: 36px; width: 40px; margin-left: auto; margin-right: auto; background: none; }
.sidebar.collapsed .nav-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: var(--black); width: 36px; height: 36px; border-radius: 8px; font-size: 17px; }
.sidebar.collapsed .nav-item.active { background: none; }
.sidebar.collapsed .nav-item.active .nav-icon { background: var(--green); color: var(--black); }

.sidebar-nav { flex: 1; padding: 0 8px; overflow-y: auto; }
.nav-divider { height: 1px; background: rgba(255,255,255,.12); margin: 8px 4px; }
.sidebar.collapsed .nav-divider { margin: 8px auto; width: 36px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: rgba(255,255,255,.8);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.nav-item.active {
  background: var(--green);
  color: var(--black);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--black); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.nav-icon i { color: inherit; }
.nav-label { transition: opacity .15s; overflow: hidden; }
.sidebar.collapsed .nav-label { opacity: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }

/* ── Topbar ── */
.main-area {
  display: flex; flex-direction: column;
  flex: 1; min-width: 0; overflow: hidden;
}
.topbar {
  height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 24px; gap: 8px; flex-shrink: 0;
  box-shadow: var(--shadow);
}

/* ── Main ── */
main { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 12px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.select-all-wrap {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; cursor: pointer; font-size: 13px;
}
.batch-section {
  display: flex; align-items: center; gap: 8px;
  background: #fefce8;
  border: 1.5px solid #fde047;
  border-radius: var(--radius);
  padding: 6px 12px;
}
.batch-section span { color: #854d0e; font-weight: 600; white-space: nowrap; }
.batch-section input { width: 130px; }
.export-label { color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--gray-bg); border-color: #ccc; }

.btn-danger  { background: var(--danger);  color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #b91c1c; border-color: #b91c1c; }
.btn-delete { background: #6b7280; color: #fff; border-color: #6b7280; }
.btn-delete:hover { background: #4b5563; border-color: #4b5563; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #b45309; }

/* Batch export — green accent */
.btn-batch-export {
  background: var(--green);
  color: var(--black);
  border-color: var(--green);
  font-weight: 700;
}
.btn-batch-export:hover { background: #a8ef55; border-color: #a8ef55; }

/* Lang button */
.btn-lang {
  background: var(--surface);
  color: var(--black);
  border-color: var(--border);
  font-weight: 700;
  min-width: 52px;
}
.btn-lang:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* Export dropdown button */
.btn-export {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  padding: 7px 12px;
}
.btn-export:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.btn-icon { padding: 5px 9px; font-size: 13px; }

/* Export format buttons */
.btn-export-fmt {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  font-weight: 700;
}
.btn-export-fmt:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* Category filter buttons */
.cat-filter-btn { padding: 4px 12px; font-size: 12px; border-radius: 999px; }
.cat-filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ═══════════════════════════════════════
   TABLE
═══════════════════════════════════════ */
.table-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--black); }
thead th {
  padding: 12px 14px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: none;
  white-space: nowrap;
}
.col-check { width: 40px; text-align: center; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f9fafb; }
tbody tr.selected { background: #f0fdf4; }
td { padding: 12px 14px; vertical-align: middle; text-align: center; }

/* rate cell */
.rate-cell {
  font-weight: 600;
  font-size: 14px;
  color: var(--black);
}

/* badges */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 500;
}
.badge-yes { background: var(--green); color: var(--black); }
.badge-no  { background: var(--gray-bg); color: var(--gray-md); border: 1px solid var(--border); }

.actions  { display: flex; gap: 6px; justify-content: center; }
tr:has(.empty-state) { display: block; width: 100%; }
.empty-state { display: block; width: 100%; text-align: center; color: var(--text-muted); padding: 48px 0; font-size: 15px; }

/* Group header */
tr.group-header td {
  background: var(--gray-bg);
  font-weight: 600;
  font-size: 12px;
  color: var(--black);
  padding: 8px 14px;
  border-top: 2px solid var(--border);
  letter-spacing: .2px;
}
.group-count {
  font-weight: 500; font-size: 11px; color: var(--gray-md);
  background: var(--border); border-radius: 999px;
  padding: 1px 8px; margin-left: 6px;
}

/* View select */
.select-view {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  height: 34px;
  min-width: 110px;
  font-family: inherit;
}
.select-view:focus { outline: none; border-color: var(--black); }
.select-view:hover { border-color: #aaa; }

.toolbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}
.search-input {
  padding: 6px 10px 6px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  width: 180px;
  transition: border-color .15s, width .2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--black);
  width: 220px;
}
.search-input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════
   MODAL
═══════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(25,26,35,.5);
  z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%; max-width: 560px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  animation: slideUp .2s ease;
  padding: 28px;
}
.modal-sm { max-width: 380px; }
.modal-md { max-width: 480px; }
.modal-lg { max-width: 680px; }

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.modal-close {
  background: var(--gray-bg); border: none;
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 18px; cursor: pointer;
  color: var(--text-muted); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ── Form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group-full { grid-column: 1 / -1; }
.form-group label {
  display: block; margin-bottom: 5px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
}
.req { color: var(--danger); }
.form-group input,
.form-group textarea,
.form-group select,
.batch-section input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  background: var(--surface);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.batch-section input:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(25,26,35,.08);
}
.form-group textarea { resize: vertical; }
.form-group select { cursor: pointer; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.checkbox-label input { width: auto; }

/* ── Logs ── */
.logs-content { max-height: 480px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.log-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.log-item:last-child { border-bottom: none; }
.log-time { display: flex; flex-direction: column; gap: 2px; min-width: 80px; padding-top: 2px; }
.log-date { font-size: 12px; font-weight: 600; color: var(--text); }
.log-clock { font-size: 11px; color: var(--text-muted); }
.log-body { flex: 1; }
.log-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.log-detail { font-size: 12px; color: var(--text-muted); }
.log-detail .old { color: #dc2626; text-decoration: line-through; }
.log-detail .arrow { margin: 0 4px; color: #94a3b8; }
.log-detail .new { color: #16a34a; }
.log-action {
  display: inline-block; padding: 3px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 500;
  white-space: nowrap;
}
.log-action.created      { background: var(--green); color: var(--black); }
.log-action.updated      { background: #dbeafe; color: #1e40af; }
.log-action.deleted      { background: #fee2e2; color: #991b1b; }
.log-action.batch_adjusted { background: #fef3c7; color: #92400e; }
.log-revert-btn { margin-left: auto; flex-shrink: 0; margin-right: 8px; }
.logs-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ── Export preview ── */
.export-preview-banner {
  background: #fefce8; border: 1.5px solid #fde047;
  border-radius: var(--radius); color: #854d0e;
  font-size: 12px; padding: 8px 12px; margin-bottom: 12px;
}
.export-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.export-cat-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.export-select-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.selected-count { font-size: 12px; color: var(--text-muted); }
.export-product-list {
  list-style: none; max-height: 280px; overflow-y: auto;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  margin-bottom: 4px;
}
.export-product-item { border-bottom: 1px solid var(--border); }
.export-product-item:last-child { border-bottom: none; }
.export-product-item:hover { background: var(--gray-bg); }
.export-product-item.is-adjusted { background: #fefce8; }
.export-product-item.is-adjusted:hover { background: #fef9c3; }
.export-product-item.is-adjusted .export-item-meta { color: #854d0e; font-weight: 700; }
.export-item-label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; width: 100%; }
.export-item-label input { flex-shrink: 0; }
.export-item-name { flex: 1; font-size: 13px; font-weight: 600; }
.export-item-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── Category management ── */
.cat-add-row { display: flex; gap: 8px; margin-bottom: 14px; }
.cat-add-row input {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px;
}
.cat-add-row input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(25,26,35,.08); }
.cat-list {
  list-style: none; max-height: 320px; overflow-y: auto;
  border: 1.5px solid var(--border); border-radius: var(--radius);
}
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { background: var(--gray-bg); }
.cat-name { font-size: 14px; font-weight: 500; }
.cat-actions { display: flex; gap: 6px; }
.cat-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════
   LOGIN  —  split layout
═══════════════════════════════════════ */
.login-overlay {
  display: none; position: fixed; inset: 0;
  z-index: 999;
  flex-direction: row;
  background: var(--surface);
}
.login-overlay.open { display: flex; }

/* ── Left brand panel ── */
.login-brand {
  width: 42%;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.login-brand-logo {
  font-size: 48px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  line-height: 1;
}
/* green underline accent on logo */
.login-brand-logo::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin-top: 12px;
}
.login-brand-tagline {
  font-size: 15px;
  color: rgba(255,255,255,.45);
  line-height: 1.7;
  max-width: 240px;
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

/* decorative circles */
.login-brand-deco { position: absolute; inset: 0; pointer-events: none; }
.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--green);
  opacity: .08;
}
.deco-c1 { width: 360px; height: 360px; right: -140px; top: -100px; }
.deco-c2 { width: 220px; height: 220px; right: 20px;   bottom: 40px; opacity: .05; }
.deco-c3 { width: 120px; height: 120px; left: 20px;    bottom: -40px; opacity: .10; }

/* ── Right form panel ── */
.login-card {
  flex: 1;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 52px;
  overflow-y: auto;
}

/* constrain form content width */
.login-card-header,
#loginView,
#registerView,
#pendingView {
  width: 100%;
  max-width: 380px;
}
.login-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.login-logo {
  font-size: 26px; font-weight: 700;
  color: var(--black); letter-spacing: -.5px;
  line-height: 1.2;
}
/* green pill tag below the heading */
.login-logo::after {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin-top: 8px;
  margin-bottom: 16px;
}
.btn-login {
  width: 100%; justify-content: center;
  padding: 12px; font-size: 14px; margin-top: 6px;
  background: var(--black); color: var(--white);
  border-color: var(--black); border-radius: var(--radius);
  font-weight: 600;
}
.btn-login:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.login-error {
  background: #fee2e2; color: #991b1b;
  border-radius: var(--radius); padding: 8px 12px;
  font-size: 13px; margin-bottom: 12px;
}

/* mobile: stack vertically */
@media (max-width: 640px) {
  .login-overlay { flex-direction: column; }
  .login-brand { width: 100%; padding: 36px 28px; min-height: 180px; }
  .login-brand-logo { font-size: 32px; }
  .login-card { padding: 36px 28px; }
}

/* Password eye toggle */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { flex: 1; padding-right: 40px; }
.btn-eye {
  position: absolute; right: 8px;
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-muted); display: flex; align-items: center; line-height: 0;
}
.btn-eye:hover { color: var(--text); }
.btn-eye svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Register / Auth */
.login-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.login-switch a { color: var(--black); font-weight: 700; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }
.register-title { font-size: 17px; font-weight: 600; margin-bottom: 20px; text-align: center; }
.pending-icon { font-size: 40px; text-align: center; margin-bottom: 16px; }
.pending-msg { text-align: center; color: var(--text); line-height: 1.6; margin-bottom: 20px; font-size: 14px; }

/* ── Badge count ── */
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  padding: 0 5px; margin-left: 4px;
}

/* ── Users management ── */
.users-content { max-height: 480px; overflow-y: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th {
  padding: 10px 14px; text-align: center;
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .4px;
  border-bottom: none; background: var(--black);
}
.users-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: center; }
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: var(--gray-bg); }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-approved { background: var(--green); color: var(--black); }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.users-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ═══════════════════════════════════════
   MOBILE  (≤ 640px)
═══════════════════════════════════════ */
@media (max-width: 640px) {

  /* Sidebar: fixed overlay, slides in/out */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 150;
    width: 220px !important;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.35);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  /* collapsed on desktop = hidden on mobile */
  .sidebar.collapsed {
    transform: translateX(-100%);
    width: 220px !important;
  }

  /* dim overlay when sidebar open */
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 140;
  }
  .sidebar-backdrop.show { display: block; }

  /* Topbar: hamburger on left */
  .topbar {
    justify-content: space-between;
    padding: 0 16px;
  }
  .btn-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
  }
  .btn-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  /* Main area: full width */
  .main-area { width: 100%; }

  /* Main padding */
  main { padding: 12px; }

  /* Table: horizontal scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 580px; }

  /* Toolbar: stack */
  .toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .toolbar-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; row-gap: 8px; }
  .search-wrap { width: 100%; order: 1; }
  .search-input, .search-input:focus { width: 100%; }
  #dividerSearch { display: none; }

  /* Forms: single column */
  .form-grid { grid-template-columns: 1fr; }

  /* Modals: full width */
  .modal { margin: 16px; width: calc(100% - 32px); padding: 20px; }
  .modal-lg, .modal-md, .modal-sm { max-width: calc(100% - 32px); }

  /* Toast: full width on mobile */
  .toast-notif { left: 12px; right: 12px; top: 12px; min-width: unset; max-width: unset; }
}

/* ── Telegram notification settings ── */
.notif-settings-body { padding: 4px 0 8px; }
.notif-token-status { font-size: 12px; padding: 8px 12px; border-radius: 6px; }
.notif-token-status.status-ok   { background: rgba(74,222,128,.12); color: #4ade80; }
.notif-token-status.status-warn { background: rgba(251,191,36,.1);  color: #fbbf24; }
.notif-hint { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 6px; line-height: 1.5; }

/* ── Toast notification ── */
.toast-notif {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid rgba(255,255,255,.12);
  border-left: 3px solid var(--green); border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  min-width: 280px; max-width: 320px;
  animation: toastSlideIn .3s ease;
}
@keyframes toastSlideIn {
  from { transform: translateX(calc(100% + 24px)); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-notif.hiding {
  animation: toastSlideOut .3s ease forwards;
}
@keyframes toastSlideOut {
  to { transform: translateX(calc(100% + 24px)); opacity: 0; }
}
.toast-icon { color: var(--green); font-size: 18px; flex-shrink: 0; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { color: var(--text); font-size: 13px; font-weight: 600; }
.toast-sub { color: rgba(255,255,255,.45); font-size: 11px; margin-top: 2px; }
.toast-btn {
  background: var(--green); color: var(--black); border: none;
  border-radius: 5px; padding: 4px 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
}
.toast-btn:hover { opacity: .85; }
.toast-close {
  background: none; border: none; color: rgba(255,255,255,.4);
  font-size: 18px; cursor: pointer; padding: 0 2px; flex-shrink: 0; line-height: 1;
}
.toast-close:hover { color: rgba(255,255,255,.8); }
