/* ==============================================
   PUPS CLAN MARKET — pups.apatiym.xyz
   ============================================== */

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

:root {
  --bg:            #0e1117;
  --surface:       #161a23;
  --surface-2:     #1d2130;
  --surface-3:     #242940;
  --border:        #272d3f;
  --border-strong: #363d56;
  --text-primary:  #eceef5;
  --text-secondary:#8e95ad;
  --text-muted:    #4e5570;
  --accent:        #d95f5f;
  --accent-2:      #b84444;
  --accent-light:  rgba(217,95,95,0.12);
  --accent-glow:   rgba(217,95,95,0.22);
  --danger:        #e07878;
  --danger-light:  rgba(224,120,120,0.12);
  --warning:       #e0a843;
  --warning-light: rgba(224,168,67,0.12);
  --success:       #5fbf7a;
  --success-light: rgba(95,191,122,0.12);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-pill:   999px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:     0 6px 20px rgba(0,0,0,0.55);
  --shadow-lg:     0 12px 36px rgba(0,0,0,0.65);
  --font:          'Minecraft', 'Inter', -apple-system, sans-serif;
  --tr:            0.15s ease;
}

::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--accent); }
* { scrollbar-color:var(--border-strong) var(--bg); scrollbar-width:thin; }
::selection { background:var(--accent-light); color:var(--accent); }

html { scroll-behavior:smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 14px;
  font-weight: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1,h2,h3,h4,h5,h6,b,strong { font-weight:normal; }
.hidden  { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ШАПКА */
.header {
  background: rgba(22,26,35,0.88);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  height: 38px;
  width: auto;
  max-width: 190px;
  image-rendering: auto;
  object-fit: contain;
  animation: logo-in 0.4s ease both;
}
.nav-area {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: nav-in 0.35s ease both;
  animation-delay: 0.1s;
}
.nav-bundle-icon {
  height: 28px;
  width: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  opacity: 0.85;
  animation: bundle-float 3.5s ease-in-out infinite;
}
.nav-tabs {
  display: flex;
  gap: 3px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.nav-tab {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: background var(--tr), color var(--tr);
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.nav-tab:hover  { background:var(--surface-3); color:var(--text-primary); }
.nav-tab.active { background:var(--accent); color:#fff; }

/* ОСНОВНОЙ КОНТЕЙНЕР */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  flex: 1;
  width: 100%;
}

/* ПОИСК */
.shop-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.shop-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.shop-search-input {
  width: 100%;
  padding: 10px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.shop-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.shop-search-input::placeholder { color:var(--text-muted); }
.shop-search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: color var(--tr);
}
.shop-search-clear:hover { color:var(--text-primary); }

/* КАРТОЧКИ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 7px;
}
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr), background var(--tr);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  user-select: none;
  overflow: hidden;
  height: 76px;
  animation: card-in 0.3s ease both;
}
.item-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm);
  transform: translateX(2px);
}
.item-card.out-of-stock { opacity:0.35; cursor:not-allowed; pointer-events:none; }

.item-img-wrap {
  width: 76px;
  min-width: 76px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--tr);
}
.item-card:hover .item-img-wrap { background:var(--accent-light); }

.item-icon {
  width: 46px;
  height: 46px;
  image-rendering: pixelated;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.item-card:hover .item-icon { transform:scale(1.08); }

.item-icon-fallback {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-strong);
}

.item-info {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.item-name {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.item-price { display:flex; align-items:center; gap:5px; }
.item-price-icon { width:14px; height:14px; image-rendering:pixelated; object-fit:contain; flex-shrink:0; }
.item-price-text { font-size:11px; color:var(--accent); letter-spacing:0.2px; }
.item-stock {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.item-stock.low { background:var(--warning-light); color:var(--warning); border-color:transparent; }
.item-stock.out { background:var(--danger-light);  color:var(--danger);  border-color:transparent; }

.badge-new {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 8px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 1px;
  z-index: 1;
}

.empty-state { grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--text-muted); animation:page-in 0.3s ease both; }
.empty-state-icon { display:flex; justify-content:center; margin-bottom:14px; opacity:0.25; }

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity:1; pointer-events:all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.22s cubic-bezier(0.34,1.3,0.64,1);
}
.modal-overlay.open .modal {
  transform: none;
  animation: modal-in 0.22s cubic-bezier(0.34,1.3,0.64,1) both;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 18px;
}
.modal-item-name { font-size:17px; color:var(--text-primary); }
.modal-item-price-preview { font-size:12px; color:var(--text-muted); margin-top:3px; }

.modal-close {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  transition: color var(--tr), background var(--tr), border-color var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  flex-shrink: 0;
}
.modal-close:hover { color:var(--text-primary); background:var(--surface-2); border-color:var(--border-strong); }

.modal-close-abs {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(22,26,35,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--tr), background var(--tr);
}
.modal-close-abs:hover { color:var(--text-primary); background:var(--surface-3); }

.form-group { margin-bottom:14px; }
.form-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--surface-2);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:hover:not(:focus) { border-color:var(--border-strong); }
.form-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-light); }
.form-input::placeholder { color:var(--text-muted); }
select.form-input option { background:var(--surface); color:var(--text-primary); }

.qty-row { display:flex; gap:8px; align-items:center; }
.qty-row .form-input { width:80px; text-align:center; }
.qty-unit-select { flex:1; }

/* МОДАЛКА ЗАКАЗА */
.modal-order { padding:0; overflow:hidden; max-width:400px; }
.order-item-display {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 22px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  position: relative;
}
.order-item-img-wrap {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-item-img { width:54px; height:54px; image-rendering:pixelated; object-fit:contain; }
.order-item-img-fallback { width:54px; height:54px; display:flex; align-items:center; justify-content:center; color:var(--border-strong); }
.order-item-name { font-size:16px; color:var(--text-primary); line-height:1.2; }
.modal-body { padding:16px 20px 20px; }

.currency-options { display:flex; flex-direction:column; gap:6px; }
.currency-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
  user-select: none;
}
.currency-option:hover   { border-color:var(--border-strong); background:var(--surface-2); }
.currency-option.selected{ border-color:var(--accent); background:var(--accent-light); }

.currency-option-img-wrap {
  width: 36px; height: 36px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.currency-option.selected .currency-option-img-wrap { border-color:var(--accent); background:var(--surface-2); }
.currency-option-img { width:24px; height:24px; image-rendering:pixelated; object-fit:contain; }
.currency-option-info { flex:1; min-width:0; }
.currency-option-qty  { font-size:13px; color:var(--text-primary); }
.currency-option-name { font-size:11px; color:var(--text-secondary); margin-top:1px; }
.currency-option-check {
  width:17px; height:17px;
  border-radius:50%;
  border:2px solid var(--border-strong);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  transition:border-color var(--tr), background var(--tr);
}
.currency-option.selected .currency-option-check { border-color:var(--accent); background:var(--accent); }

.order-total-bar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-total-label { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; }
.order-total-value { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-primary); }
.order-total-value img { width:15px; height:15px; image-rendering:pixelated; object-fit:contain; }

.btn-order {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}
.btn-order:hover:not(:disabled) { background:var(--accent-2); transform:translateY(-1px); box-shadow:0 4px 14px rgba(217,95,95,0.4); }
.btn-order:active:not(:disabled){ transform:none; }
.btn-order:disabled { opacity:0.45; cursor:not-allowed; }

/* МУЛЬТИВАЛЮТА */
.currencies-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.btn-add-currency {
  display:flex; align-items:center; gap:5px;
  padding:4px 12px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-pill); font-size:11px; color:var(--text-secondary);
  cursor:pointer; font-family:var(--font);
  transition:border-color var(--tr), color var(--tr);
}
.btn-add-currency:hover { border-color:var(--accent); color:var(--accent); }
.admin-currencies-list { display:flex; flex-direction:column; gap:6px; }
.currency-admin-row {
  display:flex; align-items:center; gap:8px;
  padding:7px 10px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-md);
}
.currency-admin-item-cell { flex:1; min-width:0; position:relative; }
.currency-admin-item-selected {
  display:flex; align-items:center; gap:8px;
  padding:4px 8px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-sm); cursor:pointer;
  transition:border-color var(--tr);
}
.currency-admin-item-selected:hover { border-color:var(--accent); }
.currency-admin-item-selected img { width:18px; height:18px; image-rendering:pixelated; object-fit:contain; }
.currency-admin-item-selected span { font-size:12px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.currency-admin-item-placeholder {
  display:flex; align-items:center; gap:6px;
  padding:4px 8px;
  background:var(--surface); border:1.5px dashed var(--border-strong);
  border-radius:var(--radius-sm); font-size:11px; color:var(--text-muted); cursor:pointer;
  transition:border-color var(--tr), color var(--tr);
}
.currency-admin-item-placeholder:hover { border-color:var(--accent); color:var(--accent); }
.currency-admin-search-dropdown {
  position:absolute; top:100%; left:0; right:0;
  background:var(--surface); border:1px solid var(--accent); border-top:none;
  border-radius:0 0 var(--radius-sm) var(--radius-sm);
  max-height:180px; overflow-y:auto; z-index:20; box-shadow:var(--shadow-md);
}
.currency-admin-search-input {
  width:100%; padding:8px 10px;
  border:none; border-bottom:1px solid var(--border);
  font-size:12px; font-family:var(--font); outline:none;
  background:var(--surface); color:var(--text-primary);
}
.currency-admin-search-option {
  display:flex; align-items:center; gap:8px;
  padding:6px 10px; cursor:pointer; font-size:12px;
  transition:background var(--tr);
}
.currency-admin-search-option:hover { background:var(--accent-light); }
.currency-admin-search-option img { width:16px; height:16px; image-rendering:pixelated; object-fit:contain; }
.currency-admin-qty  { width:64px !important; text-align:center; flex-shrink:0; font-size:12px !important; padding:6px 8px !important; }
.currency-admin-unit { width:96px !important; flex-shrink:0; font-size:11px !important; padding:6px 8px !important; }
.currencies-empty {
  text-align:center; padding:12px; font-size:11px;
  color:var(--danger); background:var(--danger-light); border-radius:var(--radius-md);
}

/* ТОСТЫ */
.toast-container {
  position:fixed; bottom:20px; right:20px; z-index:500;
  display:flex; flex-direction:column; gap:7px; pointer-events:none;
}
.toast {
  background:var(--surface); border:1px solid var(--border-strong);
  border-radius:var(--radius-md); padding:10px 14px;
  box-shadow:var(--shadow-lg); font-size:12px; color:var(--text-primary);
  display:flex; align-items:center; gap:9px; max-width:280px;
  animation:toast-in 0.22s ease both; pointer-events:all;
}
.toast.success { border-left:3px solid var(--success); }
.toast.error   { border-left:3px solid var(--danger); }
.toast.info    { border-left:3px solid #6080e0; }

/* СТРАНИЦА АДМИНИСТРАТОРА */
.admin-login {
  max-width:340px; margin:50px auto;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-xl); padding:30px;
  box-shadow:var(--shadow-md); text-align:center;
  animation:page-in 0.3s ease both;
}
.admin-login-icon { display:flex; align-items:center; justify-content:center; color:var(--text-muted); margin-bottom:10px; }
.admin-login h2 { font-size:17px; margin-bottom:3px; }
.admin-login p  { font-size:12px; color:var(--text-secondary); margin-bottom:20px; }

.admin-panel { display:none; }
.admin-panel.visible { display:block; animation:page-in 0.25s ease both; }

.admin-top {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px; flex-wrap:wrap; gap:10px;
}
.admin-top h2 { font-size:17px; }

.btn-add {
  display:flex; align-items:center; gap:6px;
  padding:7px 16px; background:var(--accent); color:white;
  border:none; border-radius:var(--radius-pill); font-size:12px;
  cursor:pointer; font-family:var(--font);
  transition:background var(--tr), transform var(--tr);
}
.btn-add:hover { background:var(--accent-2); transform:translateY(-1px); }

.btn-logout {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 14px; background:var(--surface-2); color:var(--text-muted);
  border:1px solid var(--border); border-radius:var(--radius-pill);
  font-size:12px; cursor:pointer; font-family:var(--font);
  transition:all var(--tr);
}
.btn-logout:hover { border-color:var(--danger); color:var(--danger); background:var(--danger-light); }

.admin-items-list { display:flex; flex-direction:column; gap:7px; }
.admin-item-row {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:10px 14px;
  display:flex; align-items:center; gap:12px;
  transition:border-color var(--tr);
}
.admin-item-row:hover { border-color:var(--border-strong); }
.admin-item-icon  { width:32px; height:32px; image-rendering:pixelated; object-fit:contain; flex-shrink:0; }
.admin-item-info  { flex:1; min-width:0; }
.admin-item-name  { font-size:13px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admin-item-price { font-size:11px; color:var(--text-secondary); margin-top:2px; }
.admin-item-actions { display:flex; gap:5px; }

.btn-icon {
  width:30px; height:30px;
  border-radius:var(--radius-sm); border:1px solid var(--border);
  background:var(--surface-2); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--tr), border-color var(--tr), color var(--tr);
  color:var(--text-secondary);
}
.btn-icon:hover { background:var(--surface-3); border-color:var(--border-strong); color:var(--text-primary); }
.btn-icon.danger:hover { background:var(--danger-light); border-color:var(--danger); color:var(--danger); }
.btn-icon svg { display:block; pointer-events:none; }

.admin-item-toggle { display:flex; align-items:center; }
.toggle-switch { position:relative; width:34px; height:18px; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-switch .slider { position:absolute; cursor:pointer; inset:0; background:var(--border-strong); border-radius:18px; transition:background var(--tr); }
.toggle-switch .slider::before { content:""; position:absolute; width:12px; height:12px; left:3px; top:3px; background:white; border-radius:50%; transition:transform var(--tr); box-shadow:0 1px 3px rgba(0,0,0,0.3); }
.toggle-switch input:checked + .slider { background:var(--accent); }
.toggle-switch input:checked + .slider::before { transform:translateX(16px); }

.modal-admin { max-width:520px; padding:24px; }
.item-search-wrap { position:relative; }
.item-search-results {
  position:absolute; top:100%; left:0; right:0;
  background:var(--surface); border:1px solid var(--accent); border-top:none;
  border-radius:0 0 var(--radius-md) var(--radius-md);
  max-height:210px; overflow-y:auto; z-index:10; box-shadow:var(--shadow-md);
}
.item-search-option {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; cursor:pointer; font-size:12px;
  transition:background var(--tr);
}
.item-search-option:hover, .item-search-option.focused { background:var(--accent-light); }
.item-search-option img { width:20px; height:20px; image-rendering:pixelated; object-fit:contain; }
.selected-item-preview {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; background:var(--accent-light);
  border:1px solid var(--accent); border-radius:var(--radius-md); margin-top:6px;
}
.selected-item-preview img  { width:24px; height:24px; image-rendering:pixelated; }
.selected-item-preview span { font-size:12px; color:var(--accent); }
.form-row-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-actions { display:flex; gap:8px; margin-top:16px; }
.btn-secondary {
  flex:1; padding:10px; background:var(--surface-2); color:var(--text-secondary);
  border:1px solid var(--border); border-radius:var(--radius-pill); font-size:12px;
  cursor:pointer; font-family:var(--font); transition:background var(--tr), color var(--tr);
}
.btn-secondary:hover { background:var(--surface-3); color:var(--text-primary); }
.btn-primary {
  flex:2; padding:10px; background:var(--accent); color:white;
  border:none; border-radius:var(--radius-pill); font-size:12px;
  cursor:pointer; font-family:var(--font); transition:background var(--tr);
}
.btn-primary:hover { background:var(--accent-2); }

.admin-settings {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:18px; margin-top:18px;
}
.admin-settings h3 {
  font-size:11px; margin-bottom:14px; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:1px;
}
.webhook-status {
  display:inline-flex; align-items:center; gap:4px;
  font-size:10px; padding:1px 9px; border-radius:var(--radius-pill);
}
.webhook-status.ok      { background:var(--success-light); color:var(--success); }
.webhook-status.bad     { background:var(--danger-light);  color:var(--danger); }
.webhook-status.unknown { background:var(--surface-2);     color:var(--text-muted); }

.orders-section { margin-top:24px; }
.orders-section h3 {
  font-size:11px; margin-bottom:12px; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:1px;
}
.order-history-list { display:flex; flex-direction:column; gap:5px; }
.order-history-item {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:9px 12px;
  display:flex; align-items:center; gap:10px; font-size:12px;
}
.order-history-item img { width:24px; height:24px; image-rendering:pixelated; object-fit:contain; flex-shrink:0; }
.order-info { flex:1; min-width:0; }
.order-nick   { color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-detail { color:var(--text-secondary); font-size:11px; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-time   { font-size:10px; color:var(--text-muted); white-space:nowrap; flex-shrink:0; }
.order-status { font-size:9px; padding:2px 7px; border-radius:var(--radius-pill); white-space:nowrap; flex-shrink:0; }
.order-status.pending { background:var(--warning-light); color:var(--warning); }
.order-status.done    { background:var(--success-light);  color:var(--success); }

.tab-icon,.section-icon,.label-icon { display:inline-flex; align-items:center; vertical-align:middle; }
.section-icon { margin-right:6px; opacity:0.5; }
.label-icon   { margin-right:4px; opacity:0.7; }
.toast-icon svg { display:block; }
.summary-label { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-secondary); }
.summary-mc-icon { width:14px; height:14px; image-rendering:pixelated; object-fit:contain; }
.preview-clear {
  margin-left:auto; background:none; border:none; cursor:pointer;
  color:var(--text-muted); display:flex; align-items:center;
  padding:2px; border-radius:var(--radius-sm); transition:color var(--tr);
}
.preview-clear:hover { color:var(--danger); }
.preview-clear svg { display:block; }

/* ФУТЕР */
.site-footer {
  border-top:1px solid var(--border); background:var(--surface);
  padding:12px 0; flex-shrink:0;
}
.site-footer-inner {
  max-width:1200px; margin:0 auto; padding:0 20px;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
}
.footer-left {
  display:flex; align-items:center; gap:7px;
  font-size:11px; color:var(--text-muted); flex-wrap:wrap;
}
.footer-domain { color:var(--text-secondary); letter-spacing:0.3px; }
.footer-sep    { color:var(--border-strong); }
.footer-year   { color:var(--text-muted); }
.footer-link   { color:var(--accent); text-decoration:none; transition:opacity var(--tr); }
.footer-link:hover { opacity:0.75; }
.btn-support {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 14px; background:var(--accent-light); color:var(--accent);
  border:1px solid rgba(217,95,95,0.35); border-radius:var(--radius-pill);
  font-size:11px; cursor:pointer; font-family:var(--font);
  transition:background var(--tr), color var(--tr), transform var(--tr);
}
.btn-support:hover { background:var(--accent); color:#fff; transform:translateY(-1px); }

/* ПОЖЕРТВОВАНИЕ */
.modal-donate { max-width:360px; padding:0; overflow:hidden; }
.donate-header {
  display:flex; align-items:center; gap:12px;
  padding:20px 20px 16px;
  border-bottom:1px solid var(--border); background:var(--surface-2);
}
.donate-header-icon {
  width:44px; height:44px; border-radius:var(--radius-md);
  background:var(--accent-light); display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.donate-title { font-size:15px; color:var(--text-primary); }
.donate-sub   { font-size:10px; color:var(--text-muted); margin-top:3px; }
.donate-presets {
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:7px; padding:16px 18px 0;
}
.donate-preset {
  padding:7px 0; border-radius:var(--radius-md);
  border:1px solid var(--border); background:var(--surface-2);
  color:var(--text-secondary); font-size:12px; cursor:pointer;
  font-family:var(--font); transition:all var(--tr);
}
.donate-preset:hover  { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
.donate-preset.active { border-color:var(--accent); background:var(--accent); color:#fff; }
.donate-amount-wrap { position:relative; padding:12px 18px 0; }
.donate-amount-input {
  width:100%; padding:11px 40px 11px 16px;
  border:1.5px solid var(--border); border-radius:var(--radius-md);
  font-size:18px; font-family:var(--font); color:var(--text-primary);
  background:var(--surface-2); outline:none;
  appearance:textfield; -moz-appearance:textfield;
  transition:border-color var(--tr), box-shadow var(--tr);
}
.donate-amount-input::-webkit-outer-spin-button,
.donate-amount-input::-webkit-inner-spin-button { -webkit-appearance:none; }
.donate-amount-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-light); }
.donate-amount-input.input-error { border-color:var(--danger); animation:shake 0.4s ease; }
.donate-currency {
  position:absolute; right:32px; top:50%; transform:translateY(-20%);
  font-size:16px; color:var(--text-muted); pointer-events:none;
}
.donate-hint { font-size:10px; color:var(--text-muted); padding:4px 18px 0; }
.donate-btn  { margin:14px 18px 0; width:calc(100% - 36px); border-radius:var(--radius-pill); }
.donate-footer-note { padding:12px 18px 18px; font-size:10px; color:var(--text-muted); text-align:center; }

/* АНИМАЦИИ */
@keyframes card-in    { from{opacity:0;transform:translateY(10px) scale(0.97)} to{opacity:1;transform:none} }
@keyframes page-in    { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
@keyframes modal-in   { from{opacity:0;transform:scale(0.93) translateY(10px)} to{opacity:1;transform:none} }
@keyframes logo-in    { from{opacity:0;filter:blur(4px);transform:scale(0.95)} to{opacity:1;filter:none;transform:none} }
@keyframes nav-in     { from{opacity:0;transform:translateX(10px)} to{opacity:1;transform:none} }
@keyframes toast-in   { from{opacity:0;transform:translateX(14px) scale(0.95)} to{opacity:1;transform:none} }
@keyframes toast-out  { from{opacity:1;transform:none} to{opacity:0;transform:translateX(18px)} }
@keyframes shake      { 0%,100%{transform:none} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
@keyframes bundle-float { 0%,100%{transform:none} 50%{transform:translateY(-4px) rotate(4deg)} }

.item-card:nth-child(1)  { animation-delay:.02s }
.item-card:nth-child(2)  { animation-delay:.04s }
.item-card:nth-child(3)  { animation-delay:.06s }
.item-card:nth-child(4)  { animation-delay:.08s }
.item-card:nth-child(5)  { animation-delay:.10s }
.item-card:nth-child(6)  { animation-delay:.12s }
.item-card:nth-child(7)  { animation-delay:.14s }
.item-card:nth-child(8)  { animation-delay:.16s }
.item-card:nth-child(n+9){ animation-delay:.18s }

#page-shop, #page-admin { transition:opacity 0.18s ease; }

/* АДАПТИВНОСТЬ */
@media (max-width:640px) {
  .header-inner { padding:0 14px; height:50px; }
  .main         { padding:14px 14px 28px; }
  .items-grid   { grid-template-columns:1fr; gap:6px; }
  .item-card    { height:68px; }
  .form-row-2   { grid-template-columns:1fr; }
  .toast-container { right:12px; bottom:12px; left:12px; }
  .toast        { max-width:100%; }
  .nav-tab      { padding:4px 12px; font-size:11px; }
  .site-footer-inner { justify-content:center; flex-direction:column; gap:8px; text-align:center; }
  .admin-item-row { flex-wrap:wrap; }
}
@media (max-width:400px) {
  .nav-bundle-icon { display:none; }
}
