/* ============================================================
   HASANI BOOKS CUSTOMER WEB APP
   COMPLETE RESPONSIVE CSS
   ============================================================ */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family:
    Inter,
    "Segoe UI",
    Arial,
    Helvetica,
    sans-serif;

  background: #f5f7fb;
  color: #172033;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}


/* ============================================================
   LOGIN
   ============================================================ */

.auth-shell {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 24px;

  background:
    linear-gradient(
      135deg,
      #eef3ff,
      #f7f9fc
    );
}

.auth-card {
  width: min(440px, 100%);

  background: #fff;

  border-radius: 24px;

  padding: 38px;

  box-shadow:
    0 20px 60px
    rgba(23,32,51,.10);
}

.login-logo {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  margin-bottom: 24px;
}

.login-logo img {
  display: block;

  width: min(100%, 310px);

  height: auto;

  max-height: 90px;

  object-fit: contain;

  object-position: left center;
}

.auth-card h1 {
  margin: 6px 0;

  font-size: 30px;
}

.auth-card p {
  margin: 0 0 25px;

  color: #718096;

  line-height: 1.5;
}

.auth-card label {
  display: block;

  margin: 16px 0;

  font-size: 14px;

  font-weight: 700;
}

.auth-card input {
  width: 100%;

  margin-top: 8px;

  padding: 13px 14px;

  border:
    1px solid
    #d7ddea;

  border-radius: 11px;

  outline: none;
}

.auth-card input:focus {
  border-color: #2358d8;

  box-shadow:
    0 0 0 3px
    rgba(35,88,216,.10);
}

.primary {
  border: 0;

  background: #2358d8;

  color: #fff;

  border-radius: 10px;

  padding: 12px 18px;

  font-weight: 700;
}

.primary:hover {
  background: #1d4fc6;
}

.full {
  width: 100%;

  margin-top: 8px;
}

.message {
  min-height: 20px;

  margin-top: 15px;

  color: #c53030;

  line-height: 1.4;
}

.auth-card small {
  display: block;

  margin-top: 20px;

  color: #7a8497;
}


/* ============================================================
   APP
   ============================================================ */

.app-shell {
  min-height: 100vh;

  display: flex;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  width: 255px;

  background: #101a30;

  color: #dbe4fb;

  padding: 22px 16px;

  display: flex;

  flex-direction: column;

  position: fixed;

  inset: 0 auto 0 0;

  z-index: 50;
}

.side-brand {
  display: flex;

  align-items: center;

  padding:
    0 10px 24px;
}

.sidebar-logo {
  display: block;

  width: 145px;

  max-height: 55px;

  object-fit: contain;

  object-position: left center;

  background: transparent;
}

.side-user {
  display: flex;

  gap: 10px;

  align-items: center;

  padding: 13px 10px;

  background: rgba(255,255,255,.05);

  border-radius: 14px;

  margin-bottom: 20px;

  min-width: 0;
}

.side-user > div:last-child {
  min-width: 0;
}

.side-user b {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.side-user small {
  display: block;

  color: #93a4c6;

  margin-top: 3px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.avatar {
  flex: 0 0 auto;

  width: 38px;

  height: 38px;

  border-radius: 50%;

  background: #2d66e2;

  color: #fff;

  display: grid;

  place-items: center;

  font-weight: 800;
}

.sidebar nav {
  display: grid;

  gap: 5px;
}

.nav-item {
  width: 100%;

  border: 0;

  background: transparent;

  color: #aebbd6;

  text-align: left;

  padding: 12px;

  border-radius: 10px;

  font-weight: 600;

  transition:
    background .15s ease,
    color .15s ease;
}

.nav-item:hover,
.nav-item.active {
  background: #2358d8;

  color: #fff;
}

.logout {
  margin-top: auto;

  border: 0;

  background: rgba(255,255,255,.05);

  color: #dbe4fb;

  padding: 12px;

  border-radius: 10px;

  text-align: left;
}

.logout:hover {
  background: rgba(255,255,255,.10);
}


/* ============================================================
   MAIN
   ============================================================ */

.main-area {
  margin-left: 255px;

  flex: 1;

  min-width: 0;
}


/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  height: 78px;

  background: #fff;

  border-bottom:
    1px solid
    #e7eaf1;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 30px;

  position: sticky;

  top: 0;

  z-index: 40;
}

.topbar h2 {
  margin: 2px 0 0;

  font-size: 20px;
}

.eyebrow {
  font-size: 11px;

  letter-spacing: 1.4px;

  font-weight: 800;

  color: #7c879c;
}

.eyebrow.light {
  color: #bcd0ff;
}

.top-actions {
  display: flex;

  gap: 18px;

  align-items: center;
}

.top-actions #backendStatus {
  font-size: 12px;

  color: #5b667a;
}

.icon-btn {
  display: none;

  border: 0;

  background: #f1f4f9;

  padding: 9px;

  border-radius: 9px;
}


/* ============================================================
   CONTENT
   ============================================================ */

.content {
  padding: 30px;

  max-width: 1350px;

  margin: auto;
}

.welcome {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 22px;
}

.welcome h1,
.page-heading h1 {
  margin: 5px 0;

  font-size: 30px;

  line-height: 1.15;

  word-break: break-word;
}

.welcome p,
.page-heading p {
  margin: 0;

  color: #748096;

  line-height: 1.5;
}


/* ============================================================
   MEMBER 1 CARD
   ============================================================ */

.member-card {
  position: relative;

  width: 100%;

  min-height: 220px;

  border-radius: 22px;

  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #183c9b,
      #2d67dc
    );

  color: #fff;

  box-shadow:
    0 15px 35px
    rgba(35,88,216,.17);
}

.normal-member-card {
  position: absolute;

  inset: 0;

  padding: 26px;

  transition:
    opacity .2s ease;
}

.member-card-head {
  display: flex;

  justify-content: space-between;

  gap: 20px;
}

.member-card h2 {
  margin: 10px 0 4px;

  line-height: 1.1;

  word-break: break-word;
}

.member-card p {
  margin: 0;

  color: #dce6ff;

  letter-spacing: 1px;
}

.chip {
  flex: 0 0 auto;

  height: fit-content;

  border:
    1px solid
    rgba(255,255,255,.33);

  padding: 7px 11px;

  border-radius: 99px;

  font-size: 11px;
}

.card-code {
  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  gap: 20px;

  margin-top: 24px;
}

.card-code img {
  display: block;

  max-width: 190px;

  max-height: 90px;

  background: #fff;

  padding: 6px;

  border-radius: 8px;

  object-fit: contain;
}

.card-code > div:first-child img {
  width: 90px;

  height: 90px;
}


/* ============================================================
   NORMAL DISCOUNT CARD — FRONT / BACK
   ============================================================ */

.member-card:not(.member2-active) {
  width: min(100%, 760px);
  min-height: 0;
  margin-inline: auto;
  aspect-ratio: 1.72 / 1;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  perspective: 1400px;
}

.normal-member-card {
  padding: 0;
  overflow: visible;
  border-radius: inherit;
}

.normal-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
  transform-style: preserve-3d;
}

.member-card.card-flipped .normal-card-inner {
  transform: rotateY(180deg);
}

.normal-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 35, 82, .14);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(18, 40, 91, .2);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.normal-card-front {
  display: grid;
  grid-template-rows: 48% 52%;
  background: #f4f5f7;
}

.discount-card-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 5% 6.5%;
  overflow: hidden;
  background:
    radial-gradient(circle at 87% 28%, transparent 0 7%, rgba(112, 145, 213, .17) 7.5% 14%, transparent 14.5%),
    repeating-radial-gradient(circle at 92% 50%, transparent 0 9px, rgba(140, 166, 220, .09) 10px 11px),
    linear-gradient(112deg, #203b79, #395995);
  border-bottom: 12px solid #df5968;
}

.discount-card-brand::after {
  content: "";
  position: absolute;
  width: 42%;
  height: 180%;
  top: -42%;
  right: -8%;
  background: rgba(104, 139, 207, .2);
  transform: rotate(18deg);
}

.discount-card-brand img {
  position: relative;
  z-index: 1;
  width: 54%;
  height: 42%;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.discount-card-brand strong {
  position: relative;
  z-index: 1;
  margin-top: 1%;
  color: #fff;
  font-size: clamp(15px, 2.6vw, 34px);
  font-weight: 400;
  letter-spacing: .035em;
}

.discount-card-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 38%;
  align-items: end;
  gap: 4%;
  padding: 5% 6.5% 6%;
  color: #17254b;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(35, 59, 111, .025) 23px),
    linear-gradient(120deg, #f8f8f7, #e7e9ed);
}

.discount-card-body::before {
  content: "hasani BOOKS  hasani BOOKS  hasani BOOKS  hasani BOOKS";
  position: absolute;
  inset: 8% 0 auto;
  color: rgba(35, 59, 111, .035);
  font-size: clamp(16px, 2.4vw, 30px);
  font-weight: 900;
  white-space: nowrap;
}

.discount-member-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.discount-member-info span {
  display: block;
  margin-top: 8px;
  color: #788299;
  font-size: clamp(7px, .85vw, 11px);
  font-weight: 800;
  letter-spacing: .09em;
}

.discount-member-info h2 {
  margin: 3px 0 8px;
  overflow: hidden;
  color: #152756;
  font-size: clamp(13px, 1.8vw, 23px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discount-member-info p {
  color: #152756;
  font-size: clamp(10px, 1.25vw, 16px);
  font-weight: 900;
}

.normal-card-front .card-code {
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.normal-card-front .card-code > div:first-child img {
  width: clamp(52px, 8vw, 86px);
  height: clamp(52px, 8vw, 86px);
}

.normal-card-front .card-code > div:last-child {
  min-width: 0;
}

.normal-card-front .card-code > div:last-child img {
  display: block;
  width: 100%;
  max-width: 180px;
  max-height: 76px;
  object-fit: contain;
}

.normal-card-back {
  display: flex;
  flex-direction: column;
  padding: 5% 6% 4%;
  color: #3c465d;
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(35, 59, 111, .025) 25px),
    linear-gradient(120deg, #fafafa, #e5e7eb);
  transform: rotateY(180deg);
}

.discount-card-back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2.5%;
  border-top: 9px solid #d65c6b;
  color: #385387;
  font-size: clamp(8px, 1.1vw, 14px);
  font-weight: 800;
}

.discount-card-back-head img {
  width: 30%;
  height: 42px;
  object-fit: contain;
  object-position: right center;
}

.discount-card-terms {
  flex: 1;
}

.discount-card-terms p {
  margin: 0;
  padding: clamp(3px, .75%, 7px) 0;
  border-bottom: 1px dashed rgba(72, 83, 105, .35);
  color: #465066;
  font-size: clamp(8px, 1.12vw, 14px);
  line-height: 1.24;
}

.discount-card-address {
  margin: 2% -6% -4%;
  padding: 2.2% 6%;
  background: #455b88;
  color: #fff;
  font-size: clamp(8px, 1.05vw, 13px);
  line-height: 1.25;
}

.card-flip-hint {
  display: none;
}


/* ============================================================
   MEMBER 2 CARD
   ============================================================ */

.member2-card {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  overflow: hidden;

  border-radius: inherit;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  color: #171a36;

  background:
    linear-gradient(
      115deg,
      #302c54 0%,
      #47456d 48%,
      #77789b 100%
    );

  z-index: 10;
}

.teacher-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
  transform-style: preserve-3d;
}

.member-card.card-flipped .teacher-card-inner {
  transform: rotateY(180deg);
}

.teacher-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.teacher-card-front {
  background: linear-gradient(115deg, #29254c 0%, #454267 50%, #68698e 100%);
}

.teacher-card-back {
  display: flex;
  flex-direction: column;
  padding: 4.5% 7.5% 4% 5.5%;
  color: #fff;
  background:
    radial-gradient(circle at 90% 16%, rgba(86, 132, 205, .35), transparent 28%),
    radial-gradient(circle at 85% 50%, rgba(118, 153, 211, .15) 1px, transparent 1.5px),
    linear-gradient(120deg, #30294f, #3e4779 58%, #3a649e);
  background-size: auto, 8px 8px, auto;
  transform: rotateY(180deg);
}

.teacher-card-back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f5f5ff;
  font-size: clamp(8px, 1.08vw, 14px);
  font-weight: 800;
}

.teacher-card-back-head img {
  width: 30%;
  height: 44px;
  padding: 4px 8px;
  object-fit: contain;
  object-position: right center;
  background: rgba(255, 255, 255, .92);
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%);
}

.teacher-card-terms {
  flex: 1;
  margin-top: 1%;
}

.teacher-card-terms p {
  margin: 0;
  padding: clamp(3px, .75%, 7px) 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .43);
  color: #f2f3fa;
  font-size: clamp(8px, 1.12vw, 14px);
  line-height: 1.22;
}

.teacher-card-address {
  padding-top: 1.8%;
  border-top: 2px solid rgba(255, 255, 255, .7);
  color: #f3f4fb;
  font-size: clamp(8px, 1.05vw, 13px);
  line-height: 1.25;
}

.teacher-card-side-label {
  position: absolute;
  right: -39px;
  top: 50%;
  padding: 8px 16px;
  border-radius: 12px 12px 0 0;
  background: #df6871;
  color: #fff;
  font-size: clamp(7px, .9vw, 11px);
  letter-spacing: .08em;
  transform: translateY(-50%) rotate(-90deg);
}

.member-card.member2-active {
  width: min(100%, 760px);
  min-height: 0;
  margin-inline: auto;
  aspect-ratio: 1.72 / 1;
}


/* TOP */

.member2-front-top {
  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 60%;

  background:
    linear-gradient(
      115deg,
      #29254c 0%,
      #454267 50%,
      #68698e 100%
    );
}


/* LOWER */

.member2-front-bottom {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 47%;

  background:
    linear-gradient(
      100deg,
      #d7d7e1 0%,
      #efeff4 100%
    );

  clip-path:
    polygon(
      0 25%,
      40% 25%,
      46% 0,
      100% 0,
      100% 100%,
      0 100%
    );
}


/* TRANSITION */

.member2-front-transition {
  position: absolute;

  left: 0;
  right: 0;

  top: 51%;

  height: 9%;

  background:
    rgba(
      201,
      201,
      220,
      .75
    );

  clip-path:
    polygon(
      0 0,
      41% 0,
      47% 100%,
      0 100%
    );
}


/* REAL LOGO */

.member2-logo {
  position: absolute;

  left: 5%;

  top: 6%;

  width: 27%;

  max-width: 180px;

  height: auto;

  max-height: 23%;

  object-fit: contain;

  object-position: left center;

  z-index: 20;

  border-radius: 0;

  background: transparent;
}


/* TITLE */

.member2-title {
  position: absolute;

  left: 5%;

  top: 29%;

  color: #fff;

  font-size:
    clamp(
      10px,
      1.35vw,
      18px
    );

  font-weight: 900;

  letter-spacing: .3px;

  white-space: nowrap;

  z-index: 20;
}


/* INFORMATION */

.member2-information {
  position: absolute;

  left: 7%;

  right: 7%;

  bottom: 7%;

  height: 34%;

  display: grid;

  grid-template-columns:
    1.5fr
    .75fr
    .85fr;

  grid-template-rows:
    auto
    auto;

  column-gap: 4%;

  row-gap: 10%;

  align-items: end;

  z-index: 25;
}

.member2-field {
  min-width: 0;
}

.member2-name {
  grid-column: 1 / 3;
  grid-row: 1;
}

.member2-expiry {
  grid-column: 3;
  grid-row: 1;
}

.member2-id {
  grid-column: 1;
  grid-row: 2;
}

.member2-branch {
  grid-column: 2 / 3;
  grid-row: 2;
}

.member2-field label {
  display: block;

  margin-bottom: 3px;

  color: #57586b;

  font-size:
    clamp(
      6px,
      .78vw,
      10px
    );

  line-height: 1;

  font-weight: 800;

  letter-spacing: .3px;
}

.member2-field strong {
  display: block;

  color: #161a35;

  font-size:
    clamp(
      8px,
      1.05vw,
      14px
    );

  line-height: 1.05;

  font-weight: 900;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

.member2-name strong {
  font-size:
    clamp(
      11px,
      1.4vw,
      19px
    );
}


/* BARCODE */

.member2-barcode {
  position: absolute;

  right: 6%;

  bottom: 6%;

  width: 23%;

  height: 25%;

  padding: 4px;

  box-sizing: border-box;

  background: #fff;

  border-radius: 4px;

  z-index: 30;

  display: flex;

  align-items: center;

  justify-content: center;
}

.member2-barcode img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}


/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 15px;

  margin: 18px 0;
}

.stat-card,
.feature-card,
.purchase-card,
.empty-feature,
.simple-table {
  background: #fff;

  border:
    1px solid
    #e8ebf2;

  border-radius: 16px;

  padding: 20px;
}

.stat-card span {
  display: block;

  color: #788398;

  font-size: 13px;
}

.stat-card strong {
  display: block;

  font-size: 28px;

  margin: 7px 0;
}

.stat-card small {
  color: #8b94a6;
}


/* ============================================================
   QUICK ACCESS
   ============================================================ */

.section-title {
  margin-top: 30px;
}

.feature-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 15px;
}

.feature-card {
  text-align: left;

  border:
    1px solid
    #e8ebf2;

  display: grid;

  gap: 9px;

  color: #172033;
}

.feature-card:hover {
  border-color: #cdd8f4;

  box-shadow:
    0 8px 24px
    rgba(23,32,51,.06);
}

.feature-card b {
  font-size: 16px;
}

.feature-card span {
  color: #7a8497;

  line-height: 1.45;
}


/* ============================================================
   PAGE HEADINGS
   ============================================================ */

.page-heading {
  margin-bottom: 20px;
}


/* ============================================================
   PURCHASES
   ============================================================ */

.purchase-list {
  display: grid;

  gap: 12px;
}

.purchase-card {
  width: 100%;

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  text-align: left;

  color: #172033;
}

.purchase-main {
  min-width: 0;
}

.purchase-main b {
  display: block;

  font-size: 16px;
}

.purchase-main span {
  display: block;

  color: #778298;

  font-size: 13px;

  margin-top: 5px;

  word-break: break-word;
}

.purchase-points {
  flex: 0 0 auto;

  text-align: right;
}

.purchase-points strong {
  display: block;

  font-size: 19px;
}

.purchase-points small {
  color: #2f855a;
}


/* ============================================================
   PURCHASE DETAIL
   ============================================================ */

.purchase-detail-card {
  background: #fff;

  border:
    1px solid
    #e8ebf2;

  border-radius: 18px;

  padding: 22px;
}

.purchase-detail-header {
  display: flex;

  justify-content: space-between;

  gap: 15px;

  padding-bottom: 16px;

  border-bottom:
    1px solid
    #edf0f5;
}

.purchase-detail-header h2 {
  margin: 0;
}

.purchase-detail-header span {
  color: #778298;
}

.purchase-items {
  display: grid;

  gap: 10px;

  margin: 20px 0;
}

.purchase-item {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 13px 0;

  border-bottom:
    1px solid
    #edf0f5;
}

.purchase-item small {
  display: block;

  color: #778298;

  margin-top: 4px;
}


/* ============================================================
   POINTS
   ============================================================ */

.points-hero {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 15px;

  margin-bottom: 18px;
}

.points-hero > div {
  background: #fff;

  border:
    1px solid
    #e8ebf2;

  border-radius: 16px;

  padding: 22px;
}

.points-hero span {
  display: block;

  color: #788398;

  font-size: 13px;
}

.points-hero strong {
  display: block;

  font-size: 29px;

  margin-top: 8px;
}

.simple-table .row {
  display: grid;

  grid-template-columns:
    1fr
    1fr
    1fr;

  gap: 10px;

  padding: 13px 0;

  border-bottom:
    1px solid
    #edf0f5;
}

.simple-table .row:last-child {
  border-bottom: 0;
}


/* ============================================================
   PERSONAL INFORMATION
   ============================================================ */

.personal-info-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(250px, 1fr)
    );

  gap: 16px;

  margin-top: 24px;
}

.personal-info-card {
  background: #fff;

  border:
    1px solid
    #e8ebf2;

  border-radius: 16px;

  padding: 18px;

  min-height: 88px;

  box-shadow:
    0 4px 14px
    rgba(23,32,51,.04);
}

.personal-info-label {
  display: block;

  color: #788398;

  font-size: 12px;

  font-weight: 800;

  letter-spacing: .08em;

  text-transform: uppercase;

  margin-bottom: 9px;
}

.personal-info-value {
  display: block;

  color: #172033;

  font-size: 16px;

  line-height: 1.45;

  word-break: break-word;
}


/* ============================================================
   EMPTY
   ============================================================ */

.empty-feature {
  text-align: center;

  padding: 70px 20px;
}

.empty-feature h2 {
  margin-bottom: 5px;
}

.empty-feature p {
  color: #788398;

  max-width: 600px;

  margin:
    0 auto 20px;
}

.big-icon {
  font-size: 48px;
}


/* ============================================================
   MODERN LOGIN EXPERIENCE
   ============================================================ */

.auth-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(55, 107, 235, .7), transparent 32%),
    radial-gradient(circle at 90% 86%, rgba(229, 35, 45, .32), transparent 30%),
    linear-gradient(135deg, #071842 0%, #102b69 54%, #0b1d49 100%);
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom right, #000, transparent 75%);
  mask-image: linear-gradient(to bottom right, #000, transparent 75%);
}

.auth-orb {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

.auth-orb-one {
  width: 340px;
  height: 340px;
  top: -150px;
  right: 8%;
  background: rgba(255, 255, 255, .09);
}

.auth-orb-two {
  width: 230px;
  height: 230px;
  bottom: -110px;
  left: 5%;
  border: 42px solid rgba(237, 30, 41, .28);
}

.auth-layout {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 32px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 32px 90px rgba(0, 8, 35, .38);
  backdrop-filter: blur(16px);
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 64px;
  color: #fff;
}

.auth-showcase::after {
  content: "H";
  position: absolute;
  right: -32px;
  bottom: -130px;
  color: rgba(255, 255, 255, .045);
  font-size: 410px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-8deg);
}

.showcase-badge {
  width: fit-content;
  margin-bottom: 28px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #dce7ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.auth-showcase h2 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.045em;
}

.auth-showcase > p {
  max-width: 470px;
  margin: 28px 0 42px;
  color: #c7d6f7;
  font-size: 17px;
  line-height: 1.7;
}

.showcase-features {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
}

.showcase-feature {
  display: grid;
  gap: 7px;
}

.showcase-feature span {
  color: #ff5962;
  font-size: 12px;
  font-weight: 900;
}

.showcase-feature strong {
  color: #eef4ff;
  font-size: 13px;
}

.mobile-auth-intro {
  display: none;
}

.mobile-auth-intro[hidden] {
  display: none;
}

.auth-layout .auth-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  border-radius: 0;
  box-shadow: none;
}

.auth-layout .login-logo {
  margin-bottom: 30px;
}

.auth-layout .login-logo img {
  width: min(100%, 280px);
}

.auth-layout .auth-card h1 {
  margin: 8px 0;
  color: #101a30;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.auth-layout .auth-card p {
  margin-bottom: 28px;
  color: #68758c;
  line-height: 1.6;
}

.auth-layout .auth-card label {
  margin: 18px 0;
  color: #1c2940;
  font-size: 13px;
}

.auth-layout .auth-card input {
  margin-top: 9px;
  padding: 15px 16px;
  border-color: #d8dfeb;
  border-radius: 12px;
  background: #f9fbff;
  color: #101a30;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-layout .auth-card input:focus {
  border-color: #2b5ddd;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 93, 221, .12);
}

.auth-layout .auth-card input::placeholder {
  color: #9aa5b7;
}

.auth-layout .auth-card .primary {
  min-height: 50px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #285fe3, #1747bd);
  box-shadow: 0 12px 28px rgba(35, 88, 216, .24);
  transition: transform .2s ease, box-shadow .2s ease;
}

.auth-layout .auth-card .primary:hover {
  background: linear-gradient(135deg, #3269ec, #1b4fc9);
  box-shadow: 0 15px 34px rgba(35, 88, 216, .32);
  transform: translateY(-1px);
}

.auth-layout .auth-card .primary:active {
  transform: translateY(0);
}

.auth-layout .message {
  font-size: 14px;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

  .member-card {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .member-card:focus-visible {
    outline: 3px solid #4f7df0;
    outline-offset: 5px;
  }

  .card-flip-hint {
    display: block;
    position: absolute;
    right: 12px;
    bottom: 9px;
    z-index: 5;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(8, 23, 57, .7);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    backdrop-filter: blur(6px);
  }

  .auth-shell {
    padding: 30px 20px;
  }

  .auth-layout {
    width: min(500px, 100%);
    min-height: auto;
    display: block;
    border-radius: 26px;
  }

  .auth-showcase {
    display: none;
  }

  .auth-layout .auth-card {
    border-radius: 25px;
    padding: 48px 42px;
  }

  .sidebar {
    transform:
      translateX(-100%);

    transition:
      transform .2s ease;
  }

  .sidebar.open {
    transform:
      translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .icon-btn {
    display: block;
  }

  .topbar {
    padding:
      0 18px;
  }

  .content {
    padding: 20px;
  }

  .stat-grid,
  .points-hero {
    grid-template-columns:
      1fr;
  }

  .feature-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .welcome {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .top-actions #backendStatus {
    display: none;
  }

}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 560px) {

  .auth-shell {
    min-height: 100svh;
    align-items: stretch;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background:
      radial-gradient(circle at 78% 9%, rgba(82, 130, 255, .66), transparent 28%),
      radial-gradient(circle at 5% 55%, rgba(237, 30, 41, .28), transparent 34%),
      linear-gradient(158deg, #06143a 0%, #123982 48%, #081942 100%);
  }

  .auth-shell::before {
    opacity: .12;
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 67%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 67%);
  }

  .auth-shell::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 95px;
    top: 236px;
    right: -125px;
    z-index: -1;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(237, 30, 41, .05), rgba(237, 30, 41, .72));
    transform: rotate(-24deg);
    box-shadow: 0 18px 50px rgba(237, 30, 41, .18);
  }

  .auth-orb-one {
    width: 210px;
    height: 210px;
    top: -105px;
    right: -75px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06);
  }

  .auth-orb-two {
    width: 150px;
    height: 150px;
    bottom: 38%;
    left: -100px;
    border-width: 26px;
  }

  .auth-layout {
    width: 100%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .mobile-auth-intro[hidden] {
    display: block;
    flex: 0 0 auto;
    min-height: 330px;
    padding: max(38px, env(safe-area-inset-top)) 28px 42px;
    color: #fff;
  }

  .mobile-auth-intro img {
    width: 178px;
    height: 54px;
    margin-bottom: 32px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .2));
  }

  .mobile-auth-intro span {
    display: block;
    margin-bottom: 12px;
    color: #afc8ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
  }

  .mobile-auth-intro h2 {
    margin: 0;
    font-size: clamp(38px, 11vw, 50px);
    line-height: .98;
    letter-spacing: -.045em;
  }

  .mobile-auth-intro p {
    margin: 16px 0 0;
    color: #d6e2ff;
    font-size: 14px;
  }

  .auth-layout .auth-card {
    position: relative;
    flex: 1 0 auto;
    min-height: 470px;
    justify-content: flex-start;
    border-radius: 30px 30px 0 0;
    padding: 36px 24px max(34px, env(safe-area-inset-bottom));
    box-shadow: 0 -18px 55px rgba(0, 9, 35, .25);
  }

  .auth-layout .auth-card::before {
    content: "";
    width: 42px;
    height: 4px;
    position: absolute;
    top: 12px;
    left: 50%;
    border-radius: 999px;
    background: #dce2ec;
    transform: translateX(-50%);
  }

  .auth-layout .login-logo {
    display: none;
  }

  .auth-layout .auth-card .eyebrow {
    color: #2d5bd0;
    font-size: 10px;
    letter-spacing: .16em;
  }

  .auth-layout .auth-card h1 {
    margin-top: 10px;
    font-size: 29px;
  }

  .auth-layout .auth-card p {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .auth-layout .auth-card label {
    margin: 14px 0;
  }

  .auth-layout .auth-card input {
    min-height: 52px;
    font-size: 16px;
  }

  .auth-layout .auth-card .primary {
    min-height: 54px;
    margin-top: 10px;
    border-radius: 14px;
    font-size: 15px;
    box-shadow: 0 14px 30px rgba(30, 78, 199, .28);
  }

  .auth-layout .message {
    margin-top: 13px;
    font-size: 13px;
  }

  .content {
    padding: 14px;
  }

  .topbar {
    height: 68px;
  }

  .welcome h1,
  .page-heading h1 {
    font-size: 25px;
  }

  .feature-grid {
    grid-template-columns:
      1fr;
  }

  .member-card {
    min-height: 220px;
  }

  .normal-member-card {
    padding: 20px;
  }

  /*
   * Do NOT make the Member 2 card
   * flex-column.
   *
   * It must preserve its card artwork
   * proportions.
   */

  .member2-logo {
    width: 31%;

    top: 6%;

    max-width: 125px;
  }

  .member2-title {
    top: 29%;

    font-size: 8px;
  }

  .member2-information {
    left: 6%;

    right: 6%;

    bottom: 6%;

    height: 35%;

    column-gap: 3%;
  }

  .member2-field label {
    font-size: 5.5px;
  }

  .member2-field strong {
    font-size: 7px;
  }

  .member2-name strong {
    font-size: 9px;
  }

  .member2-barcode {
    width: 25%;

    height: 24%;

    right: 5%;

    bottom: 5%;
  }

  .purchase-card {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .purchase-points {
    text-align: left;
  }

  .simple-table .row {
    grid-template-columns:
      1fr;

    gap: 4px;
  }

  .personal-info-grid {
    grid-template-columns:
      1fr;
  }

  .sidebar-logo {
    width: 135px;
  }

}


/* ============================================================
   VERY SMALL DEVICES
   ============================================================ */

@media (max-width: 380px) {

  .content {
    padding: 10px;
  }

  .member-card {
    min-height: 205px;
  }

  .member2-title {
    font-size: 7px;
  }

  .member2-field label {
    font-size: 5px;
  }

  .member2-field strong {
    font-size: 6.5px;
  }

  .member2-name strong {
    font-size: 8px;
  }

}
