:root{
  --brand:#d81f26;
  --brand-dark:#8f0f17;
  --brand-soft:rgba(216,31,38,.18);
  --brand-glow:rgba(216,31,38,.32);
  --ink:#e2e8f0;
  --halo:rgba(216,31,38,.45);
  --panel-deep:#04070f;
  --focus-ring:rgba(216,31,38,.35);
  --panel-sheen:rgba(255,255,255,.06);
  --texture-line:rgba(255,255,255,.03);
  --texture-pin:rgba(255,255,255,.05);
}

/* Global UI scale (approx. 80%) */
html{
  font-size:80%;
}
body{
  transform:scale(0.8);
  transform-origin:top left;
  width:125%;
}

@keyframes brandPulse{
  0%{transform:scale(0.95) translate3d(-4%, -4%, 0); opacity:.55;}
  50%{transform:scale(1.05) translate3d(3%, 2%, 0); opacity:.95;}
  100%{transform:scale(0.95) translate3d(-4%, -4%, 0); opacity:.55;}
}

@keyframes logoFloat{
  0%{transform:translateY(0);}
  50%{transform:translateY(-6px);}
  100%{transform:translateY(0);}
}

@keyframes sheenSweep{
  0%{transform:skewX(-20deg) translateX(-120%);} 
  100%{transform:skewX(-20deg) translateX(120%);} 
}

@keyframes hoverGlowPulse{
  0%{box-shadow:0 0 0 0 rgba(216,31,38,.5);}
  60%{box-shadow:0 0 0 20px rgba(216,31,38,0);}
  100%{box-shadow:0 0 0 0 rgba(216,31,38,0);}
}

@keyframes driftHalo{
  0%{transform:translateY(0) scale(0.95);}
  50%{transform:translateY(-4px) scale(1);}
  100%{transform:translateY(0) scale(0.95);}
}

/* Layout shell and sidebar */
.shell{
  display:grid;
  grid-template-columns:minmax(220px,260px) 1fr;
  gap:26px;
  min-height:100vh;
  padding:24px 20px 16px;
  position:relative;
  overflow-x:hidden;
  isolation:isolate;
}
.sidebar{
  background:
    radial-gradient(circle at 25% 20%, rgba(216,31,38,.35), transparent 55%),
    linear-gradient(180deg, #0f172a, #050711 75%);
  color:#cbd5e1;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  padding:24px;
  position:sticky;
  top:20px;
  height:fit-content;
  box-shadow:0 18px 42px -28px rgba(0,0,0,.65);
  backdrop-filter:blur(18px);
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:hidden;
  isolation:isolate;
}
.sidebar::before,
.sidebar::after{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:-1;
}
.sidebar::before{
  background:radial-gradient(circle at 30% 30%, var(--brand-glow), transparent 55%);
  filter:blur(14px);
  animation:brandPulse 10s ease-in-out infinite;
  opacity:.75;
}
.sidebar::after{
  background:linear-gradient(135deg, rgba(255,255,255,.04), transparent 65%);
  mix-blend-mode:screen;
  opacity:.4;
}
.sidebar .brand{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.sidebar .brand img{height:28px}
.sidebar .brand img{
  height:28px;
  filter:drop-shadow(0 8px 16px rgba(0,0,0,.45));
  animation:logoFloat 6s ease-in-out infinite;
}
.shell::after{
  content:'';
  position:absolute;
  inset:14px;
  border-radius:26px;
  background:
    radial-gradient(circle at 35% 25%, rgba(216,31,38,.12), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(69,160,242,.08), transparent 55%);
  filter:blur(2px);
  opacity:.6;
  pointer-events:none;
  animation:driftHalo 26s ease-in-out infinite;
  mix-blend-mode:screen;
  z-index:-1;
}
.nav a,.nav button{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:12px;
  color:#e2e8f0;
  border:1px solid transparent;
  background:transparent;
  cursor:pointer;
  text-decoration:none;
  width:100%;
  text-align:left;
  font-weight:600;
  letter-spacing:.02em;
  font-size:14px;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .12s ease;
  position:relative;
}
.nav a:hover:not(.active),.nav button:hover{
  background:rgba(148,163,184,.16);
  border-color:rgba(148,163,184,.28);
  color:#ffffff;
}
.nav a.active{
  background:linear-gradient(135deg, rgba(216,31,38,.92), rgba(216,31,38,.65));
  color:#ffffff;
  border-color:rgba(216,31,38,.6);
  box-shadow:0 18px 34px -20px rgba(216,31,38,.65);
}
.nav a.active::after{
  content:'';
  position:absolute;
  inset:4px;
  border-radius:10px;
  border:1px solid rgba(216,31,38,.6);
  box-shadow:0 0 26px -10px var(--halo);
  pointer-events:none;
}
.shell .wrap{max-width:unset;width:100%;padding:0}
header.appbar{
  position:relative;
  z-index:1;
  background:linear-gradient(135deg, rgba(8,13,25,.95), rgba(4,7,15,.96));
  border:1px solid rgba(148,163,184,.12);
  box-shadow:0 26px 60px -48px rgba(0,0,0,.9);
  border-radius:24px;
  overflow:hidden;
}

header.appbar::after{
  content:'';
  position:absolute;
  inset:8px 40px auto 40px;
  height:140px;
  background:
    url('/logo') left 12% top 10%/120px no-repeat,
    url('/logo') right 18% bottom 5%/90px no-repeat,
    url('/logo') center/170px no-repeat;
  opacity:.08;
  pointer-events:none;
  filter:grayscale(1) saturate(.6);
  mix-blend-mode:soft-light;
  z-index:-1;
}

header.appbar::before{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at top right, rgba(216,31,38,.14), transparent 55%);
  opacity:.8;
  pointer-events:none;
  z-index:-1;
  animation:driftHalo 20s ease-in-out infinite;
}

.appbar-info{
  display:flex;
  align-items:center;
  gap:16px;
  position:relative;
  z-index:2;
}
.appbar-info img{
  height:42px;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.card input,
.card textarea,
.card select{
  background:rgba(6,10,18,.82);
  border:1px solid rgba(148,163,184,.18);
  color:#e2e8f0;
  border-radius:14px;
  padding:12px 14px;
  font-weight:500;
  transition:border-color .2s ease, box-shadow .2s ease, transform .1s ease;
}

.card input:focus,
.card textarea:focus,
.card select:focus{
  border-color:rgba(216,31,38,.65);
  box-shadow:0 0 0 3px rgba(216,31,38,.22);
  transform:translateY(-1px);
  outline:none;
}

.card label{
  color:rgba(226,232,240,.8);
  letter-spacing:.08em;
}
html{
  overflow-x:hidden;
}
body{
  font-size:16px;
  font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  min-height:100vh;
  background-color:#05070d;
  background-image:
    radial-gradient(1200px 800px at 15% 10%, rgba(216,31,38,.12), transparent 60%),
    radial-gradient(900px 620px at 85% 0%, rgba(14,165,233,.08), transparent 65%),
    linear-gradient(135deg, rgba(15,23,42,.95), rgba(2,6,23,.98));
  color:#e2e8f0;
  position:relative;
  z-index:0;
  overflow-x:hidden;
}
body::before{
  content:'';
  position:fixed;
  inset:-25% -10% 45% -10%;
  background:radial-gradient(circle at 20% 20%, var(--brand-soft), transparent 70%);
  filter:blur(60px);
  opacity:.55;
  animation:brandPulse 18s ease-in-out infinite;
  pointer-events:none;
  z-index:-2;
}
body::after{
  content:'';
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,.2), transparent 60%),
    linear-gradient(155deg, rgba(255,255,255,.04), rgba(0,0,0,0) 45%),
    url('/logo');
  background-repeat:space;
  background-size:220px;
  background-position:center;
  opacity:.14;
  pointer-events:none;
  filter:grayscale(1) contrast(1.2) brightness(1.05);
  mix-blend-mode:soft-light;
  z-index:-1;
  box-shadow:inset 0 0 40px rgba(0,0,0,.35), inset 0 12px 24px rgba(255,255,255,.08);
  background-blend-mode:screen, multiply, luminosity;
}

/* Reljefasta tekstura sa više logotipa za tamne varijante */
body.dark::after,
body.dark.discounts-hidden::after{
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(40deg, rgba(216,31,38,.06), transparent 65%),
    url('/logo');
  background-repeat:space;
  background-size:200px;
  background-position:center;
  opacity:.22;
  filter:grayscale(1) contrast(1.2) brightness(1.08);
  mix-blend-mode:soft-light;
  box-shadow:inset 0 0 56px rgba(0,0,0,.45), inset 0 16px 28px rgba(255,255,255,.1);
  background-blend-mode:screen, multiply, luminosity;
}

.card{
  position:relative;
  border-radius:18px;
  background:rgba(15,23,42,.92);
  border:1px solid rgba(148,163,184,.08);
  box-shadow:0 26px 60px -46px rgba(0,0,0,.85);
  backdrop-filter:blur(16px);
  transition:transform .25s ease, box-shadow .25s ease;
  overflow:hidden;
} /* ← zatvoreni blok */

.card::before,
.card::after{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
}
.card::before{
  background:linear-gradient(120deg, transparent 20%, rgba(255,255,255,.06) 45%, transparent 70%);
  opacity:0;
  transform:skewX(-20deg) translateX(-140%);
}
.card::after{
  inset:-60% -20%;
  background:radial-gradient(circle at top right, rgba(216,31,38,.18), transparent 55%);
  opacity:0;
  transition:opacity .35s ease;
}
.card:hover{
  transform:translateY(-4px);
  box-shadow:0 40px 80px -50px rgba(0,0,0,.9);
}
.card:hover::after{
  opacity:.35;
}
.card:hover::before{
  opacity:.7;
  animation:sheenSweep 1.1s ease forwards;
}

.panel-button, .sidebar button, button, input[type=button], input[type=submit], .nav button{
  border-radius:14px;
  border:1px solid transparent;
  font-weight:600;
  letter-spacing:.02em;
  transition:transform .2s ease, box-shadow .3s ease, background .3s ease;
}

.panel-button:hover,
.sidebar button:hover,
button:hover,
input[type=button]:hover,
input[type=submit]:hover,
.nav button:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 40px -26px rgba(0,0,0,.8), 0 0 28px -12px var(--halo);
}

.panel-button:focus-visible,
.sidebar button:focus-visible,
button:focus-visible,
input[type=button]:focus-visible,
input[type=submit]:focus-visible,
.nav button:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;
}

.table-wrap table{
  border-collapse:separate;
  border-spacing:0;
}
.table-wrap table tbody tr{
  transition:transform .25s ease, box-shadow .3s ease;
  isolation:isolate;
  position:relative;
}
.table-wrap table tbody tr:hover{
  transform:translateY(-2px);
  box-shadow:0 28px 60px -44px rgba(0,0,0,.75);
}
.table-wrap table tbody td{
  position:relative;
  z-index:1;
}
.table-wrap table tbody td::after{
  content:'';
  position:absolute;
  inset:6px;
  border-radius:12px;
  background:radial-gradient(circle at top, rgba(216,31,38,.14), transparent 70%);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
}
.table-wrap table tbody tr:hover td::after{
  opacity:1;
}

@media (prefers-reduced-motion: reduce){
  .sidebar::before,
  .appbar-info img,
  body::before{
    animation:none;
  }
  .card:hover::before{
    animation:none;
  }
}
