* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --card-2: #20242d;
  --text: #ffffff;
  --muted: #9ea5b3;
  --border: rgba(255,255,255,0.07);

  --green: #35c759;
  --yellow: #ffcc00;
  --red: #ff453a;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

a,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: none;
}

/* LOGIN */

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}

.login-screen {
  width: 100%;
  max-width: 430px;
}

.login-card {
  width: 100%;
  background: linear-gradient(145deg, #1a1e26, #151922);
  border-radius: 30px;
  padding: 30px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 55px rgba(0,0,0,0.35);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  overflow: hidden;
}

.login-brand-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 8px;
}

.login-brand-subtitle {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.error-box {
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.3);
  color: #ff6b7d;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 18px;
  font-size: 15px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 14px;
}

.error-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #ff6b7d;
  color: #ff6b7d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-shell {
  width: 100%;
  height: 62px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
}

.input-shell:has(.login-input.valid) {
  border-color: rgba(53, 199, 89, 0.9);
  box-shadow: 0 0 0 3px rgba(53, 199, 89, 0.12);
}

.input-shell:has(.login-input.invalid) {
  border-color: rgba(255, 69, 58, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.12);
}

.input-icon {
  width: 26px;
  height: 26px;
  fill: var(--muted);
  flex: 0 0 auto;
}

.login-input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  padding: 0 !important;
}

.login-input::placeholder {
  color: rgba(158,165,179,0.95);
}

.password-toggle {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eye-icon {
  width: 28px;
  height: 28px;
  fill: var(--muted);
}

.login-submit {
  width: 100%;
  height: 62px;
  margin-top: 10px;
  border: none;
  border-radius: 20px;
  background: #ffffff;
  color: #111111;
  font-size: 18px;
  font-weight: 900;
}

/* DASHBOARD */

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(34px + env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.small-label {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.balance {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
}

.logout-btn {
  height: 54px;
  padding: 0 24px;
  border: none;
  border-radius: 20px;
  background: #ffffff;
  color: #111;
  font-size: 17px;
  font-weight: 800;
}

.phone-card {
  background: linear-gradient(145deg, #1a1e26, #151922);
  border-radius: 30px;
  padding: 28px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}

.status-line {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 22px;
}

.status {
  font-weight: 800;
}

.status.active {
  color: var(--green);
}

.status.blocked {
  color: var(--red);
}

.phone-number {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  text-decoration: none !important;
  font-size: 35px;
  font-weight: 850;
  line-height: 1.15;
  margin-bottom: 26px;
  letter-spacing: -1px;
  pointer-events: none;
  user-select: none;
}

.replenish-box {
  background: rgba(255,255,255,0.055);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 24px;
  display: grid;
  gap: 6px;
}

.replenish-line {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.15px;
}

.replenish-line-muted {
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

.replenish-line-main {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.tariff-card {
  background: rgba(255,255,255,0.04);
  border-radius: 24px;
  padding: 18px 16px;
}

.tariff-card-row {
  width: 100%;
  border: none;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  text-align: left;

  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.tariff-card-row:focus,
.tariff-card-row:active {
  outline: none;
  border: none;
  background: rgba(255,255,255,0.04);
}

.tariff-label {
  color: var(--muted);
  font-size: 17px;
  flex: 0 0 auto;
}

.tariff-name {
  font-size: 19px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.tariff-divider {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.18);
  flex: 0 0 auto;
}

.tariff-price {
  font-size: 19px;
  font-weight: 900;
  flex: 0 0 auto;
}

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

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.6px;
}

.section-title span {
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.packages-panel {
  background: linear-gradient(145deg, #1a1e26, #151922);
  border-radius: 30px;
  padding: 28px 18px 26px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.22);
}

.package-mini {
  min-width: 0;
  text-align: center;
}

.package-mini.green {
  --ring-color: var(--green);
  --ring-shadow: rgba(53, 199, 89, 0.28);
}

.package-mini.yellow {
  --ring-color: var(--yellow);
  --ring-shadow: rgba(255, 204, 0, 0.28);
}

.package-mini.red {
  --ring-color: var(--red);
  --ring-shadow: rgba(255, 69, 58, 0.28);
}

.arc-wrap {
  --size: 116px;

  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.arc-bg,
.arc-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

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

.arc-fill {
  stroke: var(--ring-color) !important;
  stroke-dasharray: calc(var(--p) * 1) 100;
  filter: drop-shadow(0 0 8px var(--ring-shadow));
}

.icon-circle {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--ring-color) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.22),
    0 10px 22px rgba(0,0,0,0.22),
    0 0 12px var(--ring-shadow);
}

.pkg-svg {
  width: 31px;
  height: 31px;
  fill: #ffffff !important;
}

.package-main-value {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.package-unit {
  color: var(--muted);
  font-size: 19px;
  font-weight: 700;
}

.empty-card {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

/* MODAL */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: linear-gradient(145deg, #1a1e26, #151922);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.modal-label,
.modal-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 26px;
  font-weight: 900;
  margin: 0 46px 8px 0;
}

.modal-price {
  font-size: 22px;
  font-weight: 850;
}

.modal-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 20px 0;
}

.modal-packages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-package-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.045);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
}

.modal-package-row span {
  color: var(--muted);
}

.modal-package-row strong {
  color: #fff;
  white-space: nowrap;
}

/* MOBILE */

@media (max-width: 420px) {
  .login-body {
    padding: 16px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .login-brand-logo {
    width: 190px;
  }

  .login-brand-subtitle {
    font-size: 17px;
  }

  .input-shell {
    height: 60px;
  }

  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .phone-number {
    font-size: 31px;
  }

  .balance {
    font-size: 34px;
  }

  .replenish-box {
    padding: 15px 16px;
    gap: 5px;
  }

  .replenish-line-muted {
    font-size: 15px;
  }

  .replenish-line-main {
    font-size: 18px;
  }

  .tariff-card {
    padding: 17px 14px;
  }

  .tariff-card-row {
    gap: 8px;
  }

  .tariff-label {
    font-size: 16px;
  }

  .tariff-name {
    font-size: 17px;
  }

  .tariff-price {
    font-size: 17px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .section-title span {
    font-size: 14px;
  }

  .packages-panel {
    padding-left: 10px;
    padding-right: 10px;
    gap: 4px;
  }

  .arc-wrap {
    --size: 98px;
  }

  .arc-bg,
  .arc-fill {
    stroke-width: 8;
  }

  .icon-circle {
    width: 48px;
    height: 48px;
  }

  .pkg-svg {
    width: 26px;
    height: 26px;
  }

  .package-main-value {
    font-size: 25px;
  }

  .package-unit {
    font-size: 17px;
  }

  .modal-overlay {
    padding: 18px;
  }

  .modal-card {
    max-width: 100%;
    border-radius: 26px;
    padding: 22px;
  }

  .modal-title {
    font-size: 24px;
  }
}
/* BOTTOM NAV */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 8000;
  width: 100%;
  max-width: 520px;
  transform: translateX(-50%);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(15, 17, 21, 0.88);
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bottom-nav-link {
  height: 54px;
  border-radius: 18px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
}

.bottom-nav-link.active {
  color: #111;
  background: #ffffff;
}

.bottom-nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* FINANCES */

.finances-shell {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
}

.finance-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finance-month {
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
  padding: 6px 2px 0;
}

.finance-group {
  background: linear-gradient(145deg, #1a1e26, #151922);
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

.finance-row {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
}

.finance-row:last-child {
  border-bottom: none;
}


.finance-left {
  min-width: 0;
  flex: 1 1 auto;
}

.finance-date {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}

.finance-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-right {
  text-align: right;
  flex: 0 0 auto;
}

.finance-amount {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.finance-amount.income {
  color: var(--green);
}

.finance-amount.expense {
  color: var(--red);
}

.finance-amount.neutral {
  color: var(--muted);
}

.finance-balance {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.app-shell {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

@media (max-width: 420px) {
  .page-title {
    font-size: 34px;
  }

  .finance-row {
    padding: 15px 16px;
    gap: 10px;
  }

  .finance-title {
    font-size: 16px;
    max-width: 210px;
  }

  .finance-amount {
    font-size: 18px;
  }

  .finance-balance {
    font-size: 11px;
  }

  .bottom-nav {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* DETAILIZATION */

.detalization-shell {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.detail-header {
  margin-bottom: 18px;
}

.month-select-card {
  background: linear-gradient(145deg, #1a1e26, #151922);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.month-select-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.month-select {
  max-width: 210px;
  border: none;
  outline: none;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 850;
}

.month-select option {
  color: #111;
}

.detail-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  padding: 16px;
}

.summary-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

/* Ring icons in the same visual style as the main dashboard */
.summary-ring {
  --ring-color: #35c759;
  --ring-shadow: rgba(53, 199, 89, 0.28);
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.summary-ring-calls {
  --ring-color: var(--green);
  --ring-shadow: rgba(53, 199, 89, 0.28);
}

.summary-ring-sms {
  --ring-color: var(--yellow);
  --ring-shadow: rgba(255, 204, 0, 0.28);
}

.summary-ring-internet {
  --ring-color: #42a5ff;
  --ring-shadow: rgba(66, 165, 255, 0.28);
}

.summary-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.summary-arc-bg,
.summary-arc-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.summary-arc-bg {
  stroke: rgba(255,255,255,0.09);
}

.summary-arc-fill {
  stroke: var(--ring-color);
  stroke-dasharray: 72 100;
  filter: drop-shadow(0 0 8px var(--ring-shadow));
}

.summary-icon-circle {
  position: relative;
  z-index: 2;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--ring-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.22),
    0 7px 16px rgba(0,0,0,0.22),
    0 0 11px var(--ring-shadow);
}

.summary-pkg-svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.summary-card-calls .summary-title {
  color: var(--green);
}

.summary-card-sms .summary-title {
  color: var(--yellow);
}

.summary-card-internet .summary-title {
  color: #42a5ff;
}

.summary-topline strong {
  color: var(--text);
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.4px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.summary-grid-two {
  grid-template-columns: repeat(2, 1fr);
}

.summary-grid div {
  min-width: 0;
  background: rgba(255,255,255,0.045);
  border-radius: 16px;
  padding: 11px 10px;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 5px;
  white-space: nowrap;
}

.summary-grid strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 0 12px;
  background: var(--bg);
}

.detail-tab {
  height: 44px;
  border: none;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.detail-tab-calls {
  color: var(--green);
  background: rgba(53,199,89,0.10);
  box-shadow: inset 0 0 0 1px rgba(53,199,89,0.13);
}

.detail-tab-sms {
  color: var(--yellow);
  background: rgba(255,204,0,0.10);
  box-shadow: inset 0 0 0 1px rgba(255,204,0,0.13);
}

.detail-tab-internet {
  color: #42a5ff;
  background: rgba(66,165,255,0.10);
  box-shadow: inset 0 0 0 1px rgba(66,165,255,0.13);
}

.detail-tab.active {
  color: #ffffff;
}

.detail-tab-calls.active {
  background: rgba(53,199,89,0.22);
  color: var(--green);
  box-shadow:
    inset 0 0 0 1px rgba(53,199,89,0.45),
    0 0 18px rgba(53,199,89,0.13);
}

.detail-tab-sms.active {
  background: rgba(255,204,0,0.20);
  color: var(--yellow);
  box-shadow:
    inset 0 0 0 1px rgba(255,204,0,0.45),
    0 0 18px rgba(255,204,0,0.12);
}

.detail-tab-internet.active {
  background: rgba(66,165,255,0.20);
  color: #42a5ff;
  box-shadow:
    inset 0 0 0 1px rgba(66,165,255,0.45),
    0 0 18px rgba(66,165,255,0.12);
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-day {
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  padding: 12px 2px 8px;
}

.detail-list {
  background: linear-gradient(145deg, #1a1e26, #151922);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-time {
  width: 46px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  flex: 0 0 auto;
}

.detail-main {
  min-width: 0;
  flex: 1 1 auto;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 86px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 86px;
}

.direction-pill.incoming {
  color: var(--green);
  background: rgba(53,199,89,0.12);
}

.direction-pill.outgoing {
  color: #8ab4ff;
  background: rgba(138,180,255,0.12);
}

.detail-number {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-subline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 5px;
}

.detail-cost {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}

.detail-cost.paid {
  color: var(--red);
}

.internet-row {
  justify-content: space-between;
}

.internet-values {
  text-align: right;
  flex: 0 0 auto;
}

.internet-values strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  margin-bottom: 5px;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .month-select-card {
    padding: 15px 16px;
  }

  .month-select {
    max-width: 190px;
    font-size: 15px;
  }

  .summary-grid {
    gap: 6px;
  }

  .summary-grid div {
    padding: 10px 8px;
  }

  .summary-grid span {
    font-size: 11px;
  }

  .summary-grid strong {
    font-size: 14px;
  }

  .detail-row {
    padding: 13px 14px;
    gap: 10px;
  }

  .detail-time {
    width: 43px;
    font-size: 13px;
  }

  .direction-pill {
    width: 82px;
    flex-basis: 82px;
    font-size: 11px;
  }

  .detail-number {
    font-size: 15px;
  }

  .detail-cost {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .summary-ring { width: 46px; height: 46px; }
  .summary-icon-circle { width: 29px; height: 29px; }
  .summary-pkg-svg { width: 17px; height: 17px; }
  .summary-title { gap: 8px; font-size: 17px; }
}


/* PREMIUM MOTION PACK - restored without loading rectangle */

@media (prefers-reduced-motion: no-preference) {
  body {
    animation: appFadeIn 220ms ease-out both;
  }

  .app-shell,
  .login-screen {
    animation: pageRiseIn 260ms cubic-bezier(.2,.8,.2,1) both;
  }

  .phone-card,
  .packages-panel,
  .finance-group,
  .month-select-card,
  .summary-card,
  .detail-list,
  .login-card {
    animation: cardRiseIn 320ms cubic-bezier(.2,.8,.2,1) both;
  }

  .phone-card { animation-delay: 20ms; }
  .packages-panel { animation-delay: 70ms; }
  .finance-group:nth-of-type(1) { animation-delay: 30ms; }
  .finance-group:nth-of-type(2) { animation-delay: 65ms; }
  .finance-group:nth-of-type(3) { animation-delay: 100ms; }

  .arc-fill,
  .summary-arc-fill {
    animation: ringDraw 780ms cubic-bezier(.2,.8,.2,1) both;
  }

  .modal-card {
    animation: modalPopIn 180ms cubic-bezier(.2,.8,.2,1) both;
  }

  .detail-panel.active {
    animation: panelFadeIn 180ms ease-out both;
  }
}

@keyframes appFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pageRiseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardRiseIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ringDraw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

button,
.bottom-nav-link,
.tariff-card-row,
.finance-row,
.detail-tab,
.login-submit,
.logout-btn,
.password-toggle,
.month-select {
  transition:
    transform 140ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

button:active,
.bottom-nav-link:active,
.tariff-card-row:active,
.finance-row:active,
.detail-tab:active,
.login-submit:active,
.logout-btn:active,
.password-toggle:active {
  transform: scale(.97);
}

.phone-card,
.packages-panel,
.finance-group,
.detail-list,
.summary-card,
.month-select-card,
.login-card,
.tariff-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.tariff-card-row:active,
.finance-row:active,
.summary-card:active {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 18px 42px rgba(0,0,0,0.24);
}

.bottom-nav-link.active {
  box-shadow: 0 10px 22px rgba(255,255,255,0.12);
}

.bottom-nav-link:not(.active):active {
  background: rgba(255,255,255,0.07);
}

.detail-tab.active {
  transform: translateY(-1px);
}

.icon-circle,
.summary-icon-circle {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.package-mini:active .icon-circle,
.summary-card:active .summary-icon-circle {
  transform: scale(.96);
}

body.is-leaving .app-shell,
body.is-leaving .login-screen {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* PAYMENT UI */
.balance-block {
  min-width: 0;
}

.topbar {
  align-items: flex-end;
  gap: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.logout-form {
  margin: 0;
}

.topbar-action-btn {
  height: 42px;
  border: none;
  border-radius: 16px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.topbar-action-btn:active {
  transform: scale(0.97);
}

.refill-btn {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 10px 24px rgba(255,255,255,0.08);
}

.logout-btn.topbar-action-btn {
  height: 42px;
  padding: 0 15px;
  border-radius: 16px;
  background: rgba(255,255,255,0.075);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.payment-modal-card {
  max-width: 430px;
}

.payment-modal-title {
  margin-right: 44px;
}

.payment-phone {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 20px;
}

.payment-phone strong {
  color: var(--text);
  font-weight: 900;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.payment-input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(255,255,255,0.10);
  outline: none;
  border-radius: 18px;
  background: rgba(255,255,255,0.055);
  color: var(--text);
  padding: 0 16px;
  font-size: 18px;
  font-weight: 850;
}

.payment-input::placeholder {
  color: rgba(158,165,179,0.85);
}

.payment-input:focus {
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}

.payment-input.valid {
  border-color: rgba(53,199,89,0.72);
  box-shadow: 0 0 0 4px rgba(53,199,89,0.10);
}

.payment-input.invalid {
  border-color: rgba(255,69,58,0.78);
  box-shadow: 0 0 0 4px rgba(255,69,58,0.10);
}

.payment-error {
  color: #ff6b7d;
  background: rgba(255,69,58,0.12);
  border: 1px solid rgba(255,69,58,0.24);
  border-radius: 16px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 750;
}

.payment-submit {
  height: 58px;
  border: none;
  border-radius: 19px;
  background: #ffffff;
  color: #111111;
  font-size: 17px;
  font-weight: 950;
  margin-top: 2px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.payment-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.payment-submit:disabled {
  opacity: 0.38;
}

.payment-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 420px) {
  .topbar {
    gap: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-action-btn,
  .logout-btn.topbar-action-btn {
    height: 39px;
    border-radius: 15px;
    padding: 0 11px;
    font-size: 13px;
  }

  .balance {
    font-size: 31px;
  }
}

@media (max-width: 360px) {
  .topbar-action-btn,
  .logout-btn.topbar-action-btn {
    padding: 0 9px;
    font-size: 12px;
  }
}

/* Smooth page/data transitions without old rectangular loader */
@media (prefers-reduced-motion: no-preference) {
  body {
    animation: appSoftFadeIn 180ms ease-out both;
  }

  .app-shell,
  .login-screen,
  .finance-list,
  .detail-summary,
  .detail-panel,
  .phone-card,
  .packages-panel {
    transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
  }

  .app-shell,
  .login-screen {
    animation: appSoftRiseIn 220ms cubic-bezier(.2,.8,.2,1) both;
  }

  body.is-leaving .app-shell,
  body.is-leaving .login-screen {
    opacity: .58;
    filter: blur(8px);
    transform: translateY(8px) scale(.985);
  }

  body.is-data-loading .finance-list,
  body.is-data-loading .detail-summary,
  body.is-data-loading .detail-panel.active {
    opacity: .72;
    filter: blur(4px);
    transform: translateY(4px);
  }
}

@keyframes appSoftFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes appSoftRiseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
