/* =========================================
   HDS LIVE - CATALOG CLEAN REBUILD
========================================= */

:root{
  --bg:#050505;
  --bg-soft:#0d0d0f;
  --bg-elev:#11161f;

  --panel:rgba(255,255,255,.03);
  --panel-soft:rgba(255,255,255,.02);
  --panel-strong:rgba(255,255,255,.06);

  --text:#f5f5f5;
  --muted:#a7a7ad;
  --muted-2:rgba(255,255,255,.58);

  --line:rgba(255,255,255,.10);
  --border:rgba(255,255,255,.10);
  --border-soft:rgba(255,255,255,.08);
  --border-strong:rgba(255,255,255,.14);

  --white:#ffffff;
  --accent-red:#ff2d2d;
  --accent-blue:#9fdcff;
  --success:#bbf7d0;
  --success-bg:rgba(34,197,94,.10);
  --success-border:rgba(34,197,94,.25);
  --danger:#ffd1d9;
  --danger-bg:rgba(251,113,133,.10);
  --danger-border:rgba(251,113,133,.28);

  --radius-xl:32px;
  --radius-lg:24px;
  --radius-md:18px;
  --radius-sm:14px;

  --shadow-lg:0 30px 80px rgba(0,0,0,.45);
  --shadow-md:0 24px 60px rgba(0,0,0,.26);
  --shadow-sm:0 18px 42px rgba(0,0,0,.28);

  --container:1280px;
  --font-base:"Inter", sans-serif;
}

/* =========================================
   RESET / BASE
========================================= */

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

html,
body{
  height:100%;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:var(--font-base);
  background:
    radial-gradient(1200px 800px at 0% 0%, rgba(255,45,45,.05), transparent 40%),
    radial-gradient(1000px 700px at 100% 10%, rgba(255,255,255,.03), transparent 35%),
    #050505;
  color:var(--text);
  min-height:100%;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font:inherit;
}

img{
  max-width:100%;
  display:block;
}

main{
  flex:1;
}

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}

/* =========================================
   TYPOGRAPHY
========================================= */

h1,
h2,
h3,
h4,
.cat-title,
.p-model,
.project-title,
.project-item-title,
.pi-title{
  font-family:var(--font-base);
  letter-spacing:-0.02em;
}

h1,h2,h3,h4,p{
  margin-top:0;
}

.small{
  color:var(--muted);
  font-size:13px;
}

.section-label{
  margin:0 0 14px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,.52);
}

.hr{
  height:1px;
  background:var(--border);
  margin:18px 0;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

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

.site-header{
  position:sticky;
  top:0;
  z-index:100;
  backdrop-filter:blur(14px);
  background:rgba(5,5,5,.72);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.header-inner{
  min-height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.logo img,
.brand-logo{
  width:auto;
  height:52px;
}

.header-nav,
.nav-links{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================================
   BUTTONS / LINKS / BADGES
========================================= */

.btn,
.header-pill{
  min-height:46px;
  padding:0 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--white);
  font-weight:600;
  cursor:pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
  user-select:none;
}

.btn:hover,
.header-pill:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.16);
}

.btn:active,
.header-pill:active{
  transform:translateY(0) scale(.99);
}

.btn.primary,
.header-pill--outline{
  border-color:rgba(255,45,45,.24);
}

.header-pill--active{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
}

.btn-primary-dark{
  border-color:rgba(255,255,255,.12);
  background:rgba(255,255,255,.08);
  color:#fff;
}

.btn-primary-dark:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.18);
}

.btn-ghost-dark{
  border-color:rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#fff;
}

.btn-ghost-dark:hover{
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.18);
}

.btn.danger{
  border-color:rgba(251,113,133,.35);
  background:rgba(251,113,133,.12);
  color:#ffd1d9;
}

.header-email,
.badge-link{
  color:var(--accent-blue);
}

.badge-link{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.badge-link:hover{
  border-color:rgba(120,220,255,.35);
  background:rgba(120,220,255,.08);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
}

/* =========================================
   PANELS / SHELLS
========================================= */

.panel,
.catalog-shell,
.projects-shell,
.project-view-shell,
.project-send-shell,
.auth-shell,
.profile-shell{
  padding:20px;
  border-radius:28px;
  border:1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    rgba(8,12,19,.72);
  box-shadow:
    0 24px 60px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter:blur(10px);
}

/* =========================================
   FORMS / INPUTS
========================================= */

.form-row{
  display:grid;
  gap:8px;
}

.label{
  font-size:12px;
  font-weight:600;
  color:rgba(255,255,255,.75);
}

.label--hidden{
  visibility:hidden;
}

.controls{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.input,
.select,
.qty,
.qty-input,
.pi-qty{
  min-height:46px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
  transition:
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.input::placeholder{
  color:rgba(255,255,255,.36);
}

.input{
  min-width:260px;
}

.select{
  min-width:190px;
  appearance:auto;
}

.input:focus,
.select:focus,
.qty:focus,
.qty-input:focus,
.pi-qty:focus{
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  box-shadow:0 0 0 4px rgba(255,255,255,.04);
}

.inline-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.inline-actions .input{
  flex:1;
}

.pw-wrap{
  position:relative;
  min-width:220px;
}

.pw-wrap .input{
  width:100%;
  padding-right:48px;
}

.pw-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.85);
  cursor:pointer;
  transition:all .18s ease;
}

.pw-toggle:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}

/* =========================================
   ALERTS
========================================= */

.auth-alert,
.form-error{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--danger-border);
  background:var(--danger-bg);
  color:var(--danger);
  font-size:14px;
  line-height:1.5;
}

.profile-success{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--success-border);
  background:var(--success-bg);
  color:var(--success);
  font-size:14px;
  line-height:1.5;
}

/* =========================================
   HOME CATALOGUE
========================================= */

.catalog-home{
  padding:18px 0 0;
}

.catalog-hero{
  padding:18px 24px 0;
}

.catalog-hero-media,
.hero-slider{
  position:relative;
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  border-radius:30px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  background:#0a0a0a;
  box-shadow:0 24px 60px rgba(0,0,0,.32);
}

.hero-slider{
  width:min(1200px, calc(100% - 40px));
  box-shadow:0 18px 50px rgba(0,0,0,.35);
}

.hero-slider::before{
  content:"";
  display:block;
  padding-top:38%;
}

.catalog-hero-slider,
.hero-slides{
  position:absolute;
  inset:0;
}

.catalog-hero-slide,
.hero-slide{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .7s ease;
}

.catalog-hero-slide.is-active,
.hero-slide.is-active{
  opacity:1;
  pointer-events:auto;
}

.catalog-hero-slide img,
.hero-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.catalog-hero-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  background:
    linear-gradient(90deg, rgba(0,0,0,.48) 0%, rgba(0,0,0,.22) 42%, rgba(0,0,0,.08) 100%),
    linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.26) 100%);
}

.hero-slide::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    90deg,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,.20) 40%,
    rgba(0,0,0,.05) 100%
  );
  pointer-events:none;
}

.catalog-hero-content{
  position:absolute;
  z-index:3;
  left:48px;
  right:auto;
  bottom:48px;
  max-width:540px;
}

.catalog-hero-kicker{
  margin:0 0 10px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.74);
}

.catalog-hero-content h1{
  margin:0;
  font-size:clamp(2rem, 3.4vw, 3.2rem);
  line-height:1;
  letter-spacing:-.03em;
  font-weight:800;
  color:#fff;
}

.catalog-hero-text{
  margin:14px 0 0;
  max-width:500px;
  font-size:16px;
  line-height:1.6;
  color:rgba(255,255,255,.80);
}

.catalog-hero-actions{
  margin-top:22px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.hero-btn{
  min-height:50px;
  padding:0 22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  transition:all .18s ease;
}

.hero-btn--light{
  background:#fff;
  color:#111;
}

.hero-btn--light:hover{
  transform:translateY(-1px);
  background:#f1f1f1;
}

.hero-btn--ghost{
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:#fff;
}

.hero-btn--ghost:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.10);
}

.catalog-hero-dots,
.hero-dots{
  position:absolute;
  z-index:4;
  display:flex;
  gap:10px;
}

.catalog-hero-dots{
  left:48px;
  bottom:22px;
}

.hero-dots{
  left:50%;
  bottom:20px;
  transform:translateX(-50%);
}

.hero-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.30);
  cursor:pointer;
  transition:.2s ease;
}

.hero-dot.active{
  background:#fff;
}

.catalog-intro{
  padding-top:52px;
}

.catalog-intro-head{
  max-width:880px;
}

.catalog-intro-head h2{
  margin:0;
  font-size:clamp(2rem, 4vw, 3rem);
  line-height:1.06;
  letter-spacing:-.03em;
}

.catalog-intro-head p{
  margin:18px 0 0;
  font-size:17px;
  line-height:1.7;
  color:var(--muted);
  max-width:760px;
}

.home-cats{
  margin:34px auto 0;
  padding-bottom:60px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}

.cat-card{
  position:relative;
  min-height:220px;
  padding:28px;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)),
    rgba(255,255,255,.02);
  box-shadow:0 18px 40px rgba(0,0,0,.20);
  overflow:hidden;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.cat-card::before{
  content:"";
  position:absolute;
  inset:auto auto -30% -10%;
  width:180px;
  height:180px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(255,45,45,.13) 0%, rgba(255,45,45,0) 70%);
  pointer-events:none;
}

.cat-card:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)),
    rgba(255,255,255,.03);
  box-shadow:0 28px 55px rgba(0,0,0,.28);
}

.cat-index{
  display:inline-flex;
  margin-bottom:22px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,.38);
}

.cat-title{
  font-size:clamp(1.55rem, 2vw, 2rem);
  line-height:1.05;
  font-weight:800;
  color:var(--white);
}

.cat-sub{
  margin-top:14px;
  max-width:90%;
  font-size:15px;
  line-height:1.65;
  color:var(--muted);
}

/* =========================================
   CATALOGUE PAGE
========================================= */

.catalog-page{
  padding:24px 0 0;
}

.catalog-page-head{
  padding:28px 0 22px;
}

.catalog-page-head h1{
  margin:0;
  font-size:clamp(2.4rem, 4vw, 4rem);
  line-height:.98;
  letter-spacing:-.03em;
  font-weight:800;
  color:#fff;
}

.catalog-page-intro{
  margin:16px 0 0;
  max-width:760px;
  font-size:17px;
  line-height:1.7;
  color:var(--muted);
}

.catalog-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  margin-bottom:18px;
}

.catalog-toolbar .input{
  flex:1 1 320px;
  min-width:240px;
}

.catalog-toolbar .select{
  min-width:220px;
}

.btn-reset{
  min-height:46px;
  padding:0 18px;
}

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

/* =========================================
   PRODUCT CARDS
========================================= */

.p-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:420px;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    rgba(8,12,19,.90);
  box-shadow:
    0 18px 42px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.025);
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.p-card:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,.14);
  box-shadow:
    0 24px 55px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.p-media{
  position:relative;
  height:235px;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 45%),
    linear-gradient(180deg, #f2f2f3 0%, #e8e8ea 100%);
  border-bottom:1px solid rgba(255,255,255,.05);
}

.p-media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.04) 100%);
  pointer-events:none;
}

.p-media img{
  position:relative;
  z-index:2;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 14px 22px rgba(0,0,0,.14));
  transition:transform .22s ease;
}

.p-card:hover .p-media img{
  transform:scale(1.03);
}

.img-placeholder{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:rgba(10,14,24,.42);
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:13px;
}

.p-body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
}

.p-title{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:0;
  line-height:1.08;
}

.p-brand{
  font-size:14px;
  font-weight:600;
  color:rgba(255,255,255,.56);
}

.p-model{
  font-size:18px;
  font-weight:800;
  color:#fff;
}

.p-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.p-cat{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:500;
  color:rgba(255,255,255,.86);
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
}

.p-add{
  margin-top:auto;
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 10px 18px rgba(0,0,0,.18);
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.p-add:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.10);
}

.p-add-ico{
  width:30px;
  height:30px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.10);
  font-size:18px;
  font-weight:700;
}

/* =========================================
   GENERIC PRODUCT / CART
========================================= */

.row{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
}

.col{
  flex:1;
  min-width:280px;
}

.product-img{
  width:100%;
  height:320px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid var(--border);
  background:#0a0f16;
}

.cart-item{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}

.cart-item img{
  width:72px;
  height:54px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--border);
}

.cart-actions{
  margin-left:auto;
  display:flex;
  gap:8px;
  align-items:center;
}

.qty{
  width:64px;
  text-align:center;
}

.total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:18px;
  font-weight:900;
}

/* =========================================
   PROJECTS / AUTH / MODALS / FOOTER
========================================= */

.projects-page,
.project-view-page,
.project-send-page,
.auth-page,
.profile-page{
  padding:24px 0 0;
}

.projects-page-head,
.project-view-head,
.project-send-head,
.auth-head,
.profile-head{
  padding:28px 0 22px;
}

.projects-head-shell,
.project-view-top{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:24px;
  align-items:start;
}

.projects-title-block h1,
.project-send-head h1,
.auth-head h1,
.profile-head h1{
  margin:0;
  font-size:clamp(2.4rem, 4vw, 4rem);
  line-height:.98;
  letter-spacing:-.03em;
  font-weight:800;
  color:#fff;
}

.projects-page-intro,
.project-send-intro,
.auth-intro,
.profile-intro,
.project-created{
  margin:16px 0 0;
  max-width:820px;
  font-size:17px;
  line-height:1.7;
  color:var(--muted);
}

.auth-shell{
  max-width:760px;
}

.auth-shell--wide{
  max-width:1160px;
}

.auth-form,
.project-create-form,
.profile-stack{
  display:grid;
  gap:14px;
}

.auth-actions{
  display:flex;
  justify-content:flex-start;
  margin-top:6px;
}

.auth-actions .btn{
  min-width:180px;
}

.auth-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.register-form-grid,
.profile-form-grid,
.profile-password-grid,
.send-form-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  align-items:end;
}

.form-row--wide{
  grid-column:span 2;
}

.form-row--submit{
  grid-column:span 1;
}

.form-row--submit .btn{
  width:100%;
}

.project-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.project-card{
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
  padding:22px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    rgba(8,12,19,.90);
  box-shadow:
    0 18px 42px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.project-card-top{
  display:grid;
  gap:14px;
}

.project-card .name{
  margin:0;
  font-size:clamp(1.65rem, 2vw, 2.1rem);
  line-height:1.02;
  letter-spacing:-.03em;
  font-weight:800;
  color:#fff;
}

.project-meta,
.project-card-bottom,
.project-actions-bar,
.project-item-buttons,
.metric-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.empty-state{
  min-height:280px;
  display:grid;
  place-items:center;
  text-align:center;
  padding:30px;
  border-radius:24px;
  border:1px dashed rgba(255,255,255,.12);
  background:rgba(255,255,255,.02);
}

.empty-state h2{
  margin:0 0 10px;
  font-size:28px;
  color:#fff;
}

.empty-state p{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}

.project-title{
  margin:0;
  font-size:clamp(2.5rem, 4vw, 4.2rem);
  line-height:.96;
  letter-spacing:-.03em;
  font-weight:800;
  color:#fff;
}

.project-side{
  display:grid;
  gap:16px;
  justify-items:end;
}

.project-metrics{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.metric{
  min-width:140px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 22px rgba(0,0,0,.20);
}

.metric-val{
  font-size:26px;
  font-weight:900;
  margin-top:4px;
}

.project-items-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}

.project-item-card{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:20px;
  align-items:center;
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    rgba(8,12,19,.90);
  box-shadow:
    0 18px 42px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.project-item-media{
  width:160px;
  height:120px;
  border-radius:20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 45%),
    linear-gradient(180deg, #f2f2f3 0%, #e8e8ea 100%);
  border:1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.project-item-media img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:14px;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.14));
}

.project-item-main{
  display:grid;
  gap:8px;
  min-width:0;
}

.project-item-title{
  margin:0;
  font-size:clamp(1.5rem, 2vw, 2rem);
  line-height:1.04;
  letter-spacing:-.02em;
  font-weight:800;
  color:#fff;
}

.project-item-controls{
  margin-top:8px;
  display:grid;
  gap:12px;
  max-width:420px;
}

.pi-qty{
  width:100%;
  text-align:center;
  font-weight:800;
}

.pi-delete{
  border:1px solid rgba(255,120,120,.18);
  background:rgba(120,20,20,.22);
  color:#fff;
}

.pi-delete:hover{
  background:rgba(140,30,30,.30);
  border-color:rgba(255,140,140,.26);
}

.send-item-line{
  display:grid;
  grid-template-columns:70px 1fr;
  gap:14px;
  align-items:center;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    rgba(8,12,19,.82);
}

.send-item-qty{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:#9fdcff;
  font-weight:800;
}

.send-item-main{
  display:grid;
  gap:4px;
}

.send-item-name{
  font-size:16px;
  font-weight:700;
  color:#fff;
}

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

.modal.hidden{
  display:none;
}

.modal-card{
  width:min(620px, 96vw);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)),
    rgba(8,12,19,.94);
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.42);
  overflow:hidden;
}

.modal-card--small{
  width:min(560px, 96vw);
}

.modal-head,
.modal-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 18px;
}

.modal-body{
  padding:0 18px 18px;
  display:grid;
  gap:14px;
}

.modal-title{
  font-size:20px;
  font-weight:800;
  color:#fff;
}

.modal-sub{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

.modal-close-btn,
.modal-close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  transition:all .18s ease;
}

.modal-close-btn:hover,
.modal-close:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.18);
}

.site-footer{
  margin-top:40px;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(8,8,8,.72);
  backdrop-filter:blur(12px);
}

.footer-inner{
  max-width:var(--container);
  margin:0 auto;
  padding:22px 24px;
  display:flex;
  flex-wrap:wrap;
  gap:14px 18px;
  align-items:center;
  justify-content:space-between;
}

.footer-socials{
  display:flex;
  gap:10px;
  align-items:center;
}

.footer-socials a{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  font-weight:800;
  transition:all .18s ease;
}

.footer-socials a:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
}

.footer-copy,
.footer-links{
  color:var(--muted);
  font-size:14px;
}

.footer-links{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.footer-links a:hover{
  color:var(--white);
}

.footer-links span{
  opacity:.45;
}

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

.legal-modal[hidden]{
  display:none !important;
}

.legal-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.legal-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(8px);
}

.legal-modal-dialog{
  position:relative;
  z-index:2;
  width:min(900px, calc(100% - 40px));
  max-height:88vh;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(10,14,24,.98), rgba(4,8,16,.98));
  box-shadow:0 30px 80px rgba(0,0,0,.45);
}

.legal-modal-content{
  position:relative;
  padding:34px 30px 30px;
  max-height:88vh;
  overflow-y:auto;
  color:#fff;
}

.legal-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  z-index:5;
  width:40px;
  height:40px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

.legal-modal-close:hover{
  background:rgba(255,255,255,.16);
}

.legal-kicker{
  margin:0 0 10px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#9ca3af;
}

.legal-modal h2{
  margin:0 0 22px;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.05;
  color:#fff;
}

.legal-text h3{
  margin:26px 0 10px;
  font-size:18px;
  font-weight:700;
  color:#fff;
}

.legal-text p{
  margin:0;
  line-height:1.75;
  font-size:15px;
  color:rgba(255,255,255,.82);
}

.legal-text a{
  color:#fff;
  text-decoration:underline;
  text-underline-offset:3px;
}

body.modal-open{
  overflow:hidden;
}

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

@media (max-width: 1100px){
  .home-cats{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .catalog-hero-content{
    left:40px;
    bottom:40px;
    max-width:480px;
  }

  .catalog-hero-dots{
    left:40px;
  }

  .register-form-grid,
  .profile-form-grid,
  .profile-password-grid,
  .send-form-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .form-row--wide,
  .form-row--submit{
    grid-column:span 2;
  }
}

@media (max-width: 980px){
  .projects-head-shell,
  .project-view-top{
    grid-template-columns:1fr;
  }

  .project-side{
    justify-items:stretch;
  }

  .project-metrics,
  .project-actions-bar{
    justify-content:flex-start;
  }
}

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

  .metric-row{
    flex-wrap:wrap;
  }
}

@media (max-width: 760px){
  .container{
    padding:0 18px;
  }

  .header-inner{
    min-height:auto;
    padding:14px 0;
    align-items:center;
    gap:10px;
  }

  .logo img,
  .brand-logo{
    height:42px;
  }

  .header-nav,
  .nav-links{
    gap:8px;
  }

  .btn,
  .header-pill{
    min-height:40px;
    padding:0 14px;
    font-size:14px;
  }

  .catalog-home{
    padding-top:10px;
  }

  .catalog-hero{
    padding:8px 12px 0;
  }

  .catalog-hero-media,
  .hero-slider{
    border-radius:22px;
  }

  .hero-slider{
    width:100%;
  }

  .hero-slider::before{
    padding-top:56%;
  }

  .catalog-hero-content{
    left:18px;
    right:18px;
    bottom:18px;
    max-width:none;
  }

  .catalog-hero-kicker{
    font-size:10px;
    margin-bottom:8px;
  }

  .catalog-hero-content h1{
    font-size:1.55rem;
    line-height:1.05;
  }

  .catalog-hero-text{
    margin-top:10px;
    font-size:14px;
    line-height:1.5;
    max-width:none;
  }

  .catalog-hero-actions{
    margin-top:14px;
    gap:8px;
  }

  .hero-btn{
    min-height:42px;
    padding:0 14px;
    font-size:14px;
  }

  .catalog-hero-dots{
    left:18px;
    bottom:12px;
  }

  .hero-dots{
    bottom:12px;
  }

  .hero-dot{
    width:8px;
    height:8px;
  }

  .catalog-intro{
    padding-top:34px;
  }

  .section-label{
    margin-bottom:10px;
    font-size:11px;
    letter-spacing:.15em;
  }

  .catalog-intro-head h2{
    font-size:2rem;
    line-height:1.06;
  }

  .catalog-intro-head p{
    margin-top:14px;
    font-size:15px;
    line-height:1.65;
  }

  .home-cats{
    margin-top:24px;
    grid-template-columns:1fr;
    gap:14px;
    padding-bottom:38px;
  }

  .cat-card{
    min-height:auto;
    padding:20px 18px;
    border-radius:22px;
  }

  .cat-index{
    margin-bottom:14px;
    font-size:11px;
  }

  .cat-title{
    font-size:1.75rem;
    line-height:1.04;
  }

  .cat-sub{
    margin-top:10px;
    max-width:100%;
    font-size:14px;
    line-height:1.55;
  }

  .catalog-shell,
  .projects-shell,
  .project-view-shell,
  .project-send-shell,
  .auth-shell,
  .profile-shell{
    padding:16px;
    border-radius:22px;
  }

  .catalog-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .catalog-toolbar .input,
  .catalog-toolbar .select,
  .catalog-toolbar .btn{
    width:100%;
    min-width:0;
  }

  .p-card{
    min-height:auto;
  }

  .p-media{
    height:210px;
    padding:16px;
  }

  .p-body{
    padding:16px;
    gap:12px;
  }

  .p-model{
    font-size:17px;
  }

  .p-add{
    min-height:50px;
    font-size:14px;
  }

  .project-create-card{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }

  .project-create-card .btn,
  .project-card-bottom .btn,
  .project-actions-bar .btn,
  .project-item-buttons .btn,
  .auth-links .btn,
  .auth-actions .btn{
    width:100%;
  }

  .project-card-bottom,
  .project-actions-bar,
  .project-item-buttons,
  .auth-links{
    flex-direction:column;
    align-items:stretch;
  }

  .project-item-card{
    grid-template-columns:1fr;
    gap:16px;
  }

  .project-item-media{
    width:100%;
    height:220px;
  }

  .project-item-controls{
    max-width:none;
  }

  .send-form-grid,
  .register-form-grid,
  .profile-form-grid,
  .profile-password-grid{
    grid-template-columns:1fr;
  }

  .form-row--wide,
  .form-row--submit{
    grid-column:span 1;
  }

  .send-item-line{
    grid-template-columns:1fr;
  }

  .inline-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .footer-inner{
    align-items:flex-start;
  }

  .auth-shell--wide{
    max-width:none;
  }
}

@media (max-width: 560px){
  .container{
    padding:0 16px;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .header-nav,
  .nav-links{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .header-pill,
  .btn{
    width:100%;
    min-height:42px;
    justify-content:center;
    padding:0 12px;
    font-size:13px;
  }

  .catalog-hero-content h1{
    font-size:1.35rem;
  }

  .catalog-hero-text{
    display:none;
  }

  .catalog-hero-actions{
    width:100%;
    flex-direction:column;
  }

  .hero-btn{
    width:100%;
  }

  .catalog-intro-head h2{
    font-size:1.75rem;
  }

  .catalog-intro-head p{
    font-size:14px;
    line-height:1.6;
  }

  .cat-card{
    padding:18px 16px;
  }

  .cat-title{
    font-size:1.55rem;
  }

  .cat-sub{
    font-size:13.5px;
  }

  .p-media{
    height:190px;
  }

  .footer-inner{
    padding:20px 16px;
  }
}

@media (max-width: 640px){
  .legal-modal{
    padding:14px;
  }

  .legal-modal-dialog{
    width:100%;
    max-height:92vh;
    border-radius:18px;
  }

  .legal-modal-content{
    padding:26px 18px 22px;
  }

  .legal-text p{
    font-size:14px;
    line-height:1.7;
  }
}