/* ============================================================
   TrzyDzieło Studio — style.css
   Brandbook: Blue / Red / Yellow / Green / Orange / Purple / Teal / Lime
   Fonts: Bebas Neue (headings), Nunito (body)
   ============================================================ */

:root {
  --blue:   #1B5FAA;
  --red:    #D93025;
  --yellow: #F5A623;
  --green:  #1A7C4F;
  --orange: #E8521A;
  --purple: #7B35C0;
  --teal:   #29B6D2;
  --lime:   #5CC040;
  --dark:   #1A1A1A;
  --off:    #F7F5F0;
  --muted:  #6B6B6B;
  --line:   #E5E2DB;
}

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

html, body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--off);
  color: var(--dark);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4, .bebas {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  font-weight: 400;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ============================================================
   RAINBOW BAR
   ============================================================ */

.rainbow-bar {
  height: 8px;
  background: linear-gradient(
    to right,
    var(--red)    0%,
    var(--orange) 14%,
    var(--yellow) 28%,
    var(--lime)   42%,
    var(--green)  57%,
    var(--teal)   71%,
    var(--blue)   85%,
    var(--purple) 100%
  );
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: #fff;
  border-bottom: 3px solid var(--dark);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo { display: flex; align-items: center; gap: 14px; }

.logo-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--dark);
  box-shadow: 3px 3px 0 var(--dark);
}

.logo h1 {
  font-size: 1.8rem;
  color: var(--dark);
}

.header-actions { display: flex; align-items: center; gap: 16px; }

.user-info {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
}

.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  border: 2px solid var(--dark);
}

.health-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #bbb;
  border: 2px solid var(--dark);
}
.health-dot.ok  { background: var(--lime); }
.health-dot.bad { background: var(--red); }

/* Workspace switcher (header) */
.workspace-switcher { position: relative; }
.ws-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--off);
  border: 2px solid var(--dark);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.1s;
}
.ws-btn:hover { background: #fff; }
.ws-icon { font-size: 1.1rem; }
.ws-caret { color: var(--muted); font-size: 0.8rem; }
.ws-menu {
  position: absolute; top: 48px; right: 0; min-width: 240px;
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--dark);
  z-index: 200;
  padding: 6px;
}
.ws-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  background: transparent; border: none; border-radius: 6px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  color: var(--dark); cursor: pointer; text-align: left; text-decoration: none;
}
.ws-item:hover { background: var(--off); }
.ws-item-manage { border-top: 2px solid var(--line); margin-top: 4px; color: var(--blue); }
.ws-badge {
  margin-left: auto;
  font-size: 0.7rem;
  background: var(--purple); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  font-weight: 800;
}

/* User dropdown menu */
.user-menu {
  position: absolute;
  top: 55px;
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--dark);
  z-index: 200;
  padding: 6px;
  overflow: hidden;
}
.user-menu-head {
  padding: 10px 12px 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 4px;
}
.user-menu-email {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 2px;
}
.user-menu-unverified {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 4px;
}
.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  text-decoration: none;
}
.user-menu-item:hover { background: var(--off); }
.user-menu-logout { color: var(--red); border-top: 2px solid var(--line); margin-top: 4px; }
.user-menu-logout:hover { background: var(--red); color: #fff; }

/* ============================================================
   MAIN NAV — 3 TILES
   ============================================================ */

.main-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-section {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 14px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 6px 6px 0 var(--dark);
  position: relative;
  overflow: hidden;
}

.nav-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
}

.nav-section.projektowanie::before { background: var(--orange); }
.nav-section.filamenty::before     { background: var(--green); }
.nav-section.magazyn::before       { background: var(--blue); }

.nav-section:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--dark);
}

.nav-section.active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--dark);
}

.nav-section .nav-icon {
  font-size: 2.8rem;
  font-family: 'Bebas Neue', sans-serif;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}

.nav-section.projektowanie .nav-icon { color: var(--orange); }
.nav-section.filamenty .nav-icon     { color: var(--green); }
.nav-section.magazyn .nav-icon       { color: var(--blue); }

.nav-section h2 {
  font-size: 1.9rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.nav-section p {
  color: var(--muted);
  font-weight: 600;
}

/* ============================================================
   CONTENT + HERO SECTIONS
   ============================================================ */

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

.section-content { display: none; }
.section-content.active { display: block; }

.hero {
  border: 3px solid var(--dark);
  border-radius: 14px;
  padding: 36px 28px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow: 6px 6px 0 var(--dark);
}

.hero h2 {
  font-size: 2.6rem;
  margin-bottom: 10px;
  line-height: 1;
}

.hero p {
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 18px;
  font-weight: 600;
}

.hero-orange { background: linear-gradient(135deg, var(--orange), var(--red)); }
.hero-green  { background: linear-gradient(135deg, var(--green), var(--teal)); }
.hero-blue   { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.hero-purple { background: linear-gradient(135deg, var(--purple), var(--blue)); }

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn, .btn-solid {
  display: inline-block;
  padding: 12px 22px;
  background: #fff;
  color: var(--dark);
  border: 3px solid var(--dark);
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 4px 4px 0 var(--dark);
  transition: transform 0.1s, box-shadow 0.1s;
  text-decoration: none;
}

.btn:hover, .btn-solid:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark);
}

.btn:active, .btn-solid:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--dark);
}

.btn-orange, .btn-solid.orange { background: var(--orange); color: #fff; }
.btn-green,  .btn-solid.green  { background: var(--green);  color: #fff; }
.btn-blue,   .btn-solid.blue   { background: var(--blue);   color: #fff; }
.btn-red,    .btn-solid.red    { background: var(--red);    color: #fff; }
.btn-purple, .btn-solid.purple { background: var(--purple); color: #fff; }

.btn-ghost {
  display: inline-block;
  padding: 10px 18px;
  background: transparent;
  border: 2px solid var(--dark);
  border-radius: 10px;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
}

.btn-ghost:hover { background: var(--dark); color: #fff; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-card {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 var(--dark);
}

.form-card h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-card .form-card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.form-field .req { color: var(--red); }

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  background: var(--off);
  border: 2px solid var(--dark);
  border-radius: 8px;
  color: var(--dark);
  font-weight: 600;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 3px 3px 0 var(--dark);
}

.form-field textarea { resize: vertical; min-height: 80px; }

.info-box {
  background: #FFF4E0;
  border: 2px dashed var(--dark);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 600;
}

.info-box strong { color: var(--orange); }

.or-divider {
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--muted);
  margin: 10px 0;
  position: relative;
}

.or-divider::before,
.or-divider::after {
  content: "";
  display: inline-block;
  width: 30%;
  height: 2px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 10px;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.filters input,
.filters select {
  padding: 10px 12px;
  background: #fff;
  border: 2px solid var(--dark);
  border-radius: 8px;
  font-weight: 600;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  margin: 18px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.project-card {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 4px 4px 0 var(--dark);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.project-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark);
}

.project-card .cat-line {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 4px;
}

.project-card h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.project-card .status-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--yellow);
  border: 2px solid var(--dark);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card .status-badge.gotowy          { background: var(--lime);   color: var(--dark); }
.project-card .status-badge.wydrukowany     { background: var(--green);  color: #fff; }
.project-card .status-badge.w_sprzedaży     { background: var(--blue);   color: #fff; }
.project-card .status-badge.w_projektowaniu { background: var(--orange); color: #fff; }

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--off);
  border: 2px solid var(--dark);
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.card-delete-btn:hover {
  background: var(--red);
  color: #fff;
}

/* ============================================================
   FILAMENTS
   ============================================================ */

.ams-wrap {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 var(--dark);
}

.ams-wrap h3 { font-size: 1.4rem; margin-bottom: 12px; }

.ams-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ams-slot {
  border: 2px dashed var(--dark);
  border-radius: 10px;
  padding: 14px;
  min-height: 90px;
  background: var(--off);
}

.ams-slot.filled { border-style: solid; background: #fff; }

.ams-slot .slot-nr {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--muted);
}

.filaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.filament-card {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 4px 4px 0 var(--dark);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filament-card .swatch {
  width: 100%;
  height: 80px;
  border: 2px solid var(--dark);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 6px 10px;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.filament-card h4 { font-size: 1.25rem; }
.filament-card .mfg { color: var(--muted); font-size: 0.85rem; font-weight: 700; }

.filament-card .stock-bar {
  height: 14px;
  background: var(--off);
  border: 2px solid var(--dark);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.filament-card .stock-bar .fill { height: 100%; transition: width 0.3s; }
.filament-card .stock-bar .fill.high { background: var(--lime); }
.filament-card .stock-bar .fill.mid  { background: var(--yellow); }
.filament-card .stock-bar .fill.low  { background: var(--red); }

.filament-card .stock-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 800;
}

.filament-card .temps {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.filament-card .actions { display: flex; gap: 8px; margin-top: auto; }
.filament-card .actions button {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid var(--dark);
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--off);
}
.filament-card .actions button:hover { background: var(--dark); color: #fff; }
.filament-card .actions button.danger { background: var(--red); color: #fff; }

/* ============================================================
   WAREHOUSE
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 4px 4px 0 var(--dark);
  text-align: center;
}

.stat-card.green  { background: var(--lime); }
.stat-card.orange { background: var(--yellow); }
.stat-card.blue   { background: #BFE1FF; }
.stat-card.red    { background: #FFD1CC; }
.stat-card.purple { background: #E3D3F5; }

/* Dashboard */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 20px;
}
.dashboard-charts {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .dashboard-charts { grid-template-columns: 1fr; }
}

.stat-card .number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  line-height: 1;
}
.stat-card .label {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.warehouse-table {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--dark);
  overflow: hidden;
}

.warehouse-table table {
  width: 100%;
  border-collapse: collapse;
}

.warehouse-table th {
  background: var(--dark);
  color: #fff;
  padding: 12px;
  text-align: left;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.warehouse-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.warehouse-table tr:hover td { background: var(--off); }

/* ============================================================
   PROJECT DETAIL
   ============================================================ */

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.instructions-box {
  background: #FFF9E6;
  border: 3px solid var(--dark);
  border-radius: 12px;
  padding: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  box-shadow: 4px 4px 0 var(--dark);
}

.image-preview {
  width: 100%;
  border: 2px solid var(--dark);
  border-radius: 8px;
  display: block;
  margin-bottom: 10px;
}

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   MODAL
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #fff;
  border: 3px solid var(--dark);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  padding: 28px;
  max-height: 92vh;
  overflow: auto;
  box-shadow: 8px 8px 0 var(--dark);
}

.modal-card h3 {
  font-size: 1.8rem;
  margin-bottom: 18px;
}

/* ============================================================
   TAGS
   ============================================================ */

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  border: 2px solid var(--dark);
  letter-spacing: 0.02em;
}

.tag-chip .x {
  cursor: pointer;
  opacity: 0.85;
  font-weight: 900;
}
.tag-chip .x:hover { opacity: 1; }

.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 2px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  align-items: center;
  background: #fff;
}
.tag-input-wrap input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 120px;
  font-family: inherit;
  font-weight: 600;
  padding: 4px;
}

.template-card {
  background: linear-gradient(135deg, #F3EAFF, #fff);
  border-color: #7B35C0;
}

/* ============================================================
   PARTS / COMMENTS / ACTIVITY
   ============================================================ */

.part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #e4e4e4;
}
.part-row:last-child { border-bottom: 0; }

.comment-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #e4e4e4;
}
.comment-row:last-child { border-bottom: 0; }

.comment-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 2px solid var(--dark);
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { margin-bottom: 4px; }
.comment-text { white-space: pre-wrap; line-height: 1.5; }
.mention {
  color: var(--purple);
  font-weight: 800;
  background: #F3EAFF;
  padding: 0 4px;
  border-radius: 4px;
}

.activity-entry {
  padding: 8px 0;
  border-bottom: 1px dashed #e4e4e4;
}
.activity-entry:last-child { border-bottom: 0; }

.diff-box {
  margin-top: 6px;
  padding: 8px 10px;
  background: #F7F5F0;
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.diff-box code {
  background: #fff;
  padding: 0 4px;
  border-radius: 3px;
  font-family: 'Space Mono', monospace;
}

/* ============================================================
   GALLERY + LIGHTBOX
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--dark);
  border-radius: 8px;
  overflow: hidden;
  background: #f4f4f4;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  transition: transform 0.2s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px; height: 26px;
  border: 2px solid var(--dark);
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-shadow: 2px 2px 0 var(--dark);
}
.gallery-del:hover { background: var(--red); color: #fff; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 6500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: var(--red); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-weight: 900;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-nav:hover { background: var(--dark); }
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 800;
  background: rgba(0,0,0,0.6);
  padding: 6px 14px;
  border-radius: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
}

/* ============================================================
   TOAST
   ============================================================ */

#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--dark);
  z-index: 6000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { background: var(--red); }
#toast.success { background: var(--green); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--dark);
  color: #fff;
  margin-top: 40px;
  padding: 40px 28px 20px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--yellow);
}

.footer-section a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,0.7);
}

.footer-section a:hover { color: var(--yellow); }

.footer-story {
  max-width: 1400px;
  margin: 30px auto 0;
  padding: 20px 0 0;
  border-top: 2px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .main-nav     { grid-template-columns: 1fr; }
  .filters      { grid-template-columns: 1fr; }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .ams-slots    { grid-template-columns: repeat(2, 1fr); }
  .form-row, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .hero h2 { font-size: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 12px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}
