/* Premium Milky Theme — Check In / Check Out (Attendance Hub) */
@media (max-width: 959px) {
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub.ah-att-wrap--premium {
    position: relative;
    background: transparent;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-bg-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-vortex {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    width: min(320px, 92vw);
    height: min(320px, 92vw);
    background: url('../../img/mob/milk-powder-vortex.svg') center / contain no-repeat;
    opacity: 0.28;
    animation: ahAttVortexSpin 24s linear infinite;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-wm-nn {
    position: absolute;
    left: 16px;
    bottom: 18%;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(201, 162, 39, 0.1);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-wm-osa {
    position: absolute;
    right: 16px;
    bottom: 18%;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(201, 162, 39, 0.1);
  }

  @keyframes ahAttVortexSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-top--premium,
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-scroll {
    position: relative;
    z-index: 1;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-top--premium {
    background: linear-gradient(180deg, #fffdf9 0%, rgba(249, 244, 236, 0.92) 100%);
    border-bottom: none;
    box-shadow: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr--premium {
    background: transparent;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5c5348;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-back-gold {
    background: rgba(255, 253, 249, 0.9);
    border: 1px solid rgba(201, 162, 39, 0.28);
    color: #a8842a;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.1);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-photo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(201, 162, 39, 0.35);
    background: linear-gradient(145deg, #fffdf9, #f5ebe0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.12);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-photo-ph {
    font-size: 20px;
    line-height: 1;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-text {
    flex: 1;
    min-width: 0;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-text h2 {
    color: #4a4238;
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-name {
    font-size: 12px;
    font-weight: 700;
    color: #5c5348;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-sub {
    color: #8a7f72;
    font-size: 11px;
    margin-top: 1px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-hdr-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, 0.28);
    background: rgba(255, 253, 249, 0.92);
    color: #a8842a;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.08);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-icon-btn.dark-mode-toggle-btn {
    background: linear-gradient(145deg, #fff8e8, #f5e6c8);
  }

  /* Text tabs with golden underline (hidden on check-in pane via body.ah-att-on-checkin) */
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-tabs--premium {
    display: flex;
    gap: 0;
    padding: 0 4px;
    background: transparent;
    border-bottom: 1px solid rgba(201, 162, 39, 0.18);
    overflow: visible;
    box-shadow: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub.ah-att-on-checkin #s-attendance-hub .ah-att-tabs--premium {
    display: none !important;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-tabs--premium .ah-att-tab {
    flex: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #a89888;
    font-size: 11px;
    font-weight: 600;
    padding: 11px 6px 10px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-tabs--premium .ah-att-tab.on {
    background: transparent;
    color: #a8842a;
    font-weight: 800;
    border-bottom-color: #c9a227;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-scroll {
    background:
      linear-gradient(165deg, #faf6f0 0%, #f3ebe0 40%, #ede4d4 100%);
  }

  /* Glassmorphism cards */
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-glass-card {
    background: rgba(255, 253, 249, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(201, 162, 39, 0.32);
    border-radius: 18px;
    box-shadow:
      0 6px 28px rgba(201, 162, 39, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-card-h {
    color: #a8842a;
    font-weight: 800;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-my-status {
    color: #5c5348;
    font-weight: 600;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-state-btn {
    border-radius: 16px;
    padding: 15px 16px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-state-btn-t {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-state-btn-d {
    display: block;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.92;
    margin-top: 2px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-state-btn.checkin {
    background: linear-gradient(145deg, #d4a017 0%, #b8860b 48%, #9a7209 100%);
    color: #fffdf9;
    box-shadow:
      0 8px 26px rgba(154, 114, 9, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-state-btn.checkout {
    background: linear-gradient(145deg, #c9785a 0%, #a85a42 55%, #8f4a36 100%);
    color: #fffdf9;
    box-shadow: 0 8px 22px rgba(143, 74, 54, 0.32);
    border: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-in-time {
    background: rgba(255, 248, 238, 0.85);
    border-color: rgba(201, 162, 39, 0.28);
    color: #8a7340;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-checkin-cta-warn {
    color: #a8842a;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-h {
    color: #5c5348;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 800;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-chip {
    background: linear-gradient(160deg, #fffdf9, #f5ebe0);
    border: 1px solid rgba(201, 162, 39, 0.28);
    color: #a8842a;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.12);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-chip:active {
    background: linear-gradient(160deg, #fff8e8, #f5e6c8);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-link {
    background: linear-gradient(145deg, #fffdf9, #f9f4ec);
    border: 1px solid rgba(201, 162, 39, 0.18);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(201, 162, 39, 0.1);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-link-t {
    color: #5c5348;
    font-weight: 800;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-link-d {
    color: #8a7f72;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-more-link-arrow {
    color: #c9a227;
  }

  /* Night shift section (legacy card — kept for other screens if any) */
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-night-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 253, 249, 0.68);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-night-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(145deg, #fff8e8, #f5e6c8);
    border: 1px solid rgba(201, 162, 39, 0.25);
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.1);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-night-body {
    flex: 1;
    min-width: 0;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-night-title {
    color: #5c5348;
    margin-bottom: 4px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-night-hint {
    color: #8a7f72;
    font-size: 11px;
    margin-bottom: 10px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-btn-night {
    background: transparent;
    color: #a8842a;
    border: 1.5px solid rgba(201, 162, 39, 0.55);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 700;
    width: auto;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.08);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-admin-hint-text {
    font-size: 12px;
    color: #8a7340;
    line-height: 1.5;
  }

  /* Team / map panes — soften blues */
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-sum-n {
    color: #a8842a;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-sum-box,
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-team-card,
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-person {
    background: rgba(255, 253, 249, 0.85);
    border-color: rgba(201, 162, 39, 0.22);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-team-nudge--secondary {
    background: transparent;
    color: #C62828;
    border: 1.5px solid rgba(198, 40, 40, 0.55);
    box-shadow: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-team-nudge--urgent {
    background: linear-gradient(135deg, #E53935, #C62828 55%, #B71C1C);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.32);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-team-nudge--mini {
    background: transparent;
    color: #C62828;
    border: 1px solid rgba(198, 40, 40, 0.4);
    box-shadow: none;
    width: auto;
    padding: 3px 8px;
    font-size: 10px;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-team-view {
    background: rgba(255, 253, 249, 0.9);
    color: #a8842a;
    border: 1px solid rgba(201, 162, 39, 0.25);
  }

  /* Bottom nav — golden brown */
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar {
    background: rgba(255, 253, 249, 0.98);
    border-top-color: rgba(201, 162, 39, 0.2);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-ic {
    background: linear-gradient(160deg, #fffdf9 0%, #f5ebe0 100%);
    border: 2px solid rgba(201, 162, 39, 0.2);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-ic img {
    filter: sepia(0.45) saturate(0.85) brightness(0.92);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab.on .mob-tab-ic {
    background: linear-gradient(160deg, #fff8e8 0%, #f5e6c8 100%);
    border-color: rgba(201, 162, 39, 0.45);
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab.on,
  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab.on .mob-tab-lbl {
    color: #a8842a;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-fab .mob-tab-ic {
    background: linear-gradient(145deg, #fffdf9 0%, #f5ebe0 100%);
    animation: mobCheckinWaitPulse 2.8s ease-in-out infinite;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-fab .mob-tab-ic img {
    filter: none;
  }

  html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-fab .mob-tab-fab-lbl {
    color: #a8842a;
  }

  @media (prefers-reduced-motion: reduce) {
    html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #s-attendance-hub .ah-att-vortex,
    html:not(.dark) body.mobile-app-enabled.mob-on-attendance-hub #mobile-app-tabbar .mob-tab-fab .mob-tab-ic {
      animation: none;
    }
  }
}
