/**
 * WYSH UI — светлая тема как в otdel_product (Inter, slate, кнопки 12px).
 */

:root {
  --wysh-bg: #f0f2f5;
  --wysh-card: rgba(255, 255, 255, 0.92);
  --wysh-border: rgba(15, 23, 42, 0.08);
  --wysh-text: #1e293b;
  --wysh-muted: #64748b;
  --wysh-accent: #475569;
  --wysh-accent-hover: #334155;
  --wysh-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -12px rgba(15, 23, 42, 0.12);
}

html,
body {
  height: 100%;
}

body.wysh-app {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--wysh-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(148, 163, 184, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 100%, rgba(203, 213, 225, 0.35), transparent 50%);
  color: var(--wysh-text);
}

/* ---------- Navbar (как navbar-wysh в otdel_product) ---------- */
.navbar-wysh {
  background: var(--wysh-card) !important;
  border-bottom: 1px solid var(--wysh-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-wysh .navbar-brand {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.navbar-wysh .wysh-nav-logo,
.navbar-wysh .wysh-logo {
  max-height: 40px;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.06));
}

.navbar-wysh .navbar-toggler {
  border-color: rgba(15, 23, 42, 0.12);
}

.navbar-wysh .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(71, 85, 105, 0.12);
}

.navbar-wysh .nav-link {
  color: var(--wysh-muted) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 10px;
  padding: 0.5rem 0.85rem !important;
}

.navbar-wysh .nav-link:hover {
  color: var(--wysh-text) !important;
  background: rgba(15, 23, 42, 0.04);
}

.navbar-wysh .nav-link.active {
  color: var(--wysh-accent) !important;
  background: rgba(71, 85, 105, 0.1);
}

/* ---------- Shell ---------- */
.wysh-shell {
  padding: 1.25rem 1rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.wysh-container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ---------- Cards ---------- */
body.wysh-app .card,
.wysh-card {
  background: var(--wysh-card);
  border: 1px solid var(--wysh-border);
  border-radius: 16px;
  box-shadow: var(--wysh-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.wysh-app .card-header {
  background: rgba(241, 245, 249, 0.5);
  border-bottom: 1px solid var(--wysh-border);
  color: var(--wysh-text);
  font-weight: 600;
}

body.wysh-app .card-body {
  color: var(--wysh-text);
}

body.wysh-app .card .text-muted {
  color: var(--wysh-muted) !important;
}

/* ---------- Forms ---------- */
body.wysh-app .form-control,
body.wysh-app .form-select {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.wysh-app .form-control:focus,
body.wysh-app .form-select:focus {
  border-color: rgba(71, 85, 105, 0.45);
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.12);
}

body.wysh-app .form-label {
  font-weight: 500;
  color: var(--wysh-text);
  font-size: 0.875rem;
}

/* ---------- Buttons (как otdel_product) ---------- */
body.wysh-app .btn {
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
}

body.wysh-app .btn-sm {
  border-radius: 10px;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
}

body.wysh-app .btn-primary,
.wysh-btn-accent {
  background: linear-gradient(180deg, #64748b 0%, var(--wysh-accent) 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.wysh-app .btn-primary:hover,
.wysh-btn-accent:hover {
  background: linear-gradient(180deg, #576275 0%, var(--wysh-accent-hover) 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.2);
  color: #fff !important;
}

body.wysh-app .btn-primary:active,
.wysh-btn-accent:active {
  transform: translateY(0);
}

body.wysh-app .btn-outline-primary {
  border: 1px solid rgba(71, 85, 105, 0.45);
  color: var(--wysh-accent);
  background: #fff;
}

body.wysh-app .btn-outline-primary:hover {
  background: rgba(71, 85, 105, 0.1);
  border-color: var(--wysh-accent-hover);
  color: var(--wysh-accent-hover);
}

body.wysh-app .btn-outline-secondary,
.wysh-btn-outline {
  border: 1px solid rgba(71, 85, 105, 0.35) !important;
  color: var(--wysh-accent) !important;
  background: #fff !important;
}

body.wysh-app .btn-outline-secondary:hover,
.wysh-btn-outline:hover {
  background: rgba(71, 85, 105, 0.08) !important;
  border-color: rgba(71, 85, 105, 0.5) !important;
  color: var(--wysh-accent-hover) !important;
}

body.wysh-app .btn-secondary {
  background: #e2e8f0;
  border: none;
  color: var(--wysh-accent-hover) !important;
}

body.wysh-app .btn-secondary:hover {
  background: #cbd5e1;
  color: var(--wysh-accent-hover) !important;
}

.btn-logout {
  border: 1px solid rgba(71, 85, 105, 0.25);
  background: #fff;
  color: var(--wysh-muted) !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 1rem !important;
  border-radius: 12px;
}

.btn-logout:hover {
  border-color: rgba(220, 38, 38, 0.4);
  color: #b91c1c !important;
  background: rgba(254, 242, 242, 0.8);
}

/* ---------- Alerts ---------- */
body.wysh-app .alert {
  border-radius: 12px;
}

body.wysh-app .alert-info {
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid var(--wysh-border);
  color: var(--wysh-text);
}

/* ---------- Tables ---------- */
body.wysh-app .table-responsive {
  border-radius: 12px;
  border: 1px solid var(--wysh-border);
  overflow: hidden;
  background: #fff;
}

body.wysh-app .table {
  margin-bottom: 0;
}

body.wysh-app .table thead th {
  background: #f1f5f9 !important;
  color: var(--wysh-text);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-color: var(--wysh-border) !important;
}

body.wysh-app .table td {
  border-color: var(--wysh-border) !important;
  vertical-align: middle;
}

body.wysh-app .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(241, 245, 249, 0.6);
}

.wysh-table {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--wysh-border);
}

.wysh-table thead {
  background: #f1f5f9;
}

/* Lamoda подсветка ячеек (светлый фон) */
.price-lm {
  background-color: rgba(248, 113, 113, 0.15) !important;
}

.price-ms {
  background-color: rgba(99, 102, 241, 0.12) !important;
}

.diff-equal {
  background-color: rgba(241, 245, 249, 0.9) !important;
}

.diff-lm-higher {
  background-color: rgba(248, 113, 113, 0.22) !important;
}

.diff-lm-lower {
  background-color: rgba(34, 197, 94, 0.18) !important;
}

.wysh-muted {
  color: var(--wysh-muted) !important;
}

/* ---------- Modals ---------- */
body.wysh-app .modal-content {
  border-radius: 16px;
  border: 1px solid var(--wysh-border);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.15);
}

body.wysh-app .modal-header {
  border-bottom-color: var(--wysh-border);
}

body.wysh-app .modal-footer {
  border-top-color: var(--wysh-border);
}

/* ---------- Login ---------- */
.wysh-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.wysh-login-card {
  width: 100%;
  max-width: 420px;
}

.wysh-login-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.wysh-login-header .wysh-logo {
  max-height: 56px;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.08));
}

.wysh-login-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid var(--wysh-border);
}

/* Фиксированная панель Lamoda */
#action-bar.bg-light {
  background: var(--wysh-card) !important;
  border-top: 1px solid var(--wysh-border) !important;
}
