/* Auth — same vitality & palette as the control panel */
:root {
  --ink: #0f1c24;
  --ink-soft: #3d5360;
  --muted: #5b6b78;
  --line: rgba(15, 28, 36, 0.09);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --ok: #2563eb;
  --ok-hover: #1d4ed8;
  --ok-soft: rgba(37, 99, 235, 0.16);
  --ok-mid: #3b82f6;
  --ok-light: #60a5fa;
  --online: #10b981;
  --radius: 1.25rem;
  --shadow: 0 18px 40px -28px rgba(15, 28, 36, 0.4);
  --auth-ink: var(--ink);
  --auth-muted: var(--muted);
  --auth-blue: var(--ok);
  --auth-blue-deep: var(--ok-hover);
  --auth-line: var(--line);
  --auth-glass: var(--glass-strong);
  --auth-shadow: var(--shadow);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body.auth-body {
  font-family: Manrope, Cairo, "Segoe UI", Tahoma, system-ui, sans-serif;
  color: var(--ink);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(900px 500px at 96% 4%, rgba(16, 185, 129, 0.12), transparent 50%),
    radial-gradient(700px 420px at 70% 100%, rgba(217, 119, 6, 0.1), transparent 55%),
    linear-gradient(165deg, #e8eef8 0%, #eef4f8 40%, #f3efe8 100%);
}

html[dir="rtl"] body.auth-body,
html[lang="ar"] body.auth-body {
  font-family: Cairo, Manrope, "Segoe UI", Tahoma, system-ui, sans-serif;
}

.auth-shell {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  min-height: 100dvh;
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-hero-mesh {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 200deg at 40% 40%, transparent 0deg, rgba(37, 99, 235, 0.07) 70deg, transparent 140deg, rgba(16, 185, 129, 0.05) 220deg, transparent 300deg);
  animation: authMesh 24s linear infinite;
  opacity: 0.9;
}

.auth-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 28, 36, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 28, 36, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 65% at 55% 35%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 55% 35%, #000, transparent);
}

/* Atmosphere blobs keep auth-hero-* names */
.auth-hero-pulse {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  left: 14%;
  top: 52%;
  background: rgba(37, 99, 235, 0.14);
  filter: blur(52px);
  animation: authPulse 8s ease-in-out infinite;
}

.auth-hero-pulse--b {
  width: 240px;
  height: 240px;
  left: auto;
  right: 18%;
  top: 12%;
  background: rgba(16, 185, 129, 0.14);
  animation-duration: 10s;
  animation-direction: reverse;
}

body.auth-portal .auth-hero-pulse {
  background: rgba(14, 165, 233, 0.12);
}

body.auth-portal .auth-hero-pulse--b {
  background: rgba(37, 99, 235, 0.12);
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}

.auth-lockup {
  display: block;
  width: auto;
  height: clamp(72px, 9vw, 88px);
  max-width: min(200px, 100%);
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 10px 22px rgba(37, 99, 235, 0.14));
}

.auth-stage-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 28, 36, 0.06);
}

.auth-stage-wrap {
  position: relative;
  width: min(400px, 100%);
  padding: 1.55rem 1.35rem;
}

.auth-form-halo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

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

.auth-ring-track {
  fill: none;
  stroke: rgba(15, 28, 36, 0.07);
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
}

.auth-ring-fill {
  fill: none;
  stroke: url(#authRingGrad);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 12;
  vector-effect: non-scaling-stroke;
  transform-origin: 100px 130px;
  animation:
    authRingDraw 1.5s cubic-bezier(0.22, 1, 0.36, 1) both,
    authRingPulse 4.5s ease-in-out 1.5s infinite;
}

.auth-ring-fill--portal {
  stroke: url(#authPortalRingGrad);
}

.auth-ring-glow {
  fill: none;
  stroke: rgba(16, 185, 129, 0.35);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 12;
  vector-effect: non-scaling-stroke;
  filter: blur(5px);
  opacity: 0.5;
  animation:
    authRingDraw 1.5s cubic-bezier(0.22, 1, 0.36, 1) both,
    authRingPulse 4.5s ease-in-out 1.5s infinite;
}

.auth-ring-glow--portal {
  stroke: rgba(14, 165, 233, 0.4);
}

.auth-orbit {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px dashed rgba(37, 99, 235, 0.16);
  animation: authSpin 32s linear infinite;
  pointer-events: none;
}

.auth-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 0 12px rgba(37, 99, 235, 0.45);
}

.auth-orbit i:nth-child(1) { top: 0; left: 50%; transform: translate(-50%, -50%); background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), 0 0 12px rgba(16, 185, 129, 0.45); }
.auth-orbit i:nth-child(2) { right: 2%; top: 38%; background: #2563eb; }
.auth-orbit i:nth-child(3) { left: 4%; top: 62%; background: #0ea5e9; }
.auth-orbit i:nth-child(4) { bottom: 2%; left: 48%; background: #34d399; }

/* Form — centered full page */
.auth-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.1rem 1.35rem;
}

.auth-langs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 20px -16px rgba(15, 28, 36, 0.3);
  backdrop-filter: blur(10px);
}

.auth-lang {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.auth-lang.is-on {
  background: #fff;
  color: var(--ok);
  box-shadow: 0 6px 14px -12px rgba(15, 28, 36, 0.35);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem 1.25rem;
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.55rem 1.5rem 1.45rem;
  border-radius: 1.35rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    radial-gradient(420px 180px at 88% 18%, rgba(16, 185, 129, 0.1), transparent 60%),
    radial-gradient(360px 160px at 10% 90%, rgba(37, 99, 235, 0.1), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: authRise 0.75s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both;
  isolation: isolate;
  overflow: hidden;
}

.auth-orb-stage-a {
  width: 140px;
  height: 140px;
  inset-inline-end: -20px;
  top: -36px;
  background: rgba(16, 185, 129, 0.22);
  opacity: 0.7;
  z-index: 0;
  animation: authFloat 8s ease-in-out infinite;
}

.auth-orb-stage-b {
  width: 120px;
  height: 120px;
  inset-inline-start: -24px;
  bottom: -40px;
  background: rgba(37, 99, 235, 0.18);
  opacity: 0.65;
  z-index: 0;
  animation: authFloat 10s ease-in-out infinite reverse;
}

.auth-stage > *:not(.auth-orb) {
  position: relative;
  z-index: 1;
}

.auth-stage h1 {
  font-family: Outfit, Cairo, Manrope, sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1.15rem;
}

.auth-alert {
  margin-bottom: 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-alert.is-error {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.14);
}

.auth-alert.is-ok {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.16);
}

.auth-alert.is-info {
  background: var(--ok-soft);
  color: var(--ok-hover);
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.auth-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.auth-field input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 0 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input::placeholder { color: #94a3b8; }

.auth-field input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.auth-pass { position: relative; }
.auth-pass input { padding-inline-end: 2.75rem; }

.auth-pass-toggle {
  position: absolute;
  inset-inline-end: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.auth-pass-toggle:hover {
  color: var(--ok-hover);
  background: var(--ok-soft);
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 0.4rem;
  border: 0;
  border-radius: 12px;
  background: var(--ok);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 22px -12px rgba(37, 99, 235, 0.7);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-submit::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.45);
}

.auth-submit:hover {
  background: var(--ok-hover);
  transform: translateY(-1px);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit.is-busy {
  pointer-events: none;
  opacity: 0.85;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1rem;
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.75rem 1.25rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 550;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.auth-footer time {
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--ink-soft);
}

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

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

@keyframes authPulse {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate(24px, -18px) scale(1.12); opacity: 0.8; }
}

@keyframes authFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}

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

@keyframes authRingDraw {
  from { stroke-dashoffset: 100; opacity: 0.15; }
  to { stroke-dashoffset: 12; opacity: 1; }
}

@keyframes authRingPulse {
  0%, 100% { opacity: 1; stroke-width: 3.6; }
  50% { opacity: 0.78; stroke-width: 4.2; }
}

@media (max-width: 900px) {
  .auth-lockup {
    height: 72px;
  }

  .auth-main {
    padding-top: 0.75rem;
  }

  .auth-stage-wrap {
    width: min(440px, 100%);
    padding: 1.25rem 1.1rem;
  }
}

@media (max-width: 520px) {
  .auth-form-halo {
    opacity: 0.72;
  }

  .auth-stage-wrap {
    padding: 1rem 0.85rem;
  }

  .auth-footer {
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    text-align: center;
    padding: 0.55rem 0.85rem;
    padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-hero-mesh,
  .auth-hero-pulse,
  .auth-orb,
  .auth-orbit,
  .auth-ring-fill,
  .auth-ring-glow,
  .auth-stage,
  .portal-dash {
    animation: none !important;
  }
}

/* —— Portal home (post-login dashboard) —— */
.portal-home {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(900px 500px at 96% 4%, rgba(16, 185, 129, 0.12), transparent 50%),
    radial-gradient(700px 420px at 70% 100%, rgba(217, 119, 6, 0.1), transparent 55%),
    linear-gradient(165deg, #e8eef8 0%, #eef4f8 40%, #f3efe8 100%);
  color: var(--ink);
}

.portal-home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

.portal-home > * {
  position: relative;
  z-index: 1;
}

.portal-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.15rem;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.portal-bar-logo {
  height: 36px;
  width: auto;
  max-width: 170px;
  display: block;
  object-fit: contain;
}

.portal-bar .spacer { flex: 1; min-width: 0.5rem; }

.portal-bar .btn-out {
  height: 36px;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-bar .btn-out:hover {
  border-color: rgba(225, 29, 72, 0.28);
  color: #be123c;
  background: rgba(225, 29, 72, 0.06);
}

.portal-home-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1.25rem 1.15rem 1.5rem;
}

.portal-dash {
  width: min(560px, 100%);
  display: grid;
  gap: 0.85rem;
  animation: authRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portal-greeting {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.55)),
    radial-gradient(420px 160px at 90% 20%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(360px 140px at 8% 90%, rgba(37, 99, 235, 0.12), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.portal-greeting__avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: Outfit, Cairo, Manrope, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 20px -12px rgba(37, 99, 235, 0.7);
}

.portal-greeting__name {
  font-family: Outfit, Cairo, Manrope, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.portal-greeting__sub {
  margin-top: 0.15rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}

.portal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portal-pill,
.portal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 16px -14px rgba(15, 28, 36, 0.4);
}

.portal-pill--online { color: #047857; }
.portal-pill--online i { color: #10b981; font-size: 0.45rem; }
.portal-pill--offline { color: #64748b; }
.portal-pill--auto { color: #1d4ed8; }
.portal-pill--auto i { font-size: 0.7rem; }
.portal-status-active { color: #047857; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.18); }
.portal-status-expired { color: #b45309; background: rgba(217, 119, 6, 0.12); }
.portal-status-suspended { color: #be123c; background: rgba(225, 29, 72, 0.1); }

.portal-card {
  position: relative;
  border-radius: 1.25rem;
  padding: 1rem 1.1rem 1.05rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portal-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.portal-card__title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-card__icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ok-soft);
  color: var(--ok-hover);
  font-size: 0.78rem;
}

.portal-card__icon--muted {
  background: rgba(15, 28, 36, 0.06);
  color: var(--muted);
}

.portal-percent-badge {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ok-hover);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--ok-soft);
}

.portal-percent-badge--warn {
  color: #b45309;
  background: rgba(217, 119, 6, 0.12);
}

.portal-usage-hero {
  font-family: Outfit, Cairo, Manrope, sans-serif;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.portal-usage-sub {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.portal-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 28, 36, 0.07);
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.portal-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #2563eb);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-progress__bar--warn {
  background: linear-gradient(90deg, #f59e0b, #2563eb);
}

.portal-progress__bar--danger {
  background: linear-gradient(90deg, #f43f5e, #ea580c);
}

.portal-usage-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}

.portal-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(15, 28, 36, 0.06);
}

.portal-info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-info-row:first-child { padding-top: 0; }

.portal-info-row__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.portal-info-row__value {
  font-size: 0.88rem;
  font-weight: 750;
  text-align: end;
  word-break: break-word;
}

.portal-card--collapse { padding: 0; }

.portal-collapse__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  user-select: none;
}

.portal-collapse__summary::-webkit-details-marker { display: none; }

.portal-collapse__title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.portal-collapse__count {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--ok-soft);
  color: var(--ok-hover);
}

.portal-collapse__chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.portal-collapse[open] .portal-collapse__chevron {
  transform: rotate(180deg);
}

.portal-collapse__body {
  padding: 0 1.1rem 1rem;
}

.portal-log-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.portal-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(15, 28, 36, 0.035);
}

.portal-log-item--today {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.portal-log-item__day {
  display: block;
  font-size: 0.84rem;
  font-weight: 750;
}

.portal-log-item__weekday {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.portal-log-item__bytes {
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.portal-home .auth-footer { color: var(--muted); }
.portal-home .auth-footer time { color: var(--ink-soft); }

@media (max-width: 520px) {
  .portal-bar {
    padding: 0.7rem 0.85rem;
    gap: 0.5rem;
  }

  .portal-bar .auth-langs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .portal-bar .btn-out {
    margin-inline-start: auto;
  }

  .portal-home-main { padding: 1rem 0.85rem 1.25rem; }
  .portal-greeting { padding: 0.9rem; }
  .portal-card { padding: 0.9rem; }
  .portal-collapse__summary { padding: 0.9rem; }
  .portal-collapse__body { padding: 0 0.9rem 0.9rem; }
}
