:root{
  --bg:#f5f7fb;
  --bg2:#eef3f8;
  --surface:#ffffff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --muted2:#94a3b8;
  --line:#e3e8f0;
  --line2:#d3dbe8;
  --shadow:0 14px 34px rgba(15,23,42,.08);
  --shadow2:0 8px 22px rgba(15,23,42,.06);
  --shadow3:0 16px 42px rgba(15,23,42,.09);
  --r:18px;
  --r2:14px;
  --r3:10px;
  --mint:#d9f7ef;
  --mint2:#14b8a6;
  --lav:#eef2ff;
  --sky:#e4f2ff;
  --peach:#fff1e8;
  --warn:#fff3cf;
  --danger:#ffe0e6;
  --blue:#e8f1ff;
  --accent:#0f9f92;
  --accent2:#2563eb;
  --sans:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Apple Color Emoji","Segoe UI Emoji";
  --mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

*{ box-sizing:border-box; }

html,body{ min-height:100%; }

body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    linear-gradient(180deg,rgba(238,243,248,.92) 0%,rgba(245,247,251,.98) 42%,var(--bg) 100%);
}

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

a:hover{ opacity:.96; }

button{ font-family:inherit; }

img{ max-width:100%; }

.container{
  max-width:1180px;
  margin:0 auto;
  padding:18px 18px 70px;
}

.publicWrap{
  max-width:1120px;
  margin:0 auto;
  padding:20px;
}

.publicMain{ margin-top:20px; }

.shell{
  max-width:1440px;
  margin:0 auto;
  padding:20px 20px 80px;
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
}

.content{ min-width:0; }

.h1{
  margin:22px 0 0;
  font-size:38px;
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.6px;
}

.h2{
  margin:0;
  font-size:19px;
  line-height:1.2;
  font-weight:850;
  letter-spacing:-.2px;
}

.p{
  margin:12px 0 0;
  color:var(--muted);
  font-size:15px;
  line-height:1.62;
  font-weight:600;
}

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

.mono{ font-family:var(--mono); }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:var(--r2);
  background:rgba(255,255,255,.96);
  box-shadow:var(--shadow2);
}

.app-topbar{
  margin-bottom:18px;
  background:#fff;
}

.public-topbar{ background:#fff; }

.topbar-titleblock{ min-width:220px; }

.topbar-actions{
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

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

.brand-title{
  font-weight:900;
  font-size:17px;
  letter-spacing:-.2px;
}

.brand-sub{
  color:var(--muted);
  font-size:12px;
  margin-top:2px;
  font-weight:700;
}

.sidebar{
  position:sticky;
  top:18px;
  height:calc(100vh - 40px);
  min-height:680px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow3);
  padding:15px;
  background:#fff;
}

.sidebarBrand,
.sidebar .brand{
  padding:7px 7px 15px;
  border-bottom:1px solid var(--line);
}

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:15px 1px;
}

.navItem,
.nav a{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 11px;
  border-radius:var(--r3);
  border:1px solid transparent;
  background:#fff;
  box-shadow:none;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  text-decoration:none !important;
}

.navItem:hover,
.nav a:hover{
  transform:translateY(-1px);
  background:#f4faf9;
  border-color:rgba(15,159,146,.24);
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  opacity:1;
}

.navIcon,
.nav a > span:first-child{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px !important;
  background:#f1f6fb;
  border:1px solid var(--line);
  box-shadow:none;
}

.navText{ display:block; min-width:0; }

.navTitle,
.nav a > div > div{
  display:block;
  font-weight:850;
  font-size:14px;
  line-height:1.15;
  letter-spacing:0;
}

.nav small{
  display:block;
  color:var(--muted);
  font-weight:650;
  font-size:11px;
  margin-top:3px;
  line-height:1.25;
}

.sidebarFooter{
  border-top:1px solid var(--line);
  padding-top:14px;
  display:grid;
  gap:12px;
}

.sidebarCreditBox{
  border:1px solid var(--line);
  border-radius:var(--r2);
  padding:13px;
  background:#f8fafc;
}

.sidebarCreditTitle{
  font-size:12px;
  font-weight:850;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.07em;
}

.sidebarCredits{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:10px;
}

.sidebarCreditItem{
  border-radius:var(--r3);
  padding:10px;
  border:1px solid var(--line);
}

.sidebarCreditItem span{
  display:block;
  font-size:11px;
  font-weight:800;
  color:var(--muted);
}

.sidebarCreditItem b{
  display:block;
  margin-top:3px;
  font-size:23px;
  line-height:1;
  font-weight:900;
}

.sidebarCreditWine{ background:#ecfdf5; }

.sidebarCreditGeneric{ background:#eff6ff; }

.sidebarUser{
  border:1px solid var(--line);
  border-radius:var(--r2);
  padding:13px;
  background:#f8fafc;
}

.sidebarUserEmail{
  font-weight:850;
  font-size:13px;
  word-break:break-word;
}

.sidebarUserRole{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.sidebarButtons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:17px;
  box-shadow:var(--shadow2);
  transition:box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}

.card:hover{
  border-color:var(--line2);
  box-shadow:var(--shadow);
}

.note{
  margin-top:14px;
  border:1px dashed rgba(15,23,42,.18);
  background:#fff;
  border-radius:var(--r2);
  padding:12px 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  font-weight:600;
}

.note-ok{
  border-style:solid;
  border-color:rgba(15,159,146,.28);
  background:#ecfdf5;
  color:rgba(15,23,42,.92);
}

.note-err{
  border-style:solid;
  border-color:rgba(225,29,72,.24);
  background:#fff1f3;
  color:rgba(15,23,42,.92);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid rgba(15,23,42,.14);
  padding:11px 15px;
  border-radius:var(--r3);
  font-weight:800;
  background:#fff;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  text-align:center;
  min-height:40px;
  line-height:1.1;
  text-decoration:none !important;
  color:var(--text);
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  background:#fff;
  border-color:rgba(15,23,42,.20);
  opacity:1;
}

.btn:active{ transform:translateY(0); }

.btn-primary,
.btn.primary{
  color:#fff;
  background:var(--accent);
  border-color:var(--accent);
  box-shadow:0 6px 14px rgba(15,159,146,.18);
}

.btn-primary:hover,
.btn.primary:hover{
  background:#0d8f84;
  border-color:#0d8f84;
  box-shadow:0 8px 18px rgba(15,159,146,.22);
}

.btn-danger{
  background:#fff1f3;
  border-color:rgba(225,29,72,.28);
  color:#9f1239;
}

.btn-danger-soft{
  background:#fff7f8;
  border-color:rgba(225,29,72,.18);
  color:#9f1239;
}

form{ width:100%; }

label{
  display:block;
  margin:12px 0 7px;
  font-weight:800;
  font-size:13px;
  color:rgba(15,23,42,.90);
}

input,
select,
textarea,
.input{
  display:block;
  width:100%;
  max-width:100%;
  border:1px solid rgba(15,23,42,.14);
  border-radius:var(--r3);
  padding:12px 13px;
  font-size:15px;
  line-height:1.3;
  font-weight:650;
  outline:none;
  color:var(--text);
  background:#fff;
  transition:box-shadow .15s ease,border-color .15s ease,background .15s ease;
}

input:focus,
select:focus,
textarea:focus,
.input:focus{
  border-color:rgba(15,159,146,.62);
  box-shadow:0 0 0 4px rgba(15,159,146,.12);
  background:#fff;
}

input[type="checkbox"],
input[type="radio"]{
  width:auto;
  display:inline-block;
  margin-right:8px;
}

textarea{
  min-height:130px;
  resize:vertical;
}

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

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

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

th,td{
  padding:12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  text-align:left;
}

th{
  font-size:12px;
  color:rgba(15,23,42,.70);
  font-weight:850;
}

.pillRow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  font-weight:800;
  font-size:12px;
}

.pill-green{
  background:#e7f8f4;
  border-color:rgba(15,159,146,.24);
  color:#0f766e;
}

.pill-blue{
  background:var(--blue);
  border-color:rgba(37,99,235,.18);
  color:#1d4ed8;
}

.pill-warn{
  background:var(--warn);
  border-color:rgba(217,119,6,.22);
  color:#92400e;
}

.pill-muted{ opacity:.78; }

.hero{ margin-top:20px; }

.heroGrid{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:24px;
  align-items:center;
}

.heroArtBox,
.hero-image-box{
  border-radius:var(--r);
  background:#eef6fb;
  padding:16px;
  border:1px solid var(--line);
  box-shadow:var(--shadow2);
}

.heroArtBox img,
.hero-image{
  width:100%;
  border-radius:var(--r2);
  display:block;
  background:white;
}

.heroPoints{
  margin-top:16px;
  display:grid;
  gap:9px;
}

.heroPoint{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r2);
  padding:11px 13px;
  font-size:13px;
}

.heroPoint b{
  display:block;
  font-size:13px;
}

.footer{
  margin-top:40px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

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

  .sidebar{
    position:relative;
    top:auto;
    height:auto;
    min-height:0;
  }

  .nav{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .sidebarFooter{
    grid-template-columns:1fr;
  }
}

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

@media(max-width:900px){
  .publicWrap{
    padding:14px;
  }

  .container{
    padding:14px;
  }

  .shell{
    padding:14px 14px 70px;
  }

  .h1{
    font-size:32px;
  }

  .topbar{
    align-items:flex-start;
  }

  .heroGrid{
    grid-template-columns:1fr;
  }

  .nav{
    grid-template-columns:1fr;
  }

  .sidebarButtons{
    grid-template-columns:1fr;
  }
}

@media(max-width:560px){
  .btn{
    width:100%;
  }

  .topbar .row{
    width:100%;
  }

  .topbar .row .btn{
    width:100%;
  }

  .sidebarCredits{
    grid-template-columns:1fr;
  }

  .h1{
    font-size:29px;
  }
}
