:root{
  --bg: #f6f5f1;
  --paper: #ffffff;
  --card: #ffffff;
  --text: #1c1b18;
  --muted: #5a5a54;
  --line: rgba(28,27,24,0.12);
  --accent: #0ea5a4;
  --accent-strong: #0b7d7c;
  --accent-warm: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 40px rgba(20,20,18,0.12);
  --radius: 22px;
  --surface: rgba(255,255,255,0.86);
}
body{
  margin:0;
  min-height:100vh;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(14,165,164,0.18), transparent 55%),
    radial-gradient(800px 520px at 95% 10%, rgba(245,158,11,0.2), transparent 60%),
    linear-gradient(180deg, #f7f5f0 0%, #f3f1ec 100%);
  background-color: var(--bg);
  color: var(--text);
  letter-spacing: 0.01em;
  background-attachment: fixed, fixed, fixed;
  overflow: hidden;
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  user-select: none;
}
body.is-gated .app{
  filter: blur(18px) saturate(0.85);
  transform: translateZ(0);
  pointer-events: none;
}
.access-gate{
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(22px) saturate(0.8);
  -webkit-backdrop-filter: blur(22px) saturate(0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.access-gate.is-visible{
  display: flex;
}
.access-gate__card{
  max-width: 520px;
  width: min(520px, 92vw);
  border-radius: 22px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(20,20,18,0.12);
  box-shadow: 0 24px 50px rgba(20,20,18,0.2);
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}
.access-gate--login .access-gate__card{
  width:min(420px,92vw);
  padding:24px 26px;
  display:grid;
  gap:12px;
  text-align:left;
}
.access-gate--login .access-gate__text{
  font-size:14px;
  color:rgba(20,20,18,0.75);
}
.admin-login-form{
  display:grid;
  gap:12px;
}
.admin-login-form label{
  display:grid;
  gap:6px;
  font-size:12px;
  color:rgba(28,27,24,0.85);
}
.admin-login-form input{
  height:42px;
  border-radius:12px;
  border:1px solid rgba(20,20,18,0.16);
  padding:0 12px;
  font-size:15px;
  font-family:"Manrope","Segoe UI",sans-serif;
  background:rgba(255,255,255,0.95);
}
.admin-login__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.admin-login__status{
  min-height:18px;
  font-size:13px;
  color:#d6742d;
}
.access-gate__title{
  font-weight: 700;
  font-size: 18px;
  color: rgba(20,20,18,0.95);
}
.access-gate__text{
  font-size: 14px;
  color: rgba(28,27,24,0.7);
  line-height: 1.4;
}
.app{
  max-width: 1180px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 18px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: var(--app-height, 100vh);
  gap: 16px;
}
.content-shell{
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.form-scroll{
  flex: 1;
  overflow-y: auto;
  padding: 0 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overscroll-behavior: contain;
}


*{ box-sizing: border-box; }
html,body{
  height: var(--app-height, 100%);
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
button,
input,
.number-picker__option{
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
button{
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
}
input::selection{
  background: transparent;
}
.topbar{
  position: sticky;
  top: 16px;
  z-index: 20;
  padding: 22px 26px;
  margin-bottom: 16px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.9)),
    rgba(255,255,255,0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}
.topbar__grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: center;
}
.topbar__text h1{
  margin: 0;
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: 32px;
  letter-spacing: 0.2px;
}
.topbar__text .sub{
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 360px;
}
.topbar__eyebrow{
  margin: 0;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.45em;
  color: rgba(28,27,24,0.5);
}
.topbar__aux{
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
}
.topbar__aux .meta{
  width: 100%;
}
.topbar h1{
  margin:0;
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: 32px;
  letter-spacing: 0.2px;
}
.sub{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.meta{
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(20,20,18,0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  box-shadow: inset 0 0 0 1px rgba(20,20,18,0.02);
}
.meta__label{
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.date-picker{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 20px;
  border: 1px solid rgba(20,20,18,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.88));
  box-shadow: 0 16px 30px rgba(43,45,52,0.12);
  cursor: pointer;
  position: relative;
  min-width: 220px;
  min-height: 60px;
}
.date-picker input{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  cursor: pointer;
}
.date-picker__icon{
  font-size: 18px;
}
.date-picker__value{
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  flex: 1;
  min-width: 0;
  pointer-events: none;
}
.calendar-popover{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: clamp(280px, 34vw, 360px);
  max-height: 440px;
  border-radius: 22px;
  border: 1px solid rgba(20,20,18,0.15);
  background: var(--card);
  box-shadow: 0 35px 65px rgba(18,18,16,0.22);
  padding: 18px;
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 30;
  visibility: hidden;
  overflow: hidden;
}
.calendar-popover--visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.calendar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-title{
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
}
.calendar-nav{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(20,20,18,0.15);
  background: rgba(246,245,241,0.95);
  color: var(--text);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s ease, transform .15s ease;
}
.calendar-nav:active{
  transform: translateY(1px);
}
.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.calendar-weekday{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  text-align: center;
}
.calendar-cell{
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(246,245,241,0.8);
}
.calendar-cell--empty{
  background: transparent;
  border: 0;
}
.calendar-cell--day{
  border: 1px solid rgba(20,20,18,0.08);
  background: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.calendar-cell--day:hover{
  border-color: var(--accent);
  transform: translateY(-1px);
}
.calendar-cell--selected{
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: white;
  border-color: rgba(14,165,164,0.6);
  box-shadow: 0 10px 24px rgba(14,165,164,0.3);
}
.calendar-cell--today{
  box-shadow: inset 0 0 0 1px rgba(14,165,164,0.5);
}
.calendar-cell--weekend{
  color: rgba(0,0,0,0.55);
}
.modal{
  position: fixed;
  inset: 0;
  background: rgba(16,20,29,0.4);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  visibility: hidden;
  z-index: 50;
}
.modal--visible{
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.modal__overlay{
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
}
.modal__box{
  position: relative;
  background: #ffffff;
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 35px 60px rgba(0,0,0,0.25);
  max-width: 480px;
  width: min(96vw, 480px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1;
  max-height: 82vh;
}
.modal__title{
  font-size: 18px;
  font-weight: 700;
}
.modal__info{
  font-size: 12px;
  color: var(--muted);
}
.modal__subtitle{
  font-size: 13px;
  color: var(--muted);
}
.summary-meta{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.summary-meta strong{
  color: var(--text);
}
.summary-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.summary-section{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(20,20,18,0.08);
  background: rgba(246,245,241,0.9);
  min-height: 80px;
}
.summary-section__title{
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(20,20,18,0.08);
  background: rgba(246,245,241,0.8);
}
.summary-row--filled{
  border-color: rgba(14,165,164,0.35);
  background: rgba(14,165,164,0.12);
}
.summary-row strong{
  font-size: 14px;
}
.modal__actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal__actions .btn{
  flex: 1;
}

.number-picker{
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(20,20,18,0.2);
  box-shadow: 0 15px 35px rgba(20,20,18,0.2);
  transition: opacity .2s ease;
  opacity: 0;
  z-index: 30;
  width: min(240px, calc(100% - 32px));
}
.number-picker__option{
  border: 1px solid rgba(20,20,18,0.1);
  background: rgba(14,165,164,0.08);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-width: 44px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.number-picker__option:hover{
  border-color: var(--accent);
  background: rgba(14,165,164,0.12);
  transform: translateY(-1px);
}

.card{
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 20px;
  backdrop-filter: blur(14px);
}
.card--form{
  border: 1px solid var(--line);
}

.section{
  padding: 14px 0;
}
.section + .section{
  border-top: 1px solid var(--line);
}
.section__title{
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #2b2b28;
  margin-bottom: 12px;
}

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid rgba(20,20,18,0.08);
  box-shadow: 0 10px 30px rgba(18,18,16,0.06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.field--filled{
  border-color: rgba(14,165,164,0.45);
  box-shadow: 0 16px 36px rgba(14,165,164,0.18);
  transform: translateY(-1px);
}

.field__label{
  color: #6a6a63;
  font-size: 13px;
  line-height: 1.25;
}
.field--filled .field__label{
  color: var(--accent-strong);
  font-weight: 600;
}
.field__control{
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.field__input{
  width: 100%;
  min-width: 96px;
  height: 56px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid rgba(20,20,18,0.12);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  caret-color: transparent;
}
.stepper{
  height: 56px;
  width: 56px;
  border-radius: 18px;
  border: 1px solid rgba(20,20,18,0.16);
  background: rgba(255,255,255,0.95);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .2s ease, color .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.stepper--plus,
.stepper--minus{
  color: #1f1f1b;
}
.stepper.stepper--hover{
  background: rgba(14,165,164,0.15);
  border-color: rgba(14,165,164,0.5);
  box-shadow: 0 12px 18px rgba(14,165,164,0.25);
}
.stepper:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,165,164,0.35);
}
.field__input:hover{
  border-color: rgba(14,165,164,0.45);
  box-shadow: 0 0 0 3px rgba(14,165,164,0.08);
}
.stepper:active{
  transform: translateY(1px);
}
.stepper:focus-visible{
  outline: 3px solid rgba(14,165,164,0.2);
  outline-offset: 1px;
}
.number-picker__option{
  user-select: none;
}

.field__input:focus-visible{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,164,0.25);
}

.actions{
  display:flex;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn{
  border: 1px solid rgba(14,165,164,0.5);
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: white;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease, opacity .15s ease, box-shadow .15s ease;
  box-shadow: 0 12px 22px rgba(14,165,164,0.22);
}

.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .6; cursor: not-allowed; }

.btn--ghost{
  background: rgba(255,255,255,0.7);
  color: #1f1f1b;
  border-color: rgba(20,20,18,0.18);
  box-shadow: none;
}

.status{
  margin-left: auto;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(20,20,18,0.12);
  background: rgba(255,255,255,0.7);
  color: var(--muted);
  min-width: 220px;
}
.status:empty{
  display: none;
}
.status--ok{
  border-color: rgba(14,165,164,0.35);
  color: #1f1f1b;
}
.status--err{
  border-color: rgba(220,38,38,0.4);
  color: #1f1f1b;
}

code{
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(20,20,18,0.1);
}

@media (max-width: 980px){
  .app{
    padding: 20px 14px 24px;
  }
}

@media (max-width: 760px){
  .topbar{
    padding: 18px 20px;
  }
  .topbar__grid{
    grid-template-columns: 1fr;
  }
  .topbar__aux{
    justify-content: flex-start;
  }
  .meta{
    width: 100%;
  }
  .grid{
    grid-template-columns: 1fr;
  }
  .calendar-popover{
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translate(-50%, 0);
    width: min(92vw, 360px);
    max-height: 82vh;
  }
}

@media (prefers-reduced-motion: no-preference){
  .card{
    animation: floatIn 0.6s ease both;
  }
  .section{
    animation: fadeUp 0.6s ease both;
  }
  .section:nth-child(1){ animation-delay: 0.05s; }
  .section:nth-child(2){ animation-delay: 0.1s; }
  .section:nth-child(3){ animation-delay: 0.15s; }
  .section:nth-child(4){ animation-delay: 0.2s; }
}

@keyframes floatIn{
  from{ opacity: 0; transform: translateY(12px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}
