*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: #1c2430;
  background-color: #f4f8fb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}
.vk-toggle {
  position: fixed;
  z-index: 40;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.75rem;
  padding: 0 1rem 0 0.8rem;
  border: none;
  border-radius: 999px;
  background: #1c2430;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(28, 36, 48, 0.28);
  cursor: pointer;
}

.vk-toggle.is-open {
  bottom: auto;
  visibility: hidden;
  pointer-events: none;
}

.vk-panel {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.55rem 0.7rem;
  background: rgba(22, 28, 38, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 32px rgba(12, 18, 28, 0.28);
  backdrop-filter: blur(10px);
}

.vk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0.2rem 0.45rem;
}

.vk-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 600;
}

.vk-hide {
  height: 1.85rem;
  padding: 0 0.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.vk-row {
  display: flex;
  justify-content: center;
  gap: 0.32rem;
  margin-bottom: 0.32rem;
}

.vk-row.is-offset {
  padding: 0 1.1rem;
}

.vk-key {
  flex: 1 1 0;
  min-width: 0;
  max-width: 3.4rem;
  height: 2.65rem;
  border: none;
  border-radius: 0.55rem;
  background: #2b3444;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.vk-key:active {
  background: #3ecf9a;
  color: #123326;
}

.vk-key.is-active {
  background: #3ecf9a;
  color: #123326;
}

.vk-wide {
  max-width: 5.4rem;
  font-size: 0.82rem;
}

.vk-space {
  flex: 4 1 0;
  max-width: none;
  font-size: 0.9rem;
}

body.vk-open .page,
body.vk-open .manual-shell {
  padding-bottom: 15.5rem;
}

@media (max-width: 520px) {
  .vk-toggle span {
    display: none;
  }

  .vk-toggle {
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    justify-content: center;
  }

  .vk-key {
    height: 2.4rem;
    font-size: 0.95rem;
  }
}
:root {
  --text-on-dark: #ffffff;
  --field-bg: #eef2f8;
  --field-text: #1a1d23;
  --field-placeholder: #8a93a3;
  --btn-bg: #0d6efd;
  --btn-bg-hover: #0b5ed7;
  --btn-bg-active: #0a58ca;
  --icon: #5c6575;
  --gap: 1.1rem;
  --radius: 8px;
  --form-width: min(22rem, 88vw);
}

.page {
  min-height: 100%;
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background-image:
    linear-gradient(rgba(6, 12, 22, 0.55), rgba(6, 12, 22, 0.62)),
    url("https://images.unsplash.com/photo-1519501025264-65ba15a82390?auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-form {
  width: var(--form-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--gap);
}

.login-title {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-on-dark);
}

.field {
  width: 100%;
  height: 3rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: var(--radius);
  background: var(--field-bg);
  color: var(--field-text);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: box-shadow 160ms ease;
}

.field::placeholder {
  color: var(--field-placeholder);
}

.field:focus {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.45);
}

.password-wrap {
  position: relative;
}

.password-wrap .field {
  padding-right: 2.75rem;
}

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
}

.toggle-visibility:hover {
  color: var(--field-text);
}

.toggle-visibility:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.55);
  outline-offset: 1px;
}

.login-error {
  margin: -0.2rem 0 0;
  color: #ffd2d6;
  font-size: 0.88rem;
  text-align: center;
}

.login-btn {
  width: 100%;
  height: 3rem;
  border: none;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--text-on-dark);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, transform 120ms ease;
}

.login-btn:hover:not(:disabled) {
  background: var(--btn-bg-hover);
}

.login-btn:active:not(:disabled) {
  background: var(--btn-bg-active);
  transform: translateY(1px);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  --ad-bg: #f4f8fb;
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint: #3ecf9a;
  --ad-mint-deep: #2bb883;
  --ad-sky: #9fd8f0;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);
  --ad-shadow-soft: 0 8px 18px rgba(120, 150, 180, 0.12);
  --ad-pad-x: clamp(0.75rem, 2vw, 1.35rem);

  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d9f5ff 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, #d8f8ea 0%, transparent 50%),
    linear-gradient(180deg, #f7fbff 0%, var(--ad-bg) 45%, #eef6f8 100%);
  color: var(--ad-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.app-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.app-blob-a {
  top: -5rem;
  right: -3rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(159, 216, 240, 0.5), transparent 70%);
}

.app-blob-b {
  top: 40%;
  left: -6rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(62, 207, 154, 0.2), transparent 70%);
}

.app-blob-c {
  bottom: -6rem;
  right: 8%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(186, 230, 253, 0.4), transparent 70%);
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: auto;
  padding: 1.15rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
}

.sidebar-brand {
  padding: 0.45rem 0.85rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ad-ink);
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 0.95rem;
  border-radius: 999px;
  color: var(--ad-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.sidebar-link:hover {
  color: var(--ad-ink);
  background: rgba(255, 255, 255, 0.95);
}

.sidebar-link.is-active {
  color: #ffffff;
  background: linear-gradient(145deg, var(--ad-mint), var(--ad-mint-deep));
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.28);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.65rem;
  padding: 0.65rem var(--ad-pad-x);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.navbar-left {
  min-width: 0;
}

.navbar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-ink);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.navbar-user {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ad-muted);
}

.navbar-logout {
  height: 2.2rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ad-ink);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--ad-shadow-soft);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.navbar-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(120, 150, 180, 0.18);
}

.content {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem var(--ad-pad-x) 1.35rem;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.85);
    padding: 0.85rem 0.9rem;
  }

  .sidebar-brand {
    padding: 0.15rem 0.35rem 0.55rem;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .sidebar-link {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.86rem;
  }

  .navbar {
    min-height: 3.35rem;
  }

  .navbar-user {
    display: none;
  }
}

@media (min-width: 768px) {
  .navbar {
    min-height: 3.85rem;
  }

  .sidebar-brand {
    font-size: 1.12rem;
  }

  .content {
    padding: 1rem var(--ad-pad-x) 1.5rem;
  }
}
.user-shell {
  --ud-bg: #f4f8fb;
  --ud-ink: #1c2430;
  --ud-muted: #8b97a8;
  --ud-mint: #3ecf9a;
  --ud-mint-deep: #2bb883;
  --ud-sky: #9fd8f0;
  --ud-card: rgba(255, 255, 255, 0.88);
  --ud-shadow: 0 14px 28px rgba(120, 150, 180, 0.14);
  --ud-shadow-soft: 0 8px 18px rgba(120, 150, 180, 0.12);
  --ud-pad-x: clamp(0.5rem, 1.2vw, 0.85rem);

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d9f5ff 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, #d8f8ea 0%, transparent 50%),
    linear-gradient(180deg, #f7fbff 0%, var(--ud-bg) 45%, #eef6f8 100%);
  color: var(--ud-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.user-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.user-blob-a {
  top: -5rem;
  right: -3rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(159, 216, 240, 0.5), transparent 70%);
}

.user-blob-b {
  top: 40%;
  left: -6rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(62, 207, 154, 0.2), transparent 70%);
}

.user-blob-c {
  bottom: -6rem;
  right: 8%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(186, 230, 253, 0.4), transparent 70%);
}

.user-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  min-height: 3.5rem;
  padding: 0.65rem var(--ud-pad-x);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
}

.user-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ud-ink);
}

.user-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.user-navbar-email {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ud-muted);
}

.user-logout {
  height: 2.2rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ud-ink);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--ud-shadow-soft);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.user-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(120, 150, 180, 0.18);
}

.user-logout:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 6px rgba(120, 150, 180, 0.18);
}

.user-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.65rem var(--ud-pad-x) 1rem;
}

@media (max-width: 480px) {
  .user-navbar-email {
    display: none;
  }
}

@media (min-width: 768px) {
  .user-navbar {
    min-height: 3.75rem;
    padding: 0.75rem var(--ud-pad-x);
  }

  .user-brand {
    font-size: 1.12rem;
  }

  .user-content {
    padding: 0.75rem var(--ud-pad-x) 1.25rem;
  }
}
.logs-page {
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint: #3ecf9a;
  --ad-mint-deep: #2bb883;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  height: 100%;
  animation: logs-fade-up 420ms ease both;
}

@keyframes logs-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logs-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  flex-shrink: 0;
  padding: 1.25rem 1.35rem;
  background: var(--ad-card);
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
}

.logs-date-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
}

.logs-date-filter input[type="date"] {
  border: 1px solid #e3ebf2;
  border-radius: 999px;
  background: #f7fafc;
  padding: 0.55rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ad-ink);
}

.logs-date-filter input[type="date"]:focus {
  outline: none;
  border-color: var(--ad-mint);
  box-shadow: 0 0 0 3px rgba(62, 207, 154, 0.18);
}

.logs-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-ink);
}

.logs-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ad-muted);
  font-weight: 500;
}

.logs-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--ad-card);
  border: none;
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
  padding: 0.35rem;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.logs-table th,
.logs-table td {
  padding: 0.95rem 1.05rem;
  text-align: left;
  font-size: 0.92rem;
}

.logs-table thead {
  background: #f7fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.logs-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
  border-bottom: 1px solid #e8eef4;
}

.logs-table td {
  color: var(--ad-ink);
  border-bottom: 1px solid #eef3f7;
  font-weight: 500;
}

.logs-table tbody tr:last-child td {
  border-bottom: none;
}

.logs-table tbody tr:hover {
  background: #f7fafc;
}

.logs-empty {
  text-align: center;
  color: var(--ad-muted);
  padding: 1.5rem 1rem !important;
  font-weight: 500;
}

.action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.action-badge.is-open {
  background: rgba(62, 207, 154, 0.16);
  color: var(--ad-mint-deep);
}

.action-badge.is-close {
  background: #fdebec;
  color: #b02a37;
}

@media (min-width: 768px) {
  .logs-header,
  .logs-table-wrap {
    border-radius: 1.85rem;
  }

  .logs-header {
    padding: 1.45rem 1.55rem;
  }
}
.camera-feed {
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint-deep: #2bb883;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--ad-card);
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
}

.camera-feed.is-compact {
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 1.35rem;
}

.camera-feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.camera-feed-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
}

.camera-feed-site {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ad-muted);
}

.camera-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.camera-feed-grid.is-multi {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.camera-feed.is-grid-page .camera-feed-grid,
.camera-feed.is-grid-page .camera-feed-grid.is-multi {
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  justify-content: start;
}

.camera-feed.is-grid-page .camera-feed-frame,
.camera-feed.is-compact .camera-feed-frame {
  width: 160px;
  max-width: 42vw;
  aspect-ratio: 3 / 4;
}

.camera-feed-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.camera-feed-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ad-ink);
}

.camera-feed-frame {
  position: relative;
  width: 160px;
  max-width: 42vw;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #0f1720;
  aspect-ratio: 3 / 4;
}

.camera-feed-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f1720;
}

.camera-feed-offline {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 0.75rem 1rem;
  color: #9aa6b5;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.camera-feed-empty {
  margin: 0;
  padding: 1.35rem 1rem;
  border-radius: 1.15rem;
  background: #f7fafc;
  color: var(--ad-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.45;
}
.cameras-page {
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint-deep: #2bb883;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: cameras-fade-up 420ms ease both;
}

@keyframes cameras-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cameras-header {
  padding: 1.25rem 1.35rem;
  background: var(--ad-card);
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
}

.cameras-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-ink);
}

.cameras-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--ad-muted);
  font-weight: 500;
}

.cameras-page .camera-feed {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.cameras-page .camera-feed-head {
  display: none;
}

.cameras-page .camera-feed-grid,
.cameras-page .camera-feed-grid.is-multi {
  grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
  gap: 0.85rem;
  justify-content: start;
}

.cameras-page .camera-feed-card {
  padding: 0.75rem;
  background: var(--ad-card);
  border-radius: 1.25rem;
  box-shadow: var(--ad-shadow);
}

.cameras-page .camera-feed-frame {
  width: 100%;
  max-width: none;
  aspect-ratio: 3 / 4;
  border-radius: 0.9rem;
}

.cameras-page .camera-feed-empty {
  background: var(--ad-card);
  box-shadow: var(--ad-shadow);
}
.page-panel {
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint: #3ecf9a;
  --ad-mint-deep: #2bb883;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: calc(100vh - 4.5rem - 2rem);
  width: 100%;
  padding: 1.25rem 1.35rem 1.45rem;
  background: var(--ad-card);
  border: none;
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
  animation: access-fade-up 420ms ease both;
}

@keyframes access-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-ink);
}

.assign-btn,
.save-btn {
  height: 2.35rem;
  padding: 0 1.05rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--ad-mint), var(--ad-mint-deep));
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.28);
  transition: transform 140ms ease;
}

.assign-btn:hover,
.save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.close-btn {
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--ad-ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.close-btn:hover {
  background: #e8edf3;
}

.access-error {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  color: #b02a37;
  background: rgba(176, 42, 55, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
}

.access-table-wrap {
  flex: 1;
  overflow: auto;
  border: none;
  border-radius: 1.15rem;
  background: #f7fafc;
}

.access-table {
  width: 100%;
  border-collapse: collapse;
}

.access-table th,
.access-table td {
  padding: 0.95rem 1.05rem;
  text-align: left;
  font-size: 0.92rem;
}

.access-table thead {
  background: rgba(255, 255, 255, 0.85);
  position: sticky;
  top: 0;
}

.access-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
  border-bottom: 1px solid #e8eef4;
}

.access-table td {
  color: var(--ad-ink);
  border-bottom: 1px solid #eef3f7;
  font-weight: 500;
}

.access-table tbody tr:last-child td {
  border-bottom: none;
}

.access-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.8);
}

.access-empty {
  text-align: center;
  color: var(--ad-muted);
  padding: 2rem 1rem !important;
  font-weight: 500;
}

.reassign-btn {
  height: 2rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ad-mint-deep);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(120, 150, 180, 0.12);
}

.reassign-btn:hover {
  background: #eefcf6;
}

.reassign-member {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reassign-member .assign-label {
  margin-top: 0;
}

.reassign-member-name {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: #f4f8fb;
  color: var(--ad-ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.reassign-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 36, 48, 0.35);
  backdrop-filter: blur(4px);
}

.reassign-modal {
  width: min(100%, 26rem);
  max-height: min(90vh, 36rem);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.3rem;
  background: #ffffff;
  border: none;
  border-radius: 1.65rem;
  box-shadow: 0 18px 48px rgba(120, 130, 160, 0.28);
}

.reassign-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.reassign-modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ad-ink);
}

.reassign-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.reassign-form .time-fieldset {
  margin-top: 0.35rem;
}

.interval-checklist {
  max-height: 11rem;
}

.reassign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.reassign-cancel-btn {
  height: 2.5rem;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--ad-ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.reassign-cancel-btn:hover {
  background: #e8edf3;
}

.reassign-save-btn {
  margin-top: 0;
  width: auto;
  max-width: none;
  height: 2.5rem;
}

.assign-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  max-width: 36rem;
}

.assign-label {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
}

.assign-select {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid #e3ebf2;
  border-radius: 999px;
  background: #f7fafc;
  color: var(--ad-ink);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.assign-select:focus {
  border-color: var(--ad-mint);
  box-shadow: 0 0 0 3px rgba(62, 207, 154, 0.18);
}

.members-fieldset {
  margin: 0.5rem 0 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.members-fieldset .assign-label {
  margin-bottom: 0.45rem;
  padding: 0;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(22rem, 45vh);
  overflow: auto;
  padding: 0.75rem;
  border: none;
  border-radius: 1.15rem;
  background: #f7fafc;
}

.member-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(120, 150, 180, 0.08);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ad-ink);
}

.member-option:hover {
  background: #eefcf6;
}

.member-option input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ad-mint-deep);
  cursor: pointer;
}

.members-empty {
  margin: 0;
  padding: 0.85rem 0.65rem;
  color: var(--ad-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
}

.time-fieldset {
  margin: 0.75rem 0 0;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 1.15rem;
  background: #f7fafc;
}

.time-fieldset .assign-label {
  margin-top: 0;
  margin-bottom: 0.25rem;
  padding: 0;
}

.assign-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ad-muted);
  line-height: 1.4;
  font-weight: 500;
}

.assign-interval-preview {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ad-ink);
}

.save-btn {
  margin-top: auto;
  width: 100%;
  max-width: 16rem;
  height: 2.75rem;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .page-panel {
    padding: 1.5rem 1.6rem 1.7rem;
    border-radius: 1.85rem;
  }
}
.admin-page {
  --ad-ink: #1c2430;
  --ad-muted: #8b97a8;
  --ad-mint: #3ecf9a;
  --ad-mint-deep: #2bb883;
  --ad-sky: #7ec8e8;
  --ad-card: #ffffff;
  --ad-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  animation: ad-fade-up 420ms ease both;
}

@keyframes ad-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ad-ink);
}

.admin-error {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  color: #b02a37;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(176, 42, 55, 0.12);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--ad-shadow);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem 1.4rem;
  background: var(--ad-card);
  border: none;
  border-radius: 1.65rem;
  box-shadow: var(--ad-shadow);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-panel-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ad-mint-deep);
}

.admin-panel-hint {
  margin: -0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--ad-muted);
  line-height: 1.45;
  font-weight: 500;
}

.admin-add-btn {
  height: 2.25rem;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--ad-mint), var(--ad-mint-deep));
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.28);
  transition: transform 140ms ease;
}

.admin-add-btn:hover {
  transform: translateY(-1px);
}

.admin-inline-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.85rem;
  background: #f4f8fb;
  border: none;
  border-radius: 1.15rem;
}

.admin-user-form .admin-input {
  min-width: 12rem;
}

.admin-role-select {
  flex: 0 1 16rem;
  min-width: 14rem;
  cursor: pointer;
}

.admin-input {
  flex: 1;
  min-width: 10rem;
  height: 2.5rem;
  padding: 0 0.95rem;
  border: 1px solid #e3ebf2;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ad-ink);
  font-size: 0.92rem;
  outline: none;
}

.admin-input:focus {
  border-color: var(--ad-mint);
  box-shadow: 0 0 0 3px rgba(62, 207, 154, 0.18);
}

.admin-input-inline {
  flex: 1;
  height: 2.25rem;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f7fafc;
  border: none;
  border-radius: 1.15rem;
}

.admin-row-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ad-ink);
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-row-sub {
  font-size: 0.8rem;
  color: var(--ad-muted);
  font-weight: 500;
}

.admin-row-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-edit-btn {
  height: 2rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ad-mint-deep);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(120, 150, 180, 0.12);
}

.admin-edit-btn:hover {
  background: #eefcf6;
}

.admin-delete-btn {
  height: 2rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #b02a37;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(120, 150, 180, 0.12);
}

.admin-delete-btn:hover {
  background: #fdf2f3;
}

.admin-user-row {
  flex-wrap: wrap;
}

.admin-password-edit {
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.admin-password-edit .admin-input-inline {
  min-width: 10rem;
  max-width: 14rem;
}

.admin-save-btn {
  height: 2.25rem;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--ad-mint), var(--ad-mint-deep));
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.28);
}

.admin-save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.admin-save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-ghost-btn {
  height: 2.25rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--ad-ink);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-ghost-btn:hover {
  background: #e8edf3;
}

.admin-more-btn {
  align-self: flex-start;
  padding: 0.2rem 0;
  border: none;
  background: none;
  color: var(--ad-mint-deep);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-more-btn:hover {
  text-decoration: underline;
}

.admin-empty {
  padding: 0.95rem 1rem;
  color: var(--ad-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.05rem;
  background: rgba(62, 207, 154, 0.12);
  border: 1px solid rgba(62, 207, 154, 0.28);
  border-radius: 1.15rem;
  font-size: 0.9rem;
  color: #146c43;
}

.admin-interval-form {
  flex-direction: column;
  align-items: stretch;
}

.admin-interval-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.admin-time-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ad-muted);
}

.admin-time-inputs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.admin-time-part {
  flex: 0 0 auto;
  width: 3.1rem;
  min-width: 3.1rem;
  height: 2.5rem;
  padding: 0 0.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-time-period {
  flex: 0 0 auto;
  width: 4.4rem;
  min-width: 4.4rem;
  height: 2.5rem;
  padding: 0 0.4rem;
  margin-left: 0.2rem;
  cursor: pointer;
}

.admin-time-colon {
  font-weight: 700;
  color: var(--ad-ink);
}

.admin-interval-row {
  flex-wrap: wrap;
}

.admin-interval-edit {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-width: 12rem;
}

@media (min-width: 768px) {
  .admin-panel {
    padding: 1.45rem 1.55rem 1.55rem;
    border-radius: 1.85rem;
  }
}
.user-dashboard {
  --ud-ink: #1c2430;
  --ud-muted: #8b97a8;
  --ud-mint: #3ecf9a;
  --ud-mint-deep: #2bb883;
  --ud-sky: #7ec8e8;
  --ud-card: #ffffff;
  --ud-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);

  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  animation: ud-fade-up 420ms ease both;
}

@keyframes ud-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ud-hero {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
  width: 100%;
  padding: 1.35rem 1.25rem 1.5rem;
  text-align: left;
  background: var(--ud-card);
  border-radius: 1.65rem;
  box-shadow: var(--ud-shadow);
}

.ud-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ud-mint-deep);
}

.user-welcome {
  margin: 0;
  font-size: clamp(1.65rem, 4.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ud-ink);
  word-break: break-word;
}

.user-welcome span {
  background: linear-gradient(120deg, var(--ud-mint-deep), var(--ud-sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.user-subtitle {
  margin: 0.15rem 0 0;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ud-muted);
}

.user-error,
.user-success {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--ud-shadow);
}

.user-error {
  color: #b02a37;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(176, 42, 55, 0.12);
}

.user-success {
  color: #146c43;
  background: rgba(62, 207, 154, 0.12);
  border: 1px solid rgba(62, 207, 154, 0.28);
}

.user-doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}

.user-door-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 4.85rem;
  padding: 0.75rem 1rem 0.85rem;
  background: var(--ud-card);
  border: none;
  border-radius: 1.65rem;
  box-shadow: var(--ud-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
  animation: ud-fade-up 480ms ease both;
}

.user-door-card:nth-child(2) {
  animation-delay: 40ms;
}

.user-door-card:nth-child(3) {
  animation-delay: 80ms;
}

.user-door-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(120, 130, 160, 0.2);
}

.ud-card-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.ud-door-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, var(--ud-mint), #6ad6ef);
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.3);
}

.ud-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.user-door-name {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ud-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ud-status-text {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ud-muted);
}

.user-door-card.is-open .ud-status-text {
  color: var(--ud-mint-deep);
}

.ud-access-hours {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5c6575;
}

.user-door-card.is-restricted {
  opacity: 0.82;
}

.user-door-card.is-restricted .ud-access-hours {
  color: #b02a37;
}

.user-door-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.door-open-btn,
.door-close-btn {
  height: 2.2rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.door-open-btn {
  color: #ffffff;
  background: linear-gradient(145deg, var(--ud-mint), var(--ud-mint-deep));
  box-shadow: 0 6px 12px rgba(62, 207, 154, 0.28);
}

.door-close-btn {
  color: var(--ud-ink);
  background: #f3f5f8;
}

.door-open-btn:hover:not(:disabled),
.door-close-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.door-open-btn:disabled,
.door-close-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ud-home-bar {
  display: block;
  width: 2.4rem;
  height: 0.22rem;
  margin: 0.45rem auto 0;
  border-radius: 999px;
  background: #d7dce6;
}

.user-empty {
  margin: 0;
  padding: 1.35rem 1.1rem;
  min-height: 5rem;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ud-card);
  border-radius: 1.65rem;
  box-shadow: var(--ud-shadow);
  color: var(--ud-muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .ud-hero {
    padding: 1.6rem 1.5rem 1.75rem;
    border-radius: 1.85rem;
  }

  .user-door-card {
    min-height: 5.1rem;
    padding: 0.85rem 1.15rem 0.95rem;
    border-radius: 1.85rem;
  }

  .door-open-btn,
  .door-close-btn {
    height: 2.35rem;
    padding: 0 1.05rem;
    font-size: 0.85rem;
  }
}

/* Laptop / PC: welcome banner full width, door cards fill row */
@media (min-width: 768px) {
  .user-dashboard {
    gap: 0.85rem;
  }

  .ud-hero {
    padding: 2rem 1.75rem 2.15rem;
    border-radius: 2rem;
  }

  .user-doors {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .user-door-card {
    min-height: 5.35rem;
    min-width: 0;
  }
}

@media (min-width: 1100px) {
  .ud-hero {
    padding: 2.25rem 2rem 2.4rem;
  }

  .user-doors {
    gap: 0.75rem;
  }
}

@media (max-width: 380px) {
  .ud-card-main {
    flex-wrap: wrap;
  }

  .user-door-actions {
    width: 100%;
    justify-content: flex-end;
    padding-left: 3.25rem;
  }
}
.manual-shell {
  --ud-bg: #f4f8fb;
  --ud-ink: #1c2430;
  --ud-muted: #8b97a8;
  --ud-mint: #3ecf9a;
  --ud-mint-deep: #2bb883;
  --ud-shadow: 0 10px 28px rgba(120, 130, 160, 0.16);
  --ud-pad-x: clamp(0.75rem, 2vw, 1.5rem);

  position: relative;
  isolation: isolate;
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #d9f5ff 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, #d8f8ea 0%, transparent 50%),
    linear-gradient(180deg, #f7fbff 0%, var(--ud-bg) 45%, #eef6f8 100%);
  color: var(--ud-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.manual-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.manual-blob-a {
  top: -4rem;
  right: -2rem;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(159, 216, 240, 0.5), transparent 70%);
}

.manual-blob-b {
  bottom: -5rem;
  left: -4rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(62, 207, 154, 0.22), transparent 70%);
}

.manual-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.65rem var(--ud-pad-x);
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
}

.manual-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.manual-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.manual-user {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--ud-muted);
}

.manual-logout {
  height: 2.2rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ud-ink);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(120, 150, 180, 0.12);
  cursor: pointer;
}

.manual-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem var(--ud-pad-x) 1.5rem;
}

.manual-hero {
  padding: 1.35rem 1.25rem 1.45rem;
  background: #ffffff;
  border-radius: 1.65rem;
  box-shadow: var(--ud-shadow);
}

.manual-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ud-mint-deep);
}

.manual-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.manual-title span {
  background: linear-gradient(120deg, var(--ud-mint-deep), #7ec8e8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.manual-subtitle {
  margin: 0.35rem 0 0;
  color: var(--ud-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.manual-error,
.manual-success {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--ud-shadow);
}

.manual-error {
  color: #b02a37;
  background: rgba(255, 255, 255, 0.95);
}

.manual-success {
  color: #146c43;
  background: rgba(62, 207, 154, 0.12);
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

/* Larger camera tiles on the kiosk / manual screen — fill the Door camera card */
.manual-shell .camera-feed-grid,
.manual-shell .camera-feed-grid.is-multi {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.manual-shell .camera-feed-card {
  width: 100%;
}

.manual-shell .camera-feed-frame {
  width: 100% !important;
  max-width: none !important;
  height: clamp(22rem, 52vh, 38rem);
  min-height: 22rem;
  aspect-ratio: auto;
  border-radius: 1.1rem;
}

.manual-shell .camera-feed-name {
  font-size: 1rem;
}

.manual-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.25rem 1.45rem;
  background: #ffffff;
  border-radius: 1.65rem;
  box-shadow: var(--ud-shadow);
}

.manual-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ud-mint-deep);
}

.manual-select {
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid #e3ebf2;
  border-radius: 999px;
  background: #f7fafc;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ud-ink);
}

.manual-door-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.manual-status {
  margin: 0;
  color: var(--ud-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.manual-status strong {
  color: var(--ud-ink);
}

.manual-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.manual-toggle-btn {
  height: 4.5rem;
  border: none;
  border-radius: 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.manual-toggle-btn.is-open {
  color: #ffffff;
  background: linear-gradient(145deg, var(--ud-mint), var(--ud-mint-deep));
  box-shadow: 0 8px 18px rgba(62, 207, 154, 0.28);
}

.manual-toggle-btn.is-close {
  color: var(--ud-ink);
  background: #f3f5f8;
}

.manual-toggle-btn.is-active {
  outline: 3px solid rgba(62, 207, 154, 0.35);
  outline-offset: 2px;
}

.manual-toggle-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.manual-toggle-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.manual-empty {
  margin: 0;
  color: var(--ud-muted);
  font-weight: 500;
  text-align: center;
  padding: 1rem 0;
}

@media (min-width: 900px) {
  .manual-grid {
    grid-template-columns: 2.2fr 0.8fr;
    align-items: stretch;
  }

  .manual-shell .camera-feed {
    height: 100%;
  }

  .manual-shell .camera-feed-frame {
    height: clamp(28rem, 58vh, 44rem);
    min-height: 28rem;
  }
}

@media (min-width: 1200px) {
  .manual-shell .camera-feed-frame {
    height: clamp(32rem, 62vh, 48rem);
    min-height: 32rem;
  }
}

@media (max-width: 480px) {
  .manual-user {
    display: none;
  }

  .manual-toggle-btn {
    height: 4rem;
  }
}
