* { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: Arial, Helvetica, sans-serif, poppins;
    background: #f0f4ff;
    min-height: 100vh;
  }

  /* ── HEADER matching reference ── */
  header {
    background: #020075;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 68px;
    border-bottom: 3px solid #ffffff;
  }

  .logo-box {
    background-color: transparent  ;
    width: 52px;
    height: 52px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 16px;
    border-radius: 2px;
  }
.logo-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
    
  
}
  .header-title {
    color: #ffffff;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 900;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .header-clock {
    margin-left: auto;
    text-align: right;
    color: #ffffff;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
  }

  /* ── BODY ── */
  .body-wrap {
    max-width: 1100px;
    margin: 28px auto;
    padding: 0 18px 40px;
  }

  /* Modal Styles (must be global — #confirmationModal sits outside .body-wrap in HTML) */
  .modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    box-sizing: border-box;
    overflow: auto;
    padding: 20px 16px;
  }
  .modal.is-open {
    display: flex;
  }
  .modal-content {
    background: #fff;
    padding: 32px 28px 22px 28px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 8px rgba(2,0,117,0.08);
    width: 100%;
    max-width: 370px;
    position: relative;
    border: none;
    text-align: center;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    animation: modalPop 0.18s cubic-bezier(.4,1.6,.6,1) 1;
  }
  @keyframes modalPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
  }
  .close {
    color: #bbb;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 18px;
    top: 12px;
    transition: color 0.18s;
  }
  .close:hover, .close:focus {
    color: #020075;
    text-decoration: none;
    cursor: pointer;
  }
  .modal-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
  }
  .modal-actions button {
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    background: #020075;
    color: #fff;
    font-size: 16px;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(2,0,117,0.06);
    transition: background 0.18s, box-shadow 0.18s;
  }
  .modal-actions button:hover {
    background: #1a1a99;
    box-shadow: 0 2px 8px rgba(2,0,117,0.10);
  }
  #confirmDetails {
    margin: 18px 0 0 0;
    font-size: 17px;
    line-height: 1.8;
    color: #222;
    text-align: left;
    background: #f7f8ff;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(2,0,117,0.04);
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  }
  #confirmationModal h2 {
    font-size: 22px;
    font-weight: 700;
    color: #020075;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  }
  .confirm-review-hint {
    font-size: 13px;
    color: #555;
    margin-top: 10px;
    line-height: 1.45;
    text-align: left;
  }
  .modal-actions .btn-modal-secondary {
    background: #fff;
    color: #020075;
    border: 2px solid #020075;
    box-shadow: none;
  }
  .modal-actions .btn-modal-secondary:hover {
    background: #f0f2ff;
    box-shadow: 0 1px 4px rgba(2, 0, 117, 0.12);
  }

  /* Now Serving */
  .serving-bar {
    background: #00008B;
    color: #ffffff;
    border-radius: 6px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 3px 10px rgba(0,0,139,0.25);
  }
  .serving-counters { display: flex; gap: 10px; }
  .serving-card-mini {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 180px;
    text-align: right;
  }
  .mini-title { font-size: 11px; text-transform: uppercase; opacity: 0.8; }
  .mini-detail { font-size: 11px; opacity: 0.9; margin-top: 2px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .serving-card-full {
    background: #fff;
    border: 1px solid #FF0000;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display:inline-block;
  }
  .serving-full-title { color:rgb(179, 17, 17); font-weight: bold; font-size: 13px; }
  .serving-full-sub { color: #555; font-size: 12px; margin-top: 3px; }

  .serving-label {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
  }

  .serving-val {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 2px;
  }

  .serving-note {
    font-size: 11px;
    opacity: 0.65;
    margin-top: 2px;
    text-align: right;
  }

  /* Main grid */
  .main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  @media(max-width: 760px) { .main-grid { grid-template-columns: 1fr; } }
  @media(max-width: 760px) { .serving-counters { flex-direction: column; } }

  /* Card */
  .card {
    background: #fff;
    border: 2px solid #00008B;
    border-radius: 6px;
    overflow: visible;
  }

  .card-head {
    background: #0b1628;
    border-radius: 4px 4px 0 0;
font: arial;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .card-body { padding: 22px 20px; }

  /* Form */
  .form-row { margin-bottom: 16px; }

  .form-row label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #00008B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
  }

  .form-row input,
  .form-row select {
    width: 100%;
    border: 1.5px solid #b0b8d4;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f7f8ff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
  }

  .form-row input:focus,
  .form-row select:focus {
    border-color: #00008B;
    box-shadow: 0 0 0 3px rgba(0,0,139,0.12);
    background: #fff;
  }

  .form-row input.err,
  .form-row select.err {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
  }

  .err-msg {
    color: #cc0000;
    font-size: 11px;
    margin-top: 4px;
    display: none;
  }

  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300008B' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
  }


  /* Multi-select styled to match select */
  .multi-select-wrap {
    position: relative;
    width: 100%;
  }
  .multi-select-trigger {
    width: 100%;
    border: 1.5px solid #b0b8d4;
    border-radius: 4px;
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f7f8ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300008B' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }
  .multi-select-trigger:hover {
    border-color: #00008B;
    background: #fff;
  }
  .multi-select-trigger:focus {
    outline: none;
    border-color: #00008B;
    box-shadow: 0 0 0 3px rgba(0,0,139,0.12);
    background: #fff;
  }
  .multi-select-trigger.err,
  .multi-select-wrap.err .multi-select-trigger {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
  }
  .multi-select-trigger[aria-expanded="true"] {
    border-color: #00008B;
    background: #fff;
  }
  .multi-select-wrap.disabled .multi-select-trigger {
    pointer-events: none;
    opacity: 0.65;
    cursor: not-allowed;
  }
  .multi-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .multi-select-value.placeholder {
    color: #888;
  }
  .multi-select-arrow {
    display: none;
  }
  .multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    background: #fff;
    border: 1.5px solid #b0b8d4;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 6px 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
  }
  .multi-select-wrap.open .multi-select-dropdown {
    display: block;
  }
  .multi-select-option {
    padding: 10px 12px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    cursor: pointer;
    transition: background 0.15s;
  }
  .multi-select-option:hover {
    background: #e8ecf8;
  }
  .multi-select-option.selected {
    background: #00008B;
    color: #fff;
  }

  .btn-join {
    width: 100%;
    background: #00008B;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 13px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 6px;
  }

  .btn-join:hover {
    background: #0000b8;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,0,139,0.3);
  }

  .btn-join:active { transform: translateY(0); }

  /* Confirmation */
  .confirm-box {
    display: none;
    background: #fffff0;
    border: 2px solid #00008B;
    border-radius: 6px;
    text-align: center;
    padding: 18px 14px;
    margin-top: 18px;
    animation: pop 0.35s ease;
  }

  .confirm-box.show { display: block; }

  @keyframes pop {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
  }

  .confirm-num {
    font-size: 52px;
    font-weight: 900;
    color: #00008B;
    line-height: 1;
    margin-bottom: 6px;
  }

  .confirm-msg {
    font-size: 14px;
    color: #333;
    font-weight: bold;
  }

  .confirm-sub {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
  }

  /* Queue stats */
  .stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-box {
    flex: 1;
    background: #f0f4ff;
    border: 1.5px solid #b0b8d4;
    border-radius: 4px;
    text-align: center;
    padding: 10px 6px;
  }

  .stat-n {
    font-size: 24px;
    font-weight: 900;
    color: #00008B;
    display: block;
  }

  .stat-l {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: bold;
  }

  /* Queue list */
  .q-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 2px;
  }

  .q-list::-webkit-scrollbar { width: 4px; }
  .q-list::-webkit-scrollbar-thumb { background: #b0b8d4; border-radius: 2px; }

  .q-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 12px;
    background: #f7f8ff;
    border: 1.5px solid #d0d8f0;
    border-radius: 5px;
    padding: 10px 14px;
    animation: slideIn 0.3s ease;
    transition: border-color 0.2s;
  }

  .q-row:hover { border-color: #00008B; background: #eef1ff; }

  @keyframes slideIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .q-num {
    background: #00008B;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    padding: 6px 4px;
    border-radius: 4px;
  }

  .q-info .q-name {
    font-size: 14px;
    font-weight: bold;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .q-info .q-detail {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
  }

  .q-right { text-align: right; }

  .q-time {
    font-size: 11px;
    color: #888;
    display: block;
  }

  .q-badge {
    display: inline-block;
    background: #e0ffe8;
    border: 1px solid #22aa55;
    color: #155724;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    margin-top: 4px;
  }

  .empty {
    text-align: center;
    padding: 40px 0;
    color: #aaa;
    font-size: 14px;
  }

  .empty-icon { font-size: 32px; margin-bottom: 8px; }

  /* Reset btn */
  .btn-reset {
    background: transparent;
    border: 1.5px solid #cc0000;
    color: #cc0000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.2s, color 0.2s;
  }

  .btn-reset:hover { background: #cc0000; color: #fff; }

  .card-head-right { margin-left: auto; }

  /* One device = one ticket: participation covers queue list */
  .my-participation {
    background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
    border: 2px solid #00008B;
    border-radius: 8px;
    padding: 20px 18px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }
  .my-participation .mp-num {
    font-size: clamp(48px, 12vw, 72px);
    font-weight: 900;
    color: #00008B;
    line-height: 1;
    letter-spacing: 4px;
  }
  .my-participation .mp-status {
    display: inline-block;
    margin: 8px auto 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .my-participation .mp-status.waiting {
    background: #fff8e6;
    border: 1px solid #e6a800;
    color: #856404;
  }
  .my-participation .mp-status.serving {
    background: #e8f4ff;
    border: 1px solid #1565c0;
    color: #0d47a1;
  }
  .my-participation .mp-status.done {
    background: #e8f5e9;
    border: 1px solid #2e7d32;
    color: #1b5e20;
  }
  .my-participation .mp-status.skipped {
    background: #ffebee;
    border: 1px solid #c62828;
    color: #c62828;
  }
  .my-participation .mp-line {
    font-size: 14px;
    color: #333;
    text-align: left;
    max-width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid #d0d8f0;
  }
  .my-participation .mp-line:last-of-type { border-bottom: none; }
  .my-participation .mp-line strong { color: #00008B; display: inline-block; min-width: 130px; }
  .my-participation .mp-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
  }

  /* “Your turn” popup (StudentSide — no system notifications) */
  .modal.turn-popup {
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
  }
  .turn-popup-content {
    max-width: 400px;
    padding: 28px 24px 22px;
  }
  .turn-popup-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: #020075;
    margin-bottom: 12px;
  }
  .turn-popup-num {
    font-size: clamp(40px, 10vw, 56px);
    font-weight: 900;
    color: #00008B;
    letter-spacing: 0.06em;
    margin: 8px 0 14px;
  }
  .turn-popup-msg {
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    text-align: center;
    margin-bottom: 8px;
  }
  .turn-popup-actions {
    margin-top: 18px;
  }
  .turn-popup-ok {
    min-width: 140px;
    padding: 10px 28px !important;
    font-size: 16px !important;
  }

  /* FULLSCREEN OVERLAY (Queue Intake Closed) */
  .fullscreen-deactivate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .fullscreen-deactivate-message {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: none;
    padding: 28px 18px;
    text-align: center;
  }

  .fullscreen-deactivate-message .overlay-title {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    color: #000000;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
  }

  .fullscreen-deactivate-message .overlay-reason {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    max-width: 560px;
    margin: 0 auto;
  }
