.mk-auth-open {
  overflow: hidden !important;
}

.mk-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  padding: 20px;
  place-items: center;
  overflow-y: auto;
  background: rgba(4, 4, 3, 0.78);
  backdrop-filter: blur(8px);
}

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

.mk-auth-panel {
  position: relative;
  width: min(100%, 500px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(213, 173, 89, 0.3);
  border-radius: 24px;
  background: #12110d;
  color: #f7f3e9;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
}

.mk-auth-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

.mk-auth-eyebrow {
  margin: 0 0 9px;
  color: #e2bf70;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mk-auth-panel h2 {
  margin: 0 42px 12px 0;
  color: #f7f3e9;
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  line-height: 1.08;
}

.mk-auth-intro,
.mk-auth-setup p {
  margin: 0 0 22px;
  color: #c9c1b3;
  font-size: 0.91rem;
  line-height: 1.6;
}

.mk-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(213, 173, 89, 0.22);
  border-radius: 50%;
  background: transparent;
  color: #c9c1b3;
  font-size: 1.35rem;
  cursor: pointer;
}

.mk-auth-tabs {
  display: grid;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid rgba(213, 173, 89, 0.18);
  border-radius: 14px;
  background: #0b0b08;
  grid-template-columns: 1fr 1fr;
}

.mk-auth-tabs button {
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aaa499;
  font-size: 0.79rem;
  font-weight: 800;
  cursor: pointer;
}

.mk-auth-tabs button[aria-selected="true"] {
  background: #222017;
  color: #f1d58e;
}

.mk-auth-form {
  display: grid;
}

.mk-auth-form label {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.mk-auth-form label span {
  color: #c9c1b3;
  font-size: 0.76rem;
  font-weight: 750;
}

.mk-auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid rgba(213, 173, 89, 0.22);
  border-radius: 12px;
  outline: 0;
  background: #0a0a08;
  color: #fffaf0;
  font: inherit;
}

.mk-auth-form input:focus {
  border-color: #d5ad59;
  box-shadow: 0 0 0 3px rgba(213, 173, 89, 0.18);
}

.mk-auth-form .mk-auth-agreement {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 2px 0 15px;
  color: #c9c1b3;
  font-size: 0.76rem;
  line-height: 1.55;
}

.mk-auth-form .mk-auth-agreement[hidden] {
  display: none;
}

.mk-auth-form .mk-auth-agreement input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #d5ad59;
}

.mk-auth-agreement a {
  color: #f1d58e;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mk-auth-note,
.mk-auth-message {
  margin: 0 0 13px;
  color: #aaa499;
  font-size: 0.74rem;
  line-height: 1.45;
}

.mk-auth-message {
  min-height: 1.1rem;
  color: #e4aaa4;
  font-weight: 700;
}

.mk-auth-message[data-state="success"] {
  color: #b7d3b4;
}

.mk-auth-submit {
  min-height: 50px;
  padding: 11px 18px;
  border: 1px solid #e2bf70;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0d28a, #c5963f);
  color: #16130c;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.mk-auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.mk-auth-setup {
  padding: 18px;
  border: 1px solid rgba(213, 173, 89, 0.23);
  border-radius: 14px;
  background: rgba(213, 173, 89, 0.07);
}

.mk-auth-setup strong {
  display: block;
  margin-bottom: 8px;
  color: #f1d58e;
  font-size: 0.88rem;
}

.mk-auth-setup p {
  margin: 0;
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .mk-auth-modal {
    padding: 10px;
    place-items: end center;
  }

  .mk-auth-panel {
    max-height: calc(100svh - 20px);
    overflow-y: auto;
    border-radius: 22px 22px 14px 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mk-auth-panel {
    animation: mk-auth-in 180ms ease both;
  }

  @keyframes mk-auth-in {
    from {
      transform: translateY(10px);
      opacity: 0;
    }
  }
}

.mk-access-pending body > :not(.mk-auth-modal) {
  visibility: hidden;
}

.mk-access-gate {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
  visibility: visible !important;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(198, 157, 70, 0.14), transparent 34rem),
    #0a0a0d;
  color: #f7f3e9;
}

.mk-access-card {
  width: min(100%, 620px);
  padding: clamp(30px, 6vw, 58px);
  border: 1px solid rgba(213, 173, 89, 0.28);
  border-radius: 28px;
  background: rgba(18, 17, 13, 0.94);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.48);
}

.mk-access-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 42px;
  color: #f7f3e9;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.mk-access-brand > img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(213, 173, 89, 0.34);
  border-radius: 11px;
  object-fit: cover;
}

.mk-access-wordmark > span,
.mk-access-eyebrow {
  color: #d5ad59;
}

.mk-access-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.mk-access-card h1 {
  margin: 0 0 14px;
  color: #f7f3e9;
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 1.02;
}

.mk-access-card > p:not(.mk-access-eyebrow) {
  margin: 0;
  color: #c9c1b3;
  line-height: 1.65;
}

.mk-access-card .mk-access-error {
  color: #e4aaa4;
}

.mk-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* --- Obnova hesla, pravidlá a odhalenie hesla --------------------------- */

/* Pole s tlačidlom na odhalenie. Bez neho ľudia pri 12-znakovom hesle so
   symbolom nemajú ako skontrolovať, čo napísali. */
.mk-auth-password {
  position: relative;
  display: block;
}

.mk-auth-password input {
  padding-right: 92px;
}

.mk-auth-reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c9a24c;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.mk-auth-reveal:hover { color: #f0d28a; }

/* Požiadavky na heslo. Ukazujú sa tam, kde sa heslo vytvára, a rozsvietia sa
   pri chybe — server odmieta heslo, ktoré tieto pravidlá nespĺňa. */
.mk-auth-rules {
  margin: -6px 0 13px;
  padding: 9px 12px;
  border: 1px solid rgba(213, 173, 89, 0.22);
  border-radius: 10px;
  color: #c9c1b3;
  font-size: 0.74rem;
  line-height: 1.5;
}

.mk-auth-rules[hidden],
.mk-auth-link[hidden],
.mk-auth-secondary[hidden] { display: none; }

.mk-auth-link {
  margin-top: 12px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #c9a24c;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.mk-auth-link:hover { color: #f0d28a; }

.mk-auth-secondary {
  min-height: 44px;
  margin-bottom: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(213, 173, 89, 0.4);
  border-radius: 999px;
  background: transparent;
  color: #f0d28a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}
