
@font-face {
  font-display: swap;
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/ibm-plex-sans-arabic-regular.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  src: url("./assets/fonts/ibm-plex-sans-arabic-medium.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  src: url("./assets/fonts/ibm-plex-sans-arabic-semibold.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  src: url("./assets/fonts/ibm-plex-sans-arabic-bold.ttf") format("truetype");
}

:root {
  --ink: #102219;
  --paper: #f4f3ee;
  --sudan-green: #0f5b3b;
  --sudan-red: #b4292f;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body,
button,
input {
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Arial, sans-serif;
}

button,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.demo-root {
  background: #e9ebe7;
  color: var(--ink);
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* The quiet workspace exists only to make the unlock interaction demonstrable. */
.workspace-demo {
  background: #f4f5f2;
  inset: 0;
  position: absolute;
}

.workspace-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #dfe4df;
  display: flex;
  height: 82px;
  justify-content: space-between;
  padding: 0 40px;
}

.workspace-brand {
  align-items: center;
  display: flex;
  gap: 13px;
}

.mini-mark {
  align-items: center;
  background: var(--sudan-green);
  border-radius: 13px;
  color: white;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 42px;
}

.mini-mark::after {
  background: var(--sudan-red);
  border-radius: 2px;
  content: "";
  height: 3px;
  inset: auto 7px 6px;
  position: absolute;
}

.workspace-brand div {
  display: flex;
  flex-direction: column;
}

.workspace-brand strong {
  font-size: 15px;
  font-weight: 700;
}

.workspace-brand span:last-child {
  color: #768178;
  font-size: 11px;
  margin-top: 1px;
}

.relock-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8ddd8;
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  padding: 10px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.relock-button:hover {
  border-color: #aeb9b0;
  box-shadow: 0 7px 20px rgba(31, 57, 40, 0.08);
  transform: translateY(-1px);
}

.relock-button svg,
.lock-screen svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.workspace-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  height: calc(100% - 82px);
}

.workspace-nav {
  background: #eef0ec;
  border-left: 1px solid #dfe4df;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 32px 22px;
}

.nav-title {
  color: #89948c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 12px 10px;
}

.nav-item {
  border-radius: 10px;
  color: #657069;
  font-size: 13px;
  padding: 11px 13px;
}

.nav-item.active {
  background: #dfe6df;
  color: #173a28;
  font-weight: 600;
}

.workspace-content {
  padding: 48px clamp(32px, 6vw, 88px);
}

.workspace-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.workspace-heading span {
  color: #78847b;
  font-size: 13px;
}

.workspace-heading h1 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.04em;
  margin: 6px 0 0;
}

.status-dot::before {
  background: #38a16a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(56, 161, 106, 0.12);
  content: "";
  display: inline-block;
  height: 7px;
  margin-left: 9px;
  width: 7px;
}

.workspace-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 220px 220px;
}

.workspace-card {
  background: white;
  border: 1px solid #e0e4e0;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(38, 64, 46, 0.035);
  min-height: 190px;
  padding: 24px;
}

.workspace-card .eyebrow {
  color: #7b877e;
  font-size: 11px;
}

.workspace-card h2 {
  font-size: 22px;
  margin: 11px 0 24px;
}

.workspace-card.stat {
  display: flex;
  flex-direction: column;
}

.workspace-card.stat strong {
  color: #17472e;
  font-size: 52px;
  line-height: 1;
  margin-top: 32px;
}

.workspace-card.stat > span:last-child {
  color: #78847b;
  font-size: 12px;
  margin-top: 8px;
}

.skeleton-line {
  background: #edf0ed;
  border-radius: 10px;
  height: 9px;
  margin-top: 11px;
}

.skeleton-line.long {
  width: 88%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.short {
  width: 46%;
}

.unlocked-toast {
  animation: toastIn 2.3s ease both;
  background: rgba(15, 45, 28, 0.92);
  border-radius: 999px;
  bottom: 28px;
  box-shadow: 0 10px 35px rgba(22, 49, 30, 0.2);
  color: white;
  font-size: 13px;
  left: 50%;
  padding: 11px 18px;
  position: fixed;
  transform: translateX(-50%);
}

/* Full-screen lock experience */
.lock-screen {
  color: #fff;
  direction: rtl;
  inset: 0;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.24);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1), visibility 500ms;
  visibility: visible;
  z-index: 20;
}

.lock-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.background-stack,
.background-image,
.background-vignette,
.background-grain {
  inset: 0;
  position: absolute;
}

.background-stack {
  background: #141917;
  overflow: hidden;
}

.background-image {
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  transition: filter 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
}

.background-image.current {
  animation: imageReveal 1100ms ease both;
}

.background-image.previous {
  z-index: 0;
}

.background-image.current {
  z-index: 1;
}

.background-vignette {
  background:
    linear-gradient(180deg, rgba(6, 14, 10, 0.35) 0%, rgba(6, 14, 10, 0.02) 30%, rgba(4, 10, 7, 0.04) 55%, rgba(3, 8, 6, 0.54) 100%),
    linear-gradient(90deg, rgba(4, 11, 7, 0.14), transparent 35%, transparent 65%, rgba(4, 11, 7, 0.14));
  z-index: 2;
}

.background-grain {
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 0.45px, transparent 0.5px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  opacity: 0.2;
  pointer-events: none;
  z-index: 3;
}

.lock-screen.is-awake .background-image {
  filter: blur(17px) brightness(0.62) saturate(0.84);
  transform: scale(1.065);
}

.lock-screen.is-awake .background-vignette {
  background: rgba(3, 10, 6, 0.28);
  transition: background 600ms ease;
}

.lock-header {
  align-items: center;
  display: flex;
  inset: 30px 36px auto;
  justify-content: space-between;
  position: absolute;
  z-index: 6;
}

.agency-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
}

.suna-mark {
  align-items: center;
  backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 9px 25px rgba(0, 0, 0, 0.12);
  display: flex;
  height: 52px;
  justify-content: center;
  overflow: hidden;
  padding: 6px 8px;
  position: relative;
  width: 62px;
}

.suna-mark::before {
  display: none;
}

.suna-mark span {
  display: none;
}

.suna-logo {
  display: block;
  height: 40px;
  object-fit: contain;
  width: auto;
}

.agency-name {
  display: flex;
  flex-direction: column;
}

.agency-name strong {
  font-size: 14px;
  font-weight: 700;
}

.agency-name span {
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-top: 3px;
  opacity: 0.72;
}

.security-state {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(10, 20, 14, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  display: flex;
  font-size: 11px;
  gap: 7px;
  padding: 8px 11px;
}

.resting-clock {
  left: 50%;
  position: absolute;
  text-align: center;
  top: clamp(105px, 14vh, 150px);
  transform: translateX(-50%);
  transition: opacity 330ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  z-index: 5;
}

.resting-clock time {
  direction: ltr;
  display: block;
  font-family: "IBM Plex Sans Arabic", Arial, sans-serif;
  font-size: clamp(82px, 10vw, 146px);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.25);
}

.resting-clock p {
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 500;
  margin: 19px 0 0;
}

.lock-screen.is-awake .resting-clock {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -28px) scale(0.97);
}

.unlock-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 51%;
  transform: translate(-50%, -42%) scale(0.965);
  transition: opacity 320ms ease 40ms, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  width: min(90vw, 380px);
  z-index: 7;
}

.lock-screen.is-awake .unlock-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.profile-mark {
  align-items: center;
  backdrop-filter: blur(26px) saturate(1.25);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.27), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.37);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 18px 50px rgba(0, 0, 0, 0.16);
  display: flex;
  height: 88px;
  justify-content: center;
  position: relative;
  width: 88px;
}

.profile-mark span {
  font-size: 34px;
  font-weight: 600;
  transform: translateY(-1px);
}

.profile-mark i {
  background: #42c47b;
  border: 3px solid rgba(24, 43, 32, 0.8);
  border-radius: 50%;
  bottom: 2px;
  height: 14px;
  position: absolute;
  right: 6px;
  width: 14px;
}

.unlock-panel h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 17px 0 2px;
}

.profile-role {
  font-size: 12px;
  margin: 0;
  opacity: 0.72;
}

.passcode-form {
  margin-top: 22px;
  text-align: center;
  width: 286px;
}

.passcode-control {
  align-items: center;
  backdrop-filter: blur(30px) saturate(1.25);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 34px rgba(0, 0, 0, 0.13);
  display: flex;
  height: 47px;
  padding: 0 6px 0 7px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.passcode-control:focus-within {
  background: rgba(255, 255, 255, 0.21);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.11), 0 14px 34px rgba(0, 0, 0, 0.13);
}

.passcode-control > svg {
  flex: 0 0 auto;
  margin-right: 6px;
  opacity: 0.62;
}

.passcode-control input {
  background: transparent;
  border: 0;
  color: #fff;
  direction: ltr;
  flex: 1;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 0;
  outline: none;
  padding: 0 10px;
  text-align: right;
}

.passcode-control input::placeholder {
  color: rgba(255, 255, 255, 0.66);
  direction: rtl;
  font-size: 12px;
  font-weight: 400;
}

.passcode-control button {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 9px;
  color: #173426;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  transition: background 150ms ease, opacity 150ms ease, transform 150ms ease;
  width: 34px;
}

.passcode-control button:hover:not(:disabled) {
  background: #fff;
  transform: scale(1.04);
}

.passcode-control button:disabled {
  cursor: default;
  opacity: 0.28;
}

.form-message {
  font-size: 10px;
  height: 18px;
  margin-top: 10px;
  opacity: 0.62;
}

.passcode-form.has-error {
  animation: shake 380ms ease;
}

.passcode-form.has-error .passcode-control {
  background: rgba(122, 26, 26, 0.28);
  border-color: rgba(255, 166, 166, 0.68);
}

.passcode-form.has-error .form-message {
  color: #ffd6d4;
  opacity: 1;
}

.unlock-success {
  align-items: center;
  display: flex;
  flex-direction: column;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -42%) scale(0.94);
  transition: opacity 240ms ease, transform 440ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 8;
}

.success-ring {
  align-items: center;
  backdrop-filter: blur(22px);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  display: flex;
  font-size: 25px;
  height: 70px;
  justify-content: center;
  width: 70px;
}

.unlock-success strong {
  font-size: 18px;
  margin-top: 14px;
}

.lock-screen.is-unlocking .unlock-panel {
  opacity: 0;
  transform: translate(-50%, -56%) scale(0.96);
}

.lock-screen.is-unlocking .unlock-success {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lock-footer {
  align-items: flex-end;
  bottom: 27px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  inset-inline: 36px;
  position: absolute;
  z-index: 7;
}

.photo-caption {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-self: start;
  max-width: 310px;
  transition: opacity 300ms ease;
}

.location-pin {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.83);
  border: 3px solid rgba(21, 45, 31, 0.38);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  height: 11px;
  width: 11px;
}

.photo-caption div {
  display: flex;
  flex-direction: column;
}

.photo-caption strong {
  font-size: 12px;
  font-weight: 600;
}

.photo-caption span:last-child {
  font-size: 9px;
  margin-top: 2px;
  opacity: 0.68;
}

.wake-hint {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 8px;
  grid-column: 2;
  justify-self: center;
  opacity: 0.8;
  padding: 8px;
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wake-hint:hover {
  opacity: 1;
}

.keycap {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 12px;
  height: 23px;
  justify-content: center;
  width: 27px;
}

.lock-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-self: end;
}

.lock-actions button,
.idle-note {
  align-items: center;
  display: flex;
  gap: 7px;
}

.lock-actions button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  opacity: 0.78;
  padding: 5px 0;
  transition: opacity 160ms ease;
}

.lock-actions button:hover {
  opacity: 1;
}

.idle-note {
  font-size: 9px;
  opacity: 0.58;
}

.idle-note svg {
  height: 13px;
  width: 13px;
}

.lock-screen.is-awake .wake-hint {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.lock-screen.is-awake .photo-caption {
  opacity: 0.5;
}

@keyframes imageReveal {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1.005);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes toastIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@media (max-width: 880px) {
  .workspace-body {
    grid-template-columns: 1fr;
  }

  .workspace-nav {
    display: none;
  }

  .workspace-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace-card.wide {
    grid-column: 1 / -1;
  }

  .lock-header {
    inset: 22px 22px auto;
  }

  .lock-footer {
    bottom: 22px;
    inset-inline: 22px;
  }

  .lock-actions span,
  .photo-caption span:last-child {
    display: none;
  }
}

@media (max-width: 620px) {
  .demo-root {
    min-height: 560px;
  }

  .workspace-header {
    height: 70px;
    padding: 0 18px;
  }

  .workspace-brand div,
  .relock-button span {
    display: none;
  }

  .relock-button {
    padding: 10px;
  }

  .workspace-content {
    padding: 32px 20px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .workspace-card.wide {
    grid-column: auto;
  }

  .workspace-heading .status-dot {
    display: none;
  }

  .agency-name span,
  .security-state span {
    display: none;
  }

  .security-state {
    padding: 9px;
  }

  .resting-clock {
    top: 16vh;
  }

  .resting-clock time {
    font-size: clamp(72px, 24vw, 110px);
  }

  .resting-clock p {
    font-size: 15px;
  }

  .unlock-panel {
    top: 48%;
  }

  .lock-footer {
    align-items: end;
    grid-template-columns: 1fr auto;
  }

  .wake-hint {
    bottom: 62px;
    grid-column: 1 / -1;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .lock-screen.is-awake .wake-hint {
    transform: translate(-50%, 12px);
  }

  .photo-caption {
    max-width: 180px;
  }

  .photo-caption strong {
    font-size: 10px;
  }

  .lock-actions {
    grid-column: 2;
  }

  .idle-note {
    display: none;
  }
}

@media (max-height: 680px) and (min-width: 621px) {
  .resting-clock {
    top: 92px;
  }

  .resting-clock time {
    font-size: 82px;
  }

  .resting-clock p {
    margin-top: 12px;
  }

  .unlock-panel {
    top: 49%;
    transform: translate(-50%, -47%) scale(0.96);
  }

  .lock-screen.is-awake .unlock-panel {
    transform: translate(-50%, -50%) scale(0.94);
  }

  .lock-footer {
    bottom: 18px;
  }
}

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