@import "./workspace.css";

:root {
  color-scheme: dark;
  --kyzz-bg: #111718;
  --kyzz-bg-elevated: #151d1e;
  --kyzz-surface: #1a2425;
  --kyzz-surface-raised: #223031;
  --kyzz-surface-hover: #29393a;
  --kyzz-border: #385052;
  --kyzz-border-strong: #557477;
  --kyzz-text: #f0f7f6;
  --kyzz-text-muted: #a8bbbb;
  --kyzz-accent: #9fdfd2;
  --kyzz-accent-strong: #c0f0e7;
  --kyzz-accent-ink: #0b2422;
  --kyzz-danger: #ffaca8;
  --kyzz-focus: #b8f6e9;
  --kyzz-radius-sm: 0.5rem;
  --kyzz-radius-md: 0.75rem;
  --kyzz-radius-lg: 1rem;
  --kyzz-shadow-sm: 0 0.3rem 0.9rem rgb(0 0 0 / 16%);
  --kyzz-shadow-md: 0 1rem 2.8rem rgb(0 0 0 / 28%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--kyzz-bg);
  color: var(--kyzz-text);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -20%, rgb(109 216 196 / 15%), transparent 38rem),
    linear-gradient(145deg, rgb(255 255 255 / 2%), transparent 27rem),
    var(--kyzz-bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--kyzz-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgb(184 246 233 / 16%);
}

.lock-card__heading[tabindex="-1"]:focus,
.workspace__heading[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

.lock-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1.25rem;
}

.lock-card {
  width: min(100%, 25rem);
  border: 1px solid rgb(159 223 210 / 16%);
  border-radius: var(--kyzz-radius-lg);
  background: linear-gradient(145deg, rgb(255 255 255 / 4%), transparent 18rem), var(--kyzz-bg-elevated);
  box-shadow: var(--kyzz-shadow-md);
  padding: clamp(1.25rem, 4vw, 2rem);
  animation: card-arrival 420ms ease-out both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  margin-bottom: 1.8rem;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 680;
  letter-spacing: -0.045em;
}

.brand__mark {
  position: relative;
  width: 1.35rem;
  height: 1.06rem;
  border: 1.5px solid #91d7c8;
  border-radius: 0.29rem;
  background: rgba(145, 215, 200, 0.08);
}

.brand__mark::before {
  position: absolute;
  bottom: calc(100% - 0.12rem);
  left: 50%;
  width: 0.67rem;
  height: 0.62rem;
  border: 1.5px solid #91d7c8;
  border-bottom: 0;
  border-radius: 0.42rem 0.42rem 0 0;
  content: "";
  transform: translateX(-50%);
}

.brand__mark::after {
  position: absolute;
  top: 0.33rem;
  left: 50%;
  width: 0.18rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #91d7c8;
  content: "";
  transform: translateX(-50%);
}

.lock-card__heading {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.lock-card__intro {
  margin: 0.65rem 0 2rem;
  color: #a8b1b2;
  font-size: 0.94rem;
  line-height: 1.55;
}

.lock-form {
  display: grid;
  gap: 1.15rem;
}

.field-label {
  display: grid;
  gap: 0.55rem;
  color: #d9dfe0;
  font-size: 0.86rem;
  font-weight: 530;
}

.recovery-ack,
.security-settings__recovery-ack {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.4;
}

.recovery-ack input,
.security-settings__recovery-ack input {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.password-control {
  display: flex;
  align-items: center;
  min-height: 3.1rem;
  overflow: hidden;
  border: 1px solid var(--kyzz-border);
  border-radius: var(--kyzz-radius-md);
  background: rgb(8 17 18 / 46%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.password-control:focus-within {
  border-color: var(--kyzz-accent);
  box-shadow: 0 0 0 3px rgb(159 223 210 / 16%);
}

.password-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.82rem 0 0.82rem 0.95rem;
  color: #f7fafa;
}

.password-control input::placeholder {
  color: #7c8788;
}

.visibility-button {
  flex: none;
  border: 0;
  background: transparent;
  min-width: 4.75rem;
  min-height: 2.7rem;
  padding: 0.58rem 0.82rem;
  color: #aeb8b8;
  font-size: 0.78rem;
}

.visibility-button:hover {
  color: #e5eeee;
}

.unlock-button {
  min-height: 3.1rem;
  border: 1px solid var(--kyzz-accent);
  border-radius: var(--kyzz-radius-md);
  background: var(--kyzz-accent);
  box-shadow: 0 0.35rem 1rem rgb(17 80 71 / 18%);
  color: var(--kyzz-accent-ink);
  font-weight: 650;
  transition: transform 150ms ease, background-color 150ms ease;
}

.unlock-button:hover {
  background: var(--kyzz-accent-strong);
  box-shadow: 0 0.5rem 1.3rem rgb(17 80 71 / 25%);
}

.unlock-button:active {
  transform: translateY(1px);
}

.recovery-button {
  justify-self: start;
  border: 0;
  background: transparent;
  min-height: 2.75rem;
  padding: 0.15rem 0;
  color: #a8b1b2;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.recovery-button:hover {
  color: #e5eeee;
}

.dev-notice {
  min-height: 1.3rem;
  margin: 0.15rem 0 0;
  color: var(--kyzz-accent);
  font-size: 0.78rem;
  line-height: 1.45;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
}

.app-shell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  border-bottom: 1px solid #2c3233;
  padding: 0 1.25rem;
}

.recovery-key {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--kyzz-border);
  border-radius: var(--kyzz-radius-md);
  background: rgb(8 17 18 / 48%);
  padding: 0.8rem;
  color: var(--kyzz-accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 420px) {
  .lock-screen {
    align-items: start;
    padding: 1rem;
  }

  .lock-card {
    width: 100%;
    margin-block: 0.5rem;
    padding: 1.15rem;
  }
}

.app-shell__actions {
  display: flex;
  gap: 0.5rem;
}

.app-shell__actions button {
  border: 1px solid #363d3e;
  border-radius: 0.45rem;
  background: transparent;
  padding: 0.45rem 0.65rem;
  color: #d9dfe0;
}

@keyframes card-arrival {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.lock-form button:disabled,
.lock-form input:disabled {
  cursor: wait;
  opacity: 0.68;
}

.password-strength {
  margin: -0.58rem 0 0;
  color: #a8b1b2;
  font-size: 0.78rem;
}

.recovery-explanation {
  margin: 0 0 0.7rem;
  color: #d9dfe0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.recovery-requirements {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.4rem;
  padding-left: 1.25rem;
  color: #a8b1b2;
  font-size: 0.9rem;
  line-height: 1.45;
}
