/* CSS riêng màn Bấm giờ (bamgio.php) và màn Đăng nhập (body.sg-page). Nạp sau style.css. */
@media screen {
  .man-bam-gio {
    position: relative;
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 14px 18px 18px;
    background: var(--bam-nen);
    color: var(--bam-toi);
    line-height: normal;
  }

  .man-bam-gio .topbar {
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0;
    background: none;
    color: var(--bam-toi);
    line-height: normal;
  }

  .man-bam-gio .topbar .brand {
    gap: 10px;
    font-size: inherit;
    font-weight: inherit;
  }

  .man-bam-gio .topbar .bg-logo,
  .sg-top .bg-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bam-toi);
    color: var(--bam-xanh);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .man-bam-gio .topbar .bg-hieu,
  .sg-top .bg-hieu {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .man-bam-gio .topbar .bg-hieu b,
  .sg-top .bg-hieu b {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
  }

  .man-bam-gio .topbar .bg-hieu small,
  .sg-top .bg-hieu small {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--bam-chu-phu);
  }

  .man-bam-gio .topbar nav:not(:empty) {
    order: 3;
    flex: 1 1 100%;
    margin-inline: -8px;
  }

  .man-bam-gio .topbar nav a,
  .man-bam-gio .topbar .nav-b {
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    color: var(--bam-toi);
  }

  .man-bam-gio .topbar nav a:hover,
  .man-bam-gio .topbar .nav-b:hover {
    background: var(--bam-icon-hover);
    color: var(--bam-toi);
  }

  .man-bam-gio .topbar nav a.on,
  .man-bam-gio .topbar .nav-b.on {
    background: var(--bam-av-nen);
    color: var(--bam-xanh-dam);
  }

  .man-bam-gio .topbar .user-box {
    gap: 2px;
  }

  .bg-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--bam-icon);
    cursor: pointer;
    transition: background 0.15s;
  }

  .bg-icon-btn:hover {
    background: var(--bam-icon-hover);
  }

  .bg-icon-btn:focus-visible {
    outline: 2px solid var(--bam-toi);
    outline-offset: 2px;
  }

  .bg-av-khung {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  .bg-av {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bam-av-nen);
    color: var(--bam-xanh-dam);
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
  }

  .man-bam-gio div.g-flash {
    position: fixed;
    top: 12px;
    left: 14px;
    right: 14px;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    background: var(--white);
    color: var(--bam-toi);
    border: 1px solid var(--bam-vien);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(13, 35, 41, 0.16);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    animation: bgToast 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .man-bam-gio div.g-flash svg {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 50%;
    background: var(--bam-xanh);
    color: var(--bam-xanh-chu);
    stroke-width: 2.8;
  }

  .man-bam-gio div.g-flash.err {
    background: var(--cc-flash-er-nen);
    color: var(--white);
    border-color: var(--cc-flash-er-ray);
  }

  @keyframes bgToast {
    from {
      opacity: 0;
      transform: translateY(-12px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  .man-bam-gio .wrap {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
  }

  .bg-man {
    display: flex;
    flex-direction: column;
  }

  .bg-chao {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    margin-top: 18px;
  }

  .bg-chao-trai {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .bg-loi {
    font-size: 13px;
    color: var(--bam-chu-phu);
  }

  .man-bam-gio h1.bg-ten {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .bg-chao-phai {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }

  .bg-phong {
    padding: 4px 10px;
    border: 1px solid var(--bam-vien);
    border-radius: var(--bo-tron);
    background: var(--white);
    color: var(--bam-toi);
    font-size: 12px;
    font-weight: 600;
  }

  .bg-ngay {
    font-size: 12px;
    color: var(--bam-chu-phu);
  }

  .bg-the {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 464px;
    margin-top: 16px;
    padding: 18px 20px 20px;
    border-radius: 28px;
    background: var(--bam-toi);
    color: var(--white);
    box-shadow: 0 24px 48px rgba(13, 35, 41, 0.18);
  }

  .bg-dau {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 36px;
  }

  .bg-ca {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .bg-ca span {
    font-size: 12px;
    color: var(--bam-mo);
  }

  .bg-ca b {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .bg-vt {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    margin-left: auto;
    padding: 0 12px 0 10px;
    border-radius: var(--bo-tron);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .bg-vt i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .bg-vt.ok {
    background: rgba(61, 220, 151, 0.12);
    color: var(--bam-vt-ok);
  }

  .bg-vt.ok i {
    background: var(--bam-xanh);
    box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.25);
  }

  .bg-vt.ngoai {
    background: rgba(255, 181, 71, 0.14);
    color: var(--bam-cam-2);
  }

  .bg-vt.ngoai i {
    background: var(--bam-cam);
    box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.25);
  }

  .bg-vt.xac_minh {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bam-mo-2);
  }

  .bg-vt.xac_minh i {
    background: var(--bam-xam-cham);
    box-shadow: 0 0 0 3px rgba(126, 144, 148, 0.25);
  }

  .bg-dong-ho {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
  }

  .bg-gio {
    display: flex;
    align-items: baseline;
    font-size: 54px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .bg-colon {
    padding: 0 2px;
    color: var(--bam-xanh);
    animation: bgBlink 2s steps(1) infinite;
  }

  @keyframes bgBlink {
    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.25;
    }
  }

  .bg-mui {
    font-size: 12px;
    color: var(--bam-mo);
    letter-spacing: 0.02em;
  }

  .bg-than {
    margin: 0;
  }

  .bg-vong {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 216px;
    height: 216px;
  }

  .bg-vong svg:not(.bg-nut svg) {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
  }

  .bg-vong circle {
    fill: none;
    stroke-width: 6;
  }

  .bg-vong-nen {
    stroke: rgba(255, 255, 255, 0.08);
  }

  .bg-vong-tien {
    stroke: transparent;
    stroke-linecap: round;
    stroke-dasharray: 640.9;
    stroke-dashoffset: 640.9;
  }

  .bg-vong.ra .bg-vong-tien,
  .bg-vong.tat .bg-vong-tien {
    stroke: var(--bam-xanh);
    stroke-dashoffset: 0;
  }

  .g-flash.ok ~ .bg-man .bg-vong.ra .bg-vong-tien {
    animation: bgVong 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  @keyframes bgVong {
    from {
      stroke-dashoffset: 640.9;
    }

    to {
      stroke-dashoffset: 0;
    }
  }

  .bg-halo {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
  }

  .bg-vong.vao .bg-halo,
  .bg-vong.ra .bg-halo {
    animation: bgHalo 2.8s ease-out infinite;
  }

  .bg-vong.vao .bg-halo {
    background: rgba(61, 220, 151, 0.22);
  }

  .bg-vong.ra .bg-halo {
    background: rgba(244, 247, 246, 0.14);
  }

  @keyframes bgHalo {
    from {
      transform: scale(0.86);
      opacity: 0.85;
    }

    to {
      transform: scale(1.12);
      opacity: 0;
    }
  }

  .bg-nut {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 168px;
    height: 168px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-family: inherit;
    cursor: pointer;
    transition:
      transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1),
      box-shadow 0.2s;
  }

  .bg-nut:not(:disabled):hover {
    transform: scale(1.02);
  }

  .bg-nut:not(:disabled):active {
    transform: scale(0.96);
  }

  .bg-nut:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 6px;
  }

  .bg-nut:disabled {
    cursor: not-allowed;
  }

  .bg-nut .t {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  .bg-nut .s {
    height: 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    opacity: 0.78;
    white-space: nowrap;
  }

  .bg-vao {
    background: var(--bam-xanh);
    color: var(--bam-xanh-chu);
    box-shadow:
      0 16px 40px rgba(61, 220, 151, 0.35),
      inset 0 -6px 0 rgba(4, 37, 26, 0.12);
  }

  .bg-ra {
    background: var(--bam-nut-trang);
    color: var(--bam-toi);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.35),
      inset 0 -6px 0 rgba(13, 35, 41, 0.08);
  }

  .bg-tat {
    border: 2px solid var(--bam-xanh);
    background: rgba(61, 220, 151, 0.08);
    color: var(--bam-xanh);
  }

  .bg-khoa {
    border: 1px solid var(--bam-khoa-vien);
    background: var(--bam-khoa-nen);
    color: var(--bam-khoa-chu);
  }

  .bg-giua {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 60px;
    max-width: 310px;
    overflow: hidden;
    text-align: center;
  }

  .bg-hd {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--bam-mo-2);
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .bg-hd.ngoai {
    color: var(--bam-cam-2);
  }

  .bg-hom-nay {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    height: 110px;
    margin-top: 12px;
    padding: 6px;
    border: 1px solid var(--bam-vien-the);
    border-radius: 22px;
    background: var(--white);
  }

  .bg-o {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    height: 96px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--bam-o-nen);
  }

  .bg-o .n {
    font-size: 12px;
    line-height: 16px;
    color: var(--bam-chu-phu);
  }

  .bg-o .g {
    color: var(--bam-toi);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 24px;
    font-variant-numeric: tabular-nums;
  }

  .bg-o .g.rong {
    color: var(--bam-rong);
  }

  .bg-o .c {
    align-self: flex-start;
    max-width: 100%;
    height: 20px;
    padding: 0 8px;
    overflow: hidden;
    border-radius: var(--bo-tron);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bg-o .c.no {
    background: var(--bam-chip-no);
    color: var(--bam-chu-phu);
  }

  .bg-o .c.ok {
    background: var(--bam-chip-ok);
    color: var(--bam-xanh-dam);
  }

  .bg-o .c.la {
    background: var(--bam-chip-la);
    color: var(--bam-chip-la-chu);
  }

  .bg-chuc {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    height: 52px;
    margin-top: 12px;
    padding: 0 16px 0 10px;
    border: 1px solid var(--bam-chuc-vien);
    border-radius: 18px;
    background: var(--bam-chuc-nen);
    color: var(--bam-xanh-dam);
  }

  .bg-chuc-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    color: var(--bam-xanh-vua);
  }

  .bg-chuc p {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  @media (max-width: 359px) {
    .bg-chuc {
      height: auto;
      min-height: 52px;
    }

    .bg-chuc p {
      white-space: normal;
    }
  }

  .man-bam-gio .foot {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 0;
    color: var(--bam-chu-phu);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-align: center;
  }

  @media (prefers-reduced-motion: reduce) {
    .bg-vong.vao .bg-halo,
    .bg-vong.ra .bg-halo,
    .g-flash.ok ~ .bg-man .bg-vong.ra .bg-vong-tien,
    .man-bam-gio div.g-flash,
    .bg-colon {
      animation: none;
    }

    .bg-nut {
      transition: none;
    }
  }

  body.sg-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bam-nen);
    color: var(--bam-toi);
    font-family: var(--font-chu);
    line-height: normal;
  }

  .sg-app {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 14px 18px 18px;
  }

  .sg-top {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    height: 48px;
  }

  .sg-hero {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: space-between;
    height: 268px;
    margin-top: 16px;
    padding: 24px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--bam-toi);
    color: var(--white);
    box-shadow: 0 24px 48px rgba(13, 35, 41, 0.18);
  }

  .sg-vong {
    position: absolute;
    top: -86px;
    left: 180px;
  }

  .sg-vong-nen,
  .sg-vong-tien {
    fill: none;
    stroke-width: 6;
  }

  .sg-vong-nen {
    stroke: rgba(255, 255, 255, 0.06);
  }

  .sg-vong-tien {
    stroke: var(--bam-xanh);
    stroke-linecap: round;
    stroke-dasharray: 779;
    stroke-dashoffset: 520;
  }

  .sg-vong-dia {
    fill: rgba(61, 220, 151, 0.1);
  }

  .sg-tren,
  .sg-duoi {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .sg-tren {
    gap: 4px;
  }

  .sg-duoi {
    gap: 6px;
  }

  .bg-gio.sg-gio {
    font-size: 44px;
  }

  .sg-ngay {
    font-size: 12px;
    color: var(--bam-mo);
  }

  .sg-hero h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .sg-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--bam-mo-2);
  }

  .sg-form {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    margin: 20px 0 14px;
  }

  .sg-o {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sg-o + .sg-o {
    margin-top: 14px;
  }

  .sg-o label {
    margin: 0;
    color: var(--bam-toi);
    font-size: 13px;
    font-weight: 600;
    line-height: 16px;
  }

  .sg-mk {
    position: relative;
  }

  .sg-input {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--bam-o-vien);
    border-radius: 14px;
    background: var(--bam-nhap-nen);
    color: var(--bam-toi);
    font-family: inherit;
    font-size: 16px;
    transition:
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      background 0.15s ease;
  }

  .sg-mk .sg-input {
    padding-right: 56px;
  }

  .sg-input::placeholder {
    color: var(--bam-rong);
  }

  .sg-input:focus {
    outline: none;
    border-color: var(--bam-xanh-vua);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.22);
  }

  .sg-input.sg-err {
    border-color: var(--bam-loi);
  }

  .sg-mat {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--bam-icon);
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .sg-mat[hidden],
  .sg-mat[aria-pressed="false"] .sg-mat-an,
  .sg-mat[aria-pressed="true"] .sg-mat-hien {
    display: none;
  }

  .sg-mat span {
    display: flex;
  }

  .sg-mat:hover {
    background: var(--bam-icon-hover);
  }

  .sg-mat:focus-visible,
  .sg-btn:focus-visible {
    outline: 3px solid var(--bam-xanh);
    outline-offset: 3px;
  }

  .sg-loi {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--bam-loi);
    font-size: 13px;
    font-weight: 500;
  }

  .sg-loi svg {
    flex: 0 0 auto;
  }

  .sg-loi:not(.co) svg {
    display: none;
  }

  .sg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    margin-top: 14px;
    border: 0;
    border-radius: 16px;
    background: var(--bam-toi);
    color: var(--white);
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition:
      transform 0.15s ease,
      background 0.15s ease;
  }

  .sg-btn:hover:not(:disabled) {
    background: var(--bam-nut-hover);
  }

  .sg-btn:active:not(:disabled) {
    transform: scale(0.985);
  }

  .sg-btn:disabled {
    cursor: progress;
  }

  .sg-quay {
    display: flex;
    color: var(--bam-xanh);
    animation: sgQuay 0.8s linear infinite;
  }

  .sg-btn:not(.sg-dang) .sg-quay {
    display: none;
  }

  @keyframes sgQuay {
    to {
      transform: rotate(360deg);
    }
  }

  .sg-quen {
    height: 20px;
    margin: 16px 0 0;
    color: var(--bam-chu-phu);
    font-size: 13px;
    text-align: center;
  }

  .sg-day {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
  }

  .sg-chi {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--bam-chu-phu);
    font-size: 12px;
  }

  .sg-day footer {
    color: var(--bam-chu-phu);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-align: center;
  }

  @media (prefers-reduced-motion: reduce) {
    .sg-quay {
      animation: none;
    }

    .sg-input,
    .sg-btn {
      transition: none;
    }
  }

  @media (min-width: 768px) {
    html:has(body.man-bam-gio) {
      min-height: 100%;
      display: grid;
      place-items: center;
      background: var(--bam-nen);
    }

    html:has(body.sg-page) {
      min-height: 100%;
      display: grid;
      place-items: center;
      background: var(--bam-nen);
    }

    .man-bam-gio,
    body.sg-page {
      min-height: 0;
      width: 430px;
      margin: 40px auto;
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 24px 60px -24px var(--cc-bong-nut);
    }

    .man-bam-gio div.g-flash {
      position: absolute;
    }

    .man-bam-gio .wrap {
      margin-bottom: 16px;
    }

    .sg-app {
      min-height: 0;
    }

    .sg-form {
      margin-bottom: 16px;
    }
  }
}
