:root {
  --bg: #e7ecf7;
  --surface: #ffffff;
  --surface-alt: #f4f6fb;
  --primary: #0b57d0;
  --primary-soft: rgba(11, 87, 208, 0.1);
  --text: #1b1f2a;
  --text-soft: #5b6275;
  --shadow: 0 18px 40px rgba(9, 24, 70, 0.2);
  font-family: 'Roboto', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

body {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.device {
  width: 380px;
  max-width: 100%;
  background: var(--surface);
  border-radius: 36px;
  box-shadow: var(--shadow);
  border: 10px solid #111728;
  overflow: hidden;
  position: relative;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 0;
  font-size: 13px;
  color: var(--text-soft);
}

.status-bar__icons span {
  margin-left: 8px;
}

.app-shell {
  background: linear-gradient(180deg, #f9fbff 0%, var(--surface) 40%);
  border-radius: 32px 32px 0 0;
  margin-top: 8px;
  padding-bottom: 70px;
  position: relative;
  min-height: 660px;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.app-bar__title {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.app-bar__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.icon-btn {
  background: var(--surface-alt);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
}

.secondary-btn {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid rgba(11, 87, 208, 0.2);
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
}

.screen {
  padding: 0 20px 20px;
  display: grid;
  gap: 16px;
  overflow-y: auto;
  max-height: 560px;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 20, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 32px 32px 0 0;
}

.drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--surface);
  border-radius: 32px 32px 0 0;
  box-shadow: 22px 0 40px rgba(9, 24, 70, 0.16);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.drawer.is-visible {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.drawer__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 20px;
}

.drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.drawer__link {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.drawer__link span:first-child {
  font-size: 20px;
}

.drawer__link:hover {
  background: var(--surface-alt);
}

.drawer__link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.hero-card {
  background: linear-gradient(150deg, rgba(11, 87, 208, 0.92), rgba(33, 150, 243, 0.8));
  color: #fff;
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: auto -40px -80px auto;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.hero-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.hero-card__meta {
  margin: 0;
  font-size: 14px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 6px;
}

.card--interactive {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(9, 24, 70, 0.12);
}

.card__title {
  margin: 0;
  font-weight: 600;
}

.card__meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.pill {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-block;
  margin-right: 6px;
}

.list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.fab {
  position: absolute;
  right: 24px;
  bottom: 100px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 28px;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 30px rgba(11, 87, 208, 0.4);
  cursor: pointer;
}

.bottom-nav {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.bottom-nav__btn {
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 14px;
  color: var(--text-soft);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.bottom-nav__btn.is-active {
  color: var(--primary);
  font-weight: 600;
}

.android-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 20, 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.android-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.android-modal__panel {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  width: min(320px, 90vw);
  display: grid;
  gap: 12px;
}

.android-modal__close {
  justify-self: end;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
  display: grid;
  gap: 8px;
}

.empty-state span {
  font-size: 42px;
}

.inline-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 9, 20, 0.55);
  padding: 0 16px 28px;
  z-index: 30;
}

.inline-modal__sheet {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: 28px 28px 22px 22px;
  box-shadow: 0 18px 40px rgba(9, 24, 70, 0.25);
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100% - 80px);
  animation: sheet-in 0.25s ease;
}

.inline-modal__close {
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-soft);
}

.inline-modal__body {
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding-right: 4px;
  max-height: calc(100% - 40px);
}

.inline-modal__body::-webkit-scrollbar {
  width: 6px;
}

.inline-modal__body::-webkit-scrollbar-thumb {
  background: rgba(11, 87, 208, 0.35);
  border-radius: 999px;
}

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

.camera-preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  height: 240px;
  display: grid;
  place-items: center;
}

.camera-preview video,
.camera-preview .camera-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  padding: 16px;
  text-align: center;
}

.camera-frame {
  position: absolute;
  inset: 20px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  pointer-events: none;
}

.camera-actions {
  display: grid;
  gap: 8px;
}

.android-modal__panel .secondary-btn,
.android-modal__panel .primary-btn {
  width: 100%;
}

.success-banner {
  background: rgba(46, 204, 113, 0.12);
  color: #1f8b4c;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  display: grid;
  gap: 4px;
}

.success-banner strong {
  font-weight: 600;
}

@media (max-width: 420px) {
  body {
    padding: 12px;
  }

  .device {
    width: 100%;
    border-width: 6px;
  }

  .app-shell {
    min-height: 540px;
  }

  .screen {
    max-height: 440px;
  }

  .drawer {
    width: min(80vw, 260px);
  }
}
