*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#eef9f3,#f8f4e9);color:#24382f;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.shell{max-width:1100px;margin:auto;padding:22px}.hero,.card{background:rgba(255,255,255,.95);border:1px solid #d8e9df;border-radius:22px;box-shadow:0 14px 40px rgba(47,92,68,.10)}.hero{padding:28px;text-align:center;margin-bottom:18px}.card{padding:22px;margin-bottom:18px}.brand-logo{display:block;width:min(620px,92%);height:auto;margin:0 auto 14px;filter:drop-shadow(0 10px 18px rgba(47,92,68,.12))}.pill{display:inline-block;border-radius:999px;padding:7px 13px;background:#dff4e8;color:#1d6944;font-weight:800}.pill.closed{background:#ffe4dc;color:#8a3a23}h1,h2,h3{margin-top:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.stat{padding:17px;background:#f4faf6;border-radius:15px;text-align:center}.stat b{display:block;font-size:1.55rem}.muted{color:#6d8075}.notice{padding:14px 16px;border-radius:13px;background:#edf8f1;margin:12px 0}.notice.warn{background:#fff4d8}.notice.danger{background:#fde7e3}.code{font-size:2.25rem;letter-spacing:.24em;font-weight:900;text-align:center;padding:18px;border:2px dashed #8cc4a4;background:#edf8f1;border-radius:16px}.rules{white-space:pre-line;line-height:1.55;background:#f7fbf8;border-radius:14px;padding:16px}.queue-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #edf2ee}.queue-row:last-child{border:0}label{display:block;font-weight:800;margin:0 0 6px}input,textarea,select{width:100%;padding:12px 13px;border:1px solid #bfd4c7;border-radius:11px;font:inherit;background:#fff}textarea{min-height:130px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:11px;padding:12px 16px;font-weight:850;cursor:pointer;text-decoration:none;background:#2d8a57;color:#fff}.btn.secondary{background:#60766a}.btn.danger{background:#b64343}.btn.warning{background:#c67b14}.btn.full{width:100%}.actions{display:flex;gap:9px;flex-wrap:wrap}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.admin-brand{display:flex;align-items:center;gap:14px}.admin-brand img{width:180px;max-height:86px;object-fit:contain}.admin-brand h1{margin:0}.admin-logo{display:block;width:min(330px,88%);height:auto;margin:0 auto 20px}.admin-login-card{text-align:center}.admin-login-card form{text-align:left}.hidden{display:none}.tiny{font-size:.9rem}.status-dot{width:10px;height:10px;border-radius:50%;display:inline-block;background:#36a66b;margin-right:7px}.status-dot.closed{background:#c96b4f}@media(max-width:760px){.grid,.grid3{grid-template-columns:1fr}.shell{padding:12px}.hero,.card{padding:18px}.topbar,.queue-row,.admin-brand{align-items:flex-start;flex-direction:column}.code{font-size:1.75rem}.brand-logo{width:100%}.admin-brand img{width:210px}}

.admin-nav{display:flex;gap:8px;margin:0 0 18px;background:rgba(255,255,255,.9);padding:8px;border:1px solid #d8e9df;border-radius:14px;box-shadow:0 8px 24px rgba(47,92,68,.08)}
.admin-nav a{padding:11px 16px;border-radius:10px;text-decoration:none;color:#355848;font-weight:800}
.admin-nav a:hover{background:#edf8f1}
.admin-nav a.active{background:#2d8a57;color:#fff}
.admin-summary{margin-bottom:18px}
@media(max-width:760px){.admin-nav{flex-direction:column}.admin-nav a{text-align:center}}

.btn:disabled{opacity:.65;cursor:not-allowed}

.visitor-card{padding:16px 0;border-bottom:1px solid #edf2ee}.visitor-card:last-child{border-bottom:0}.visitor-card-main{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:12px}.visitor-timers{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px;font-size:.92rem}.visitor-timers span{background:#f4faf6;border-radius:9px;padding:7px 10px}@media(max-width:760px){.visitor-card-main{flex-direction:column}.visitor-timers{flex-direction:column;gap:7px;width:100%}.visitor-timers span{display:block}}

.visitor-timeline{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.visitor-timeline span{font-size:.82rem;background:#eef5f0;border-radius:999px;padding:5px 9px}.report-card{border:1px solid #dfece4;border-radius:12px;margin-bottom:10px;padding:12px}.report-card summary{cursor:pointer}.report-table-wrap{overflow-x:auto;margin-top:12px}.report-table{width:100%;border-collapse:collapse;min-width:760px}.report-table th,.report-table td{text-align:left;padding:10px;border-bottom:1px solid #edf2ee;vertical-align:top}


[hidden]{display:none!important}
body.lightbox-open{overflow:hidden}

.rules-lightbox{
  position:fixed;
  inset:0;
  z-index:2147483647;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(20,38,30,.78);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.rules-lightbox-panel{
  width:min(640px,100%);
  max-height:88vh;
  overflow-y:auto;
  background:#fff;
  border:1px solid #d8e9df;
  border-radius:24px;
  padding:26px;
  box-shadow:0 30px 100px rgba(0,0,0,.42);
  animation:rulesLightboxIn .18s ease-out;
}

.rules-lightbox-icon{
  font-size:2.2rem;
  text-align:center;
  margin-bottom:8px;
}

.rules-lightbox-panel h2{
  text-align:center;
  margin-bottom:6px;
}

.rules-lightbox-panel>p{
  text-align:center;
  margin-top:0;
}

.rules-lightbox-body{
  max-height:46vh;
  overflow-y:auto;
  margin:18px 0;
  border:1px solid #dfece4;
}

.ack-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:18px 0;
  padding:14px;
  background:#f3f9f5;
  border-radius:12px;
  cursor:pointer;
}

.ack-check input{
  width:auto;
  margin-top:3px;
  transform:scale(1.2);
}

@keyframes rulesLightboxIn{
  from{opacity:0;transform:translateY(12px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

@media(max-width:600px){
  .rules-lightbox{padding:12px;align-items:flex-end}
  .rules-lightbox-panel{
    width:100%;
    max-height:92vh;
    border-radius:22px 22px 12px 12px;
    padding:20px;
  }
}


.table-panel{width:100%}
.admin-table-wrap{width:100%;overflow-x:auto;border:1px solid #dfece4;border-radius:14px}
.admin-table{width:100%;border-collapse:collapse;min-width:900px;background:#fff}
.admin-table th{background:#f1f8f4;color:#355848;font-size:.82rem;text-transform:uppercase;letter-spacing:.04em}
.admin-table th,.admin-table td{padding:12px 14px;text-align:left;vertical-align:top;border-bottom:1px solid #e8f0eb}
.admin-table tbody tr:last-child td{border-bottom:0}
.admin-table tbody tr:hover{background:#fbfdfc}
.current-visitors-table{min-width:980px}
.session-report-table{min-width:1100px}
.timeline-stack{display:grid;gap:4px;font-size:.84rem;white-space:nowrap}
.table-actions{flex-wrap:nowrap}
.report-card{padding:0;overflow:hidden}
.report-card summary{padding:14px 16px;background:#f7fbf8}
.report-card[open] summary{border-bottom:1px solid #dfece4}
.report-card .admin-table-wrap{border:0;border-radius:0}
.report-card+.report-card{margin-top:12px}

@media(max-width:760px){
  .admin-table-wrap{overflow:visible;border:0}
  .admin-table,.current-visitors-table,.session-report-table{min-width:0}
  .admin-table thead{display:none}
  .admin-table,.admin-table tbody,.admin-table tr,.admin-table td{display:block;width:100%}
  .admin-table tr{margin-bottom:14px;border:1px solid #dfece4;border-radius:14px;overflow:hidden;background:#fff}
  .admin-table td{display:grid;grid-template-columns:118px minmax(0,1fr);gap:12px;padding:10px 12px;border-bottom:1px solid #edf2ee}
  .admin-table td:last-child{border-bottom:0}
  .admin-table td::before{content:attr(data-label);font-weight:800;color:#486555}
  .table-actions{flex-wrap:wrap}
  .timeline-stack{white-space:normal}
  .report-card{border:0;padding:0}
  .report-card summary{border:1px solid #dfece4;border-radius:12px}
  .report-card[open] summary{border-radius:12px 12px 0 0}
}

.activity-feed{display:grid;gap:0}
.activity-row{display:grid;grid-template-columns:90px 30px minmax(0,1fr);gap:10px;align-items:start;padding:10px 0;border-bottom:1px solid #edf2ee}
.activity-row:last-child{border-bottom:0}
.activity-row time{font-weight:800;color:#5b7467}
.activity-icon{text-align:center}
.report-notes{margin:14px 16px}
@media(max-width:600px){.activity-row{grid-template-columns:72px 26px minmax(0,1fr);font-size:.9rem}}

.report-card summary{display:flex;align-items:center;justify-content:space-between;gap:14px}
.report-summary-content{min-width:0}
.report-delete-button{flex:0 0 auto;padding:8px 12px}
@media(max-width:760px){
  .report-card summary{align-items:flex-start;flex-direction:column}
  .report-delete-button{width:100%}
}


.arrival-reminder{
  background:#eaf4ff;
  border:1px solid #bcd8f2;
  color:#24465f;
}
.arrival-confirmed{
  background:#eaf8ee;
  border:1px solid #b9dfc4;
  color:#245a35;
}


.arrival-button{
  min-width:220px;
  padding:16px 24px;
  font-size:1.08rem;
  background:#238b4b;
  box-shadow:0 8px 20px rgba(35,139,75,.24);
}
.arrival-button:hover:not(:disabled){
  background:#19783e;
  transform:translateY(-1px);
}
.arrival-button:disabled{
  background:#669a76;
  box-shadow:none;
}
@media(max-width:600px){
  .arrival-button{
    width:100%;
    min-width:0;
    order:-1;
  }
}


.departure-button{
  min-width:220px;
  padding:16px 24px;
  font-size:1.08rem;
  background:#d77a12;
  box-shadow:0 8px 20px rgba(215,122,18,.24);
}
.departure-button:hover{
  background:#bd6504;
  transform:translateY(-1px);
}
@media(max-width:600px){
  .departure-button{
    width:100%;
    min-width:0;
  }
}
