body.scan-kiosk-page {
      margin: 0;
      font-family: var(--brand-font-family, 'Poppins', Arial, sans-serif);
      display: flex;
      flex-direction: column;
      height: 100vh;
      background: var(--brand-page-bg, #f4f9fc);
    }

    .header {
      background: #ffffff;
      padding: 10px 20px;
      display: flex;
      align-items: center;
      border-bottom: 3px solid var(--brand-primary, #29abe2);
    }

    .header .logo-title {
      display: flex;
      align-items: center;
      gap: 15px;
      width: 100%;
      justify-content: space-between;
    }

    .header img {
      height: 4rem;
      width: auto;
      margin-left: 3rem;
    }

    .header .system-title {
      font-size: clamp(14px, 2.5vw, 32px);
      font-weight: 700;
      color: var(--brand-primary-darker, #125a82);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-family: 'Poppins', sans-serif;
      text-align: right;
      padding-right: 1rem;
    }

    .footer1{
      background: var(--brand-footer-bg, #125a82);
      padding: 10px 20px;
      display: flex;
      align-items: center;
      position: relative;   /* so child absolute positioning is relative to this */
      overflow: hidden; /* hides overflow */

    }
    .footer1 .footer-logo{
      display: flex;
      align-items: center;
      gap: 15px;
      width: 100%;
      justify-content: space-between;

    }
    .marquee-container {
      width: 100%;
      overflow: hidden;
      background-color: var(--brand-footer-bg, #125a82);
      color: #ffffff;
      border-top: 2px solid var(--brand-primary, #29abe2);
      padding: 15px 0;
      box-sizing: border-box;
    }

    .marquee {
      display: inline-block;
      white-space: nowrap;
      padding-left: 100%;
      animation: scan-marquee-scroll 15s linear infinite;
      font-family: 'Poppins', sans-serif;
      font-weight: 700;
      font-size: 24px;
      color: #ffffff;
    }

    @keyframes scan-marquee-scroll {
      0% { transform: translateX(0%); }
      100% { transform: translateX(-100%); }
    }

    .footer1 .footer-title{
      font-size: 30px;
      font-weight: bold;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 2px;
      font-family: 'Poppins', sans-serif;
      left: 100%;           /* start fully off the right edge */
      white-space: nowrap; /* keep text on one line */
      display: inline-block;
      /* Start off-screen to the left */
      transform: translateX(100%);
      /* Animate continuously */
      animation: scrollMarquee 15s linear infinite;

    }
    @keyframes scrollMarquee {
      0% {
        transform: translateX(0);
      }
      100% {
        transform: translateX(370%);
      }
    }
    .home-button {
            display: inline-block;
            margin: 20px;
            padding: 10px 20px;
            background-color: var(--brand-button-bg, #29abe2);
            color: var(--brand-button-text, #ffffff);
            transition: color 0.3s, transform 0.3s;
            text-decoration: none;
            border-radius: 10px;
    }

    .home-button:hover {
            background-color: var(--brand-button-hover-bg, #1a8fc4);
            color: var(--brand-button-text, #ffffff);
    }

    .main {
      display: flex;
      flex: 1;
    }

    .sidebar {
      width: 350px;
      background: linear-gradient(180deg, var(--brand-primary, #29abe2) 0%, var(--brand-primary-dark, #1a8fc4) 100%);
      color: #ffffff;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .name-box{
      width: 350px;
      height: 10rem;
      margin-top: 2rem;
      background: #ffffff;
      border-top-left-radius: 30px;
      border-top-right-radius: 30px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

    .sidebar .name-box .label,
    .sidebar .name-box .timestamp {
      color: #64748b;
    }
    .date {
      font-size: 16px;
      margin-bottom: 5px;
      color: rgba(255, 255, 255, 0.95);
    }

    .time {
      font-size: 28px;
      font-weight: bold;
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
      margin-bottom: 20px;
    }

    .profile-pic {
      width: 200px;
      height: 200px;
      border-radius: 10px;
      background-color: #ffffff;
      overflow: hidden;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .profile-pic img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .student-name {
          color: #1e293b;
          font-weight: bold;
          font-size: 2rem;
          word-wrap: break-word;
          overflow-wrap: break-word;
          text-align: center;
          white-space: normal; /* Allows line breaking */
          max-width: 100%;     /* Prevents overflow */
    }

    .label {
      font-size: 14px;
      color: #cbd5e1;
      margin-bottom: 15px;
    }
    .timestamp{
      font-size: 14px;
      color: #cbd5e1;
      margin-top: 15px;
    }

    .status-button {
      font-size: 25px;
      background: var(--brand-primary-darker, #125a82);
      color: #ffffff;
      padding: 8px 100px;
      border-radius: 25px;
      font-weight: bold;
      text-align: center;
      min-height: 28px;
    }

    .status-button.status-out {
      background: #dc2626;
    }

    .right-content {
      flex: 1;
      background: linear-gradient(135deg, #e8f4fc 0%, #f4f9fc 50%, #dceef8 100%);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .right-content video,
    .right-content iframe {
      max-width: 90%;
      border: 3px solid var(--brand-primary, #29abe2);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(41, 171, 226, 0.25);
    }

    .scan-animation {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      
      border-radius: 8px;
      
  
      overflow: hidden;
    }

    /* The moving scan line */
    .scan-animation::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 4px;
      background: var(--brand-primary, #29abe2);
      box-shadow: 0 0 8px rgba(41, 171, 226, 0.8);
      animation: scanline 4s linear infinite;
    }


    /* Scan line animation */
    @keyframes scanline {
      0% {
        top: 0;
      }
      50% {
        top: calc(100% - 4px);
      }
      100% {
        top: 0;
      }
    }
    .ads-vid{
      width: 100%;
      height: auto;
      border-radius: 8px;
      pointer-events: none;
    }
    
    /* ===== SECTION MODAL CARD GRID ===== */
    
    .section-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      justify-content: center;
      align-items: center;
      z-index: 9999;
      backdrop-filter: blur(4px);
    }
    
    .modal-content {
      background: #ffffff;
      padding: 40px;
      width: min(920px, 95vw);
      max-width: 95%;
      max-height: 90vh;
      border-radius: 20px !important;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
      text-align: center;
      animation: modalPop 0.25s ease;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .section-picker-modal h2 {
      flex-shrink: 0;
    }
    
    @keyframes modalPop {
      from { transform: scale(0.9); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    
    .modal-content h2 {
      font-family: 'Poppins', sans-serif;
      font-weight: 700;
      margin-bottom: 30px;
      font-size: 26px;
      color: var(--brand-primary-darker, #125a82);
      letter-spacing: 1px;
    }
    
    .section-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 16px;
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      padding: 4px 2px 8px;
      align-content: start;
    }

    .section-buttons[data-count="1"],
    .section-buttons[data-count="2"] {
      grid-template-columns: repeat(2, 1fr);
    }

    .section-buttons[data-count="3"],
    .section-buttons[data-count="4"] {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 640px) {
      .section-buttons[data-count="5"],
      .section-buttons[data-count="6"],
      .section-buttons[data-count="7"],
      .section-buttons[data-count="8"] {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    .section-empty-msg {
      grid-column: 1 / -1;
      margin: 0;
      padding: 1rem;
      color: #64748b;
      font-size: 15px;
    }
    
    /* CARD STYLE */
    .section-buttons button {
      padding: clamp(14px, 2.5vw, 28px) 12px;
      min-height: 72px;
      border-radius: 18px !important;
      border: none;
      font-weight: 600;
      font-size: clamp(13px, 1.4vw, 16px);
      line-height: 1.25;
      font-family: 'Poppins', sans-serif;
      cursor: pointer;
      background: linear-gradient(135deg, var(--brand-button-bg, #29abe2), var(--brand-primary-dark, #1a8fc4));
      color: white;
      transition: all 0.25s ease;
      box-shadow: 0 8px 20px rgba(0,0,0,0.15);
      word-break: break-word;
      hyphens: auto;
    }
    
    /* Hover effect */
    .section-buttons button:hover {
      transform: translateY(-6px);
      box-shadow: 0 12px 25px rgba(41, 171, 226, 0.35);
      background: linear-gradient(135deg, var(--brand-primary-dark, #1a8fc4), var(--brand-primary-darker, #125a82));
      color: #ffffff;
    }
    
    /* Click effect */
    .section-buttons button:active {
      transform: scale(0.96);
    }
    
    /* ===== FEEDBACK MODAL ===== */
    
    .feedback-card {
      width: 800px;
      max-width: 95%;
      border-radius: 20px !important;
    }
    
    .feedback-options {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 20px;
      margin: 30px 0;
    }
    
    .feedback-options button {
      background: #f8fafc;
      border: 3px solid transparent;
      padding: 25px 10px;
      border-radius: 20px !important;
      font-size: 35px;
      cursor: pointer;
      transition: 0.25s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
    }
    
    .feedback-options button span {
      font-size: 14px;
      margin-top: 10px;
    }
    
    .feedback-options button:hover {
      transform: translateY(-5px);
      border-color: var(--brand-button-bg, #29abe2);
      background: #e3f4fc;
    }
    
    .decline-btn {
      background: #e2e8f0;
      border: none;
      padding: 10px 20px;
      border-radius: 10px !important;
      cursor: pointer;
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
    }

    .decline-btn:hover {
      background: #cbd5e1;
    }

    @media (max-width: 768px) {
      .feedback-options {
        grid-template-columns: repeat(2, 1fr);
      }
      .feedback-card {
        width: 95%;
        padding: 24px 16px;
      }
      .modal-content h2 {
        font-size: 20px;
      }
    }
    
    * {
    border-radius: 0 !important;
    
    
}
@media(max-width: 1280px){
    .header img {
        height: 3rem;
        width: auto;
        margin-left: 2.5rem;
    }
}
@media(max-width: 1024px){
    .header img{
        height: 2rem;
        width: auto;
        margin-left: 2rem;
    }
    .header .system-title{
        font-size: 25px;
    }
    
    .sidebar{
        width: 300px;
        
    }
    .profile-pic{
        width: 160px;
        height: auto;
    }
}
@media(max-width: 768px){
    .header img{
        height: 1.5rem;
        width: auto;
        margin-left: 1.5rem;
    }
    .header{
        text-align: center;
    }
    .header .system-title{
        font-size: 23px;
    }
    
    .sidebar{
        width: 350px;
        
    }
    .profile-pic{
        width: 140px;
        height: auto;
    }
    .ads-vid{
        width: 100%;
        height: auto;
        position: relative;
    }
}
@media(max-width: 398px){
    .main{
        display: flex;
        direction: row;
    }
    .header{
        text-align: center;
    }
    .header img{
        height: 1rem;
        width: auto;
        margin-left: 1rem;
    }
    .header .system-title{
        font-size: 12px;
    }
    .home-button{
        font-size: 8;
        padding: 5px 15px;
        border: none;
    }
    
    .sidebar{
        width: 330px;
        
    }
    .profile-pic{
        width: 125px;
        height: auto;
    }
    .ads-vid{
        display: none;
        width: 100%;
        height: auto;
        position: relative;
    }
    .footer1{
        width: auto;
    }
}

/* Early checkout block (kinder & grade school before 4 PM) */
.sidebar--alarm {
  animation: sidebar-alarm-pulse 0.6s ease-in-out 6;
  box-shadow: inset 0 0 0 4px #fbbf24;
}

@keyframes sidebar-alarm-pulse {
  0%, 100% { background-color: var(--brand-primary, #29abe2); }
  50% { background-color: #7f1d1d; }
}

.early-out-alarm {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 3px solid #dc2626;
  color: #7f1d1d;
  text-align: center;
  animation: alarm-shake 0.4s ease-in-out 3;
}

.early-out-alarm__icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.early-out-alarm__title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.early-out-alarm__message {
  font-size: 0.95rem;
  margin: 0.5rem 0;
  line-height: 1.35;
}

.early-out-alarm__hint {
  font-size: 0.85rem;
  margin: 0;
  color: #991b1b;
}

.name-box--blocked .label {
  color: #64748b;
}

.status-button.status-blocked {
  background: #dc2626;
  padding: 8px 24px;
  font-size: 1.1rem;
}

@keyframes alarm-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}