/* Dana — shared shell, navigation, shop layout, mobile */

:root {
  --font-sans: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gradient-page: linear-gradient(145deg, #5c6bef 0%, #6548b0 50%, #764ba2 100%);
  --gradient-header: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --color-surface: rgba(255, 255, 255, 0.96);
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-shell: 0 20px 60px rgba(15, 23, 42, 0.14);
  --nav-gap: 12px;
  --touch-min: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  font-family: var(--font-sans);
  background: var(--gradient-page);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: clamp(10px, 2.5vw, 20px);
  direction: rtl;
  color: var(--color-text);
  line-height: 1.5;
}

body.site-body.site-body--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 24px);
}

.site-body .container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-shell);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-body .container.container--narrow {
  max-width: 800px;
}

.site-body .container.container--wide {
  max-width: 1200px;
}

.site-body .container > .header.shell-header {
  background: var(--gradient-header);
  color: #fff;
  padding: clamp(22px, 4vw, 40px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-body .container > .header.shell-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="2"/></svg>');
  opacity: 0.12;
  pointer-events: none;
}

.site-body .container > .header.shell-header h1 {
  font-size: clamp(1.45rem, 4.5vw, 2.75rem);
  font-weight: 700;
  margin: 0.35em 0 0.25em;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.site-body .container > .header.shell-header p {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  opacity: 0.92;
  position: relative;
  z-index: 1;
  margin: 0;
}

.site-body .container > .header.shell-header .user-info {
  position: absolute;
  top: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  text-align: right;
  max-width: min(280px, 85vw);
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.site-body .container > .header.shell-header .logout-btn {
  position: absolute;
  top: clamp(12px, 2vw, 20px);
  left: clamp(12px, 2vw, 20px);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-body .container > .header.shell-header .logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.site-body .container .navigation {
  background: #f8fafc;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 3vw, 32px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--nav-gap);
  align-items: center;
  justify-content: center;
}

.site-body .container .navigation .back-link,
.site-body .container .navigation .orders-link {
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-body .container .navigation .back-link {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.site-body .container .navigation .orders-link {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.site-body .container .navigation .back-link:hover,
.site-body .container .navigation .orders-link:hover {
  transform: translateY(-2px);
}

.site-body .container .navigation .nav-btn,
.site-body .container .navigation a.nav-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-body .container .navigation .nav-btn:hover,
.site-body .container .navigation a.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.site-body .container .navigation .nav-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 1rem;
}

.table-responsive table {
  min-width: min(920px, 100%);
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.filter-toolbar::-webkit-scrollbar {
  height: 6px;
}

.filter-toolbar::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .site-body .products-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .site-body .form-section {
    padding: clamp(16px, 4vw, 28px) !important;
  }

  .site-body .order-summary {
    padding: clamp(18px, 4vw, 28px) !important;
  }

  .site-body .section-title {
    font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
  }
}

@media (max-width: 768px) {
  body.site-body {
    padding: 8px;
  }

  .site-body .container > .header.shell-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 14px 22px;
    padding-bottom: max(22px, env(safe-area-inset-bottom, 0));
  }

  .site-body .container > .header.shell-header .user-info,
  .site-body .container > .header.shell-header .logout-btn {
    position: static !important;
    margin: 8px auto;
    max-width: 100%;
    width: auto;
    text-align: center;
  }

  .site-body .container > .header.shell-header h1,
  .site-body .container > .header.shell-header p {
    width: 100%;
  }

  .site-body .container .navigation {
    flex-direction: column;
    align-items: stretch;
  }

  .site-body .container .navigation .nav-btn,
  .site-body .container .navigation a.nav-btn,
  .site-body .container .navigation .back-link,
  .site-body .container .navigation .orders-link {
    width: 100%;
    justify-content: center;
  }
}

