:root {
  --balance-navy: #06233d;
  --balance-blue: #0a75b3;
  --balance-cyan: #19a7d8;
  --balance-yellow: #ffd400;
  --balance-ink: #08233d;
  --balance-muted: #5d7186;
  --balance-soft: #eef8fc;
  --balance-line: rgba(10, 80, 130, 0.14);
}

html {
  overflow-x: hidden;
}

body.mugla-balance-page {
  margin: 0;
  overflow-x: hidden;
  color: var(--balance-ink);
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 212, 0, 0.09), transparent 24%),
    radial-gradient(circle at 92% 36%, rgba(25, 167, 216, 0.15), transparent 30%),
    linear-gradient(180deg, #f5fbff 0%, #fff 44%, #eef8fc 100%);
  font-family: "Manrope", Arial, sans-serif;
}

body.mugla-balance-page .site-footer.footer-redesign {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
}

.balance-container {
  width: min(1760px, calc(100% - clamp(32px, 4vw, 80px)));
  margin: 0 auto;
}

.balance-hero {
  position: relative;
  min-height: clamp(650px, 72vh, 820px);
  overflow: hidden;
  color: #fff;
  background: var(--balance-navy);
}

.balance-hero-video,
.balance-hero-shade {
  position: absolute;
  inset: 0;
}

.balance-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
}

.balance-hero-shade {
  background:
    linear-gradient(90deg, rgba(4, 25, 45, 0.94) 0%, rgba(4, 39, 68, 0.84) 38%, rgba(3, 99, 151, 0.58) 72%, rgba(3, 121, 171, 0.42) 100%),
    radial-gradient(circle at 79% 44%, rgba(0, 149, 218, 0.28), transparent 26%);
}

.balance-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: inherit;
  padding: clamp(190px, 17vw, 260px) 0 clamp(74px, 8vw, 118px);
}

.balance-hero-copy {
  width: min(860px, 100%);
}

.balance-kicker,
.balance-section-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.balance-kicker::before,
.balance-section-label::before {
  content: "";
  width: clamp(46px, 4vw, 72px);
  height: 4px;
  border-radius: 99px;
  background: var(--balance-yellow);
}

.balance-kicker::after,
.balance-section-label::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0b74bd;
}

.balance-hero h1 {
  max-width: 820px;
  margin: 28px 0 24px;
  color: #fff;
  font-size: clamp(54px, 7.4vw, 126px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: 0;
}

.balance-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 1.55vw, 27px);
  font-weight: 700;
  line-height: 1.65;
}

.balance-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: clamp(34px, 4vw, 58px);
}

.balance-button,
.balance-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.balance-button {
  gap: 18px;
  padding: 10px 12px 10px 30px;
  color: var(--balance-ink);
  background: #fff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.14);
}

.balance-ghost {
  min-width: 230px;
  padding: 0 30px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.balance-button:hover,
.balance-ghost:hover {
  transform: translateY(-2px);
}

.balance-arrow {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: var(--balance-ink);
  background: var(--balance-yellow);
}

.balance-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balance-query-section,
.balance-services-section {
  padding: clamp(70px, 8vw, 126px) 0;
}

.balance-query-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.72fr);
  gap: clamp(34px, 6vw, 94px);
  align-items: center;
  padding: clamp(34px, 4.8vw, 70px);
  border: 1px solid var(--balance-line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 212, 0, 0.14), transparent 22%),
    radial-gradient(circle at 18% 85%, rgba(25, 167, 216, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 251, 255, 0.92));
  box-shadow: 0 28px 76px rgba(5, 45, 86, 0.11);
}

.balance-query-grid::after {
  content: "MUGLA KART";
  position: absolute;
  right: -18px;
  bottom: -12px;
  color: rgba(8, 35, 61, 0.035);
  font-size: clamp(70px, 9vw, 160px);
  font-weight: 900;
  line-height: 0.8;
  pointer-events: none;
}

.balance-query-copy,
.balance-form {
  position: relative;
  z-index: 1;
}

.balance-section-label {
  color: #254a86;
}

.balance-query-copy h2,
.balance-section-head h2 {
  max-width: 780px;
  margin: 26px 0 0;
  color: var(--balance-ink);
  font-size: clamp(36px, 4.1vw, 78px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.balance-query-copy p {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--balance-muted);
  font-size: clamp(17px, 1.22vw, 22px);
  font-weight: 600;
  line-height: 1.78;
}

.balance-form {
  padding: clamp(24px, 2.8vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 12%, rgba(25, 167, 216, 0.24), transparent 26%),
    linear-gradient(145deg, rgba(5, 34, 61, 0.98), rgba(5, 78, 122, 0.96));
  box-shadow: 0 28px 60px rgba(5, 45, 86, 0.24);
}

.balance-form label {
  display: block;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.balance-card-input {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.balance-card-input span {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.balance-card-input span::before,
.balance-card-input span::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 99px;
  background: var(--balance-yellow);
}

.balance-card-input span::before {
  top: 14px;
}

.balance-card-input span::after {
  bottom: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.balance-card-input input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: clamp(20px, 1.9vw, 31px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.balance-card-input input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.balance-card-input button {
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  color: var(--balance-ink);
  background: var(--balance-yellow);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.balance-form small {
  display: block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.balance-services-section {
  padding-top: 0;
}

.balance-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(30px, 4vw, 56px);
}

.balance-section-head h2 {
  margin-top: 20px;
}

.balance-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.balance-service-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 168px;
  padding: 26px;
  border: 1px solid var(--balance-line);
  border-radius: 8px;
  color: var(--balance-ink);
  overflow: hidden;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 252, 255, 0.92)),
    #fff;
  box-shadow: 0 18px 48px rgba(5, 45, 86, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.balance-service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--balance-yellow), var(--balance-cyan));
  opacity: 0.9;
}

.balance-service-card::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -62px;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background-image: var(--balance-watermark);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.07;
  transform: rotate(-8deg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.balance-service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(8, 115, 184, 0.26);
  box-shadow: 0 24px 66px rgba(5, 45, 86, 0.13);
}

.balance-service-card:hover::after {
  opacity: 0.1;
  transform: scale(1.08) rotate(-5deg);
}

.balance-service-icon,
.balance-service-card > .balance-arrow {
  position: relative;
  z-index: 1;
}

.balance-service-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(25, 167, 216, 0.18);
  border-radius: 8px;
  color: #0875bc;
  background: rgba(229, 248, 255, 0.82);
}

.balance-service-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balance-service-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.balance-service-copy strong {
  color: var(--balance-ink);
  font-size: clamp(19px, 1.35vw, 25px);
  font-weight: 900;
  line-height: 1.2;
}

.balance-service-copy small {
  color: var(--balance-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.balance-service-card > .balance-arrow {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

@media (max-width: 1180px) {
  .balance-query-grid {
    grid-template-columns: 1fr;
  }

  .balance-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .balance-container {
    width: min(100% - 28px, 620px);
  }

  .balance-hero {
    min-height: 720px;
  }

  .balance-hero-inner {
    padding: 168px 0 58px;
    align-items: flex-start;
  }

  .balance-kicker,
  .balance-section-label {
    gap: 12px;
    font-size: 13px;
  }

  .balance-kicker::before,
  .balance-section-label::before {
    width: 42px;
    height: 3px;
  }

  .balance-hero h1 {
    margin-top: 24px;
    font-size: clamp(48px, 15vw, 74px);
  }

  .balance-hero p {
    font-size: 17px;
    line-height: 1.65;
  }

  .balance-hero-actions,
  .balance-button,
  .balance-ghost {
    width: 100%;
  }

  .balance-button {
    justify-content: space-between;
    padding-left: 24px;
  }

  .balance-query-section,
  .balance-services-section {
    padding: 58px 0;
  }

  .balance-query-grid {
    padding: 24px;
  }

  .balance-query-copy h2,
  .balance-section-head h2 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .balance-card-input {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .balance-card-input button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .balance-card-input input {
    font-size: clamp(20px, 7vw, 28px);
  }

  .balance-section-head {
    display: block;
  }

  .balance-services-grid {
    grid-template-columns: 1fr;
  }

  .balance-service-card {
    min-height: 146px;
    padding: 22px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .balance-service-card > .balance-arrow {
    grid-column: 2;
    justify-self: start;
  }
}

.balance-service-icon i {
  font-size: 26px;
}

html.balance-modal-open,
html.balance-modal-open body {
  overflow: hidden;
}

.balance-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.balance-modal[hidden] {
  display: none;
}

.balance-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 35, 0.62);
  backdrop-filter: blur(6px);
}

.balance-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: 0 0 22px;
  border-radius: 18px;
  color: var(--balance-ink);
  background: #fff;
  box-shadow: 0 40px 90px rgba(5, 20, 40, 0.4);
  animation: balance-modal-in 0.22s ease;
}

@keyframes balance-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.balance-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--balance-muted);
  background: var(--balance-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.balance-modal-close:hover {
  background: #e4f3fa;
  transform: rotate(90deg);
}

.balance-modal-dialog.has-head .balance-modal-close {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.balance-modal-dialog.has-head .balance-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.balance-modal-state {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 44px 26px 16px;
  text-align: center;
}

.balance-modal-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  font-size: 22px;
  font-weight: 900;
}

.balance-modal-state p {
  margin: 0;
  color: var(--balance-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.balance-modal-head {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 28px 26px 24px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  color: #fff;
  background:
    radial-gradient(circle at 90% -10%, rgba(25, 167, 216, 0.45), transparent 55%),
    radial-gradient(circle at 10% 120%, rgba(255, 212, 0, 0.16), transparent 45%),
    linear-gradient(140deg, var(--balance-navy) 0%, #0a4a78 100%);
}

.balance-modal-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.balance-modal-type {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.balance-modal-status {
  position: relative;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.balance-modal-status.is-active {
  color: #052e17;
  background: #6ee7a3;
}

.balance-modal-status.is-inactive {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.balance-modal-amount {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: #fff;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
}

.balance-modal-amount-label {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
}

.balance-modal-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
  margin: 20px 26px 0;
}

.balance-modal-meta div {
  display: grid;
  gap: 3px;
}

.balance-modal-meta dt {
  color: var(--balance-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.balance-modal-meta dd {
  margin: 0;
  color: var(--balance-ink);
  font-size: 15px;
  font-weight: 800;
}

.balance-modal-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #92400e;
  background: rgba(255, 212, 0, 0.14);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.balance-pending {
  margin: 18px 26px 0;
  padding: 12px 12px 4px;
  border: 1px dashed rgba(255, 180, 0, 0.4);
  border-radius: 12px;
  background: rgba(255, 212, 0, 0.05);
}

.balance-pending-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  color: #92400e;
  background: rgba(255, 212, 0, 0.3);
  font-size: 10px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
}

.balance-pending strong,
.balance-modal-transactions strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--balance-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.balance-pending ul,
.balance-modal-transactions ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.balance-pending li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: 7px;
  color: #7c4a03;
  font-size: 12.5px;
  font-weight: 700;
}

.balance-pending li:nth-child(2n) {
  background: rgba(255, 212, 0, 0.08);
}

.balance-modal-transactions {
  margin: 18px 26px 0;
}

.balance-modal-transactions ul {
  max-height: 220px;
  overflow-y: auto;
}

.balance-tx {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--balance-line);
  font-size: 14px;
  font-weight: 700;
}

.balance-tx:last-child {
  border-bottom: 0;
}

.balance-tx-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.balance-tx-in .balance-tx-dot {
  background: #22c55e;
}

.balance-tx-out .balance-tx-dot {
  background: #ef4444;
}

.balance-tx-date {
  flex: 1;
  color: var(--balance-muted);
  font-weight: 600;
}

.balance-tx-amount {
  white-space: nowrap;
}

.balance-tx-in .balance-tx-amount {
  color: #15803d;
}

.balance-tx-out .balance-tx-amount {
  color: #b91c1c;
}

.balance-tx-empty {
  padding: 14px 4px;
  color: var(--balance-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.balance-card-input button:disabled,
.service-card-input button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .balance-modal {
    padding: 15px;
  }

  .balance-modal-dialog {
    width: min(420px, calc(100vw - 30px));
    max-height: min(86vh, 720px);
  }

  .balance-modal-amount {
    font-size: 34px;
  }
}
