* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --gold: #B5A164;
  --gold-dark: #9C8A4F;
  --black: #1C1C1E;
  --dark: #2C2C2E;
  --gray-1: #8E8E93;
  --gray-2: #AEAEB2;
  --gray-3: #C7C7CC;
  --gray-4: #D1D1D6;
  --gray-5: #E5E5EA;
  --gray-6: #F2F2F7;
  --blue: #007AFF;
  --tab-height: 82px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background: #F2F2F7;
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
}

#app {
  max-width: 390px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

.screen-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 54px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.5px solid var(--gray-5);
}

.screen-header h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.back-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: none;
  border: none;
  color: var(--blue);
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
}

.header-spacer {
  width: 60px;
}

.screen-content {
  flex: 1;
  padding: 0 20px 100px;
  overflow-y: auto;
}

#screen-home .screen-content {
  padding-bottom: 0;
}

#screen-home {
  background: var(--dark);
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  padding: 28px 0 10px;
}

.home-dark-zone {
  background: #fff;
  padding: 20px 24px 6px;
}

.home-dark-header {
  padding-bottom: 10px;
}

.home-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-header-left {
  flex: 1;
}

.home-logo {
  width: 140px;
  height: auto;
  flex-shrink: 0;
}

.home-welcome-label {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.1px;
  margin-bottom: 1px;
}

.home-company-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.home-dark-content {
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
}

.home-dark-content:active {
  opacity: 0.8;
}

.home-vehicle-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.home-vehicle-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.home-vehicle-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.35;
  color: var(--black);
  white-space: nowrap;
}

.home-vehicle-trim {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.home-vehicle-meta {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 3px;
  font-style: italic;
  letter-spacing: 0.2px;
}

.home-finance-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.02);
  margin-right: -16px;
  margin-top: -20px;
  margin-bottom: -30px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 3;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.finance-circle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.finance-circle-bank {
  font-size: 9px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.finance-circle-amount {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 2px;
  color: var(--black);
}

.finance-circle-label {
  font-size: 8px;
  color: rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.finance-circle-divider {
  width: 40px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 6px 0;
}

.finance-circle-payments {
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  color: rgba(0, 0, 0, 0.6);
}

.home-vehicle-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 18px 0;
}

.home-payment-row {
  display: flex;
  align-items: baseline;
}

.home-payment-amount {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--black);
}

.home-payment-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 4px;
  letter-spacing: 0.1px;
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 2px 24px 6px;
  background: #fff;
}

.home-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.home-action-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

.home-action-btn svg {
  color: var(--gold);
}

.home-action-btn span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.home-bottom-card {
  background: var(--dark);
  padding: 0;
  flex: 1;
}

.home-bottom-card-inner {
  background: var(--dark);
  border-radius: 32px 32px 0 0;
  padding: 32px 28px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 500px;
  flex: 1;
}

.home-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 24px;
}

.home-status-badge {
  margin-bottom: 14px;
}

.home-status-title {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.home-status-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  line-height: 1.55;
  margin-top: 8px;
  max-width: 240px;
  letter-spacing: 0.05px;
}


.vehicle-card {
  background: var(--gray-6);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.vehicle-card:active {
  transform: scale(0.98);
  background: var(--gray-5);
}

.vehicle-card-img {
  width: 80px;
  height: 44px;
  flex-shrink: 0;
}

.vehicle-card-img svg {
  width: 100%;
  height: 100%;
}

.vehicle-card-info {
  flex: 1;
  min-width: 0;
}

.vehicle-card-year {
  font-size: 12px;
  color: var(--gray-1);
  font-weight: 500;
}

.vehicle-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-card-detail {
  font-size: 13px;
  color: var(--gray-2);
  margin-top: 2px;
}

.vehicle-card-arrow {
  flex-shrink: 0;
  padding: 0 4px;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-card {
  background: var(--gray-6);
  border-radius: 16px;
  padding: 18px 16px;
}

.info-card-label {
  font-size: 12px;
  color: var(--gray-1);
  font-weight: 500;
  letter-spacing: 0.1px;
}

.info-card-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 6px;
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--gray-5);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  background: var(--gray-6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-title {
  font-size: 15px;
  font-weight: 500;
}

.activity-date {
  font-size: 13px;
  color: var(--gray-1);
  margin-top: 2px;
}

.detail-hero {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

.detail-hero svg {
  width: 220px;
  height: 110px;
}

.detail-title {
  text-align: center;
  padding: 8px 0 0;
}

.detail-year {
  font-size: 12px;
  color: var(--gray-1);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.detail-title h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 2px;
}

.detail-subtitle {
  font-size: 14px;
  color: var(--gray-2);
  margin-top: 4px;
}

.spec-list {
  background: var(--gray-6);
  border-radius: 16px;
  overflow: hidden;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 0.5px solid var(--gray-5);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-size: 15px;
  color: var(--black);
  font-weight: 400;
}

.spec-value {
  font-size: 15px;
  color: var(--gray-1);
  text-align: right;
  font-weight: 400;
}

.service-list {
  position: relative;
  padding-left: 22px;
}

.service-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--gray-4);
  border-radius: 1px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}

.service-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 4px;
  flex-shrink: 0;
  position: absolute;
  left: -22px;
  box-shadow: 0 0 0 3px #fff;
}

.service-name {
  font-size: 15px;
  font-weight: 500;
}

.service-meta {
  font-size: 13px;
  color: var(--gray-1);
  margin-top: 3px;
}

.service-card {
  background: var(--gray-6);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 10px;
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.service-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--gold);
  color: #fff;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.service-badge.done {
  background: var(--gray-5);
  color: var(--gray-1);
}

.service-card-detail {
  font-size: 14px;
  color: var(--gray-1);
  margin-top: 8px;
  line-height: 1.4;
}

.service-card-date {
  font-size: 12px;
  color: var(--gray-2);
  margin-top: 6px;
}

.profile-screen {
  background: var(--dark);
}

.profile-top {
  background: #fff;
  padding: 10px 24px 20px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.profile-avatar-info {
  flex: 1;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--black);
}

.profile-email {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 0;
}

.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
}

.profile-stat-label {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.profile-stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(0, 0, 0, 0.1);
}

.profile-bottom {
  background: var(--dark);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 120px;
  margin-top: -6px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.profile-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 16px;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.profile-detail-row:last-child {
  border-bottom: none;
}

.profile-detail-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.profile-detail-value {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  text-align: right;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: var(--tab-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 0.5px solid var(--gray-5);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10px;
  z-index: 100;
}

.tab {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gray-2);
  cursor: pointer;
  font-family: inherit;
  padding: 4px 6px;
  transition: color 0.2s ease;
  min-width: 0;
}

.tab.active {
  color: var(--dark);
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

.coverage-card {
  background: var(--gray-6);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 10px;
}

.coverage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.coverage-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.coverage-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
}

.coverage-label {
  font-size: 14px;
  color: var(--black);
  font-weight: 400;
}

.coverage-value {
  font-size: 14px;
  color: var(--gray-1);
  font-weight: 400;
}

.garage-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.garage-popup-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.garage-popup {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 24px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.garage-popup-overlay.open .garage-popup {
  transform: translateY(0);
}

.garage-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.garage-popup-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--black);
}

.garage-popup-close {
  background: var(--gray-6);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--gray-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.garage-popup-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.garage-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--gray-5);
  cursor: pointer;
  transition: background 0.15s ease;
}

.garage-popup-item:last-child {
  border-bottom: none;
}

.garage-popup-item:active {
  background: var(--gray-6);
}

.garage-popup-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.garage-popup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--gray-4);
  flex-shrink: 0;
}

.garage-popup-dot.active {
  border-color: var(--gold);
  background: var(--gold);
}

.garage-popup-year {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-2);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.garage-popup-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--black);
  margin-top: 1px;
}

.garage-popup-meta {
  font-size: 13px;
  color: var(--gray-2);
  margin-top: 2px;
}

.doc-folders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-folder {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--gray-6);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.doc-folder:active {
  transform: scale(0.98);
  background: var(--gray-5);
}

.doc-folder-icon {
  width: 44px;
  height: 44px;
  background: rgba(181, 161, 100, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-folder-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  flex: 1;
}

.doc-folder-count {
  font-size: 12px;
  color: var(--gray-2);
  margin-right: 4px;
}

.doc-folder-arrow {
  flex-shrink: 0;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 0.5px solid var(--gray-5);
}

.doc-item:last-child {
  border-bottom: none;
}

.doc-icon {
  width: 42px;
  height: 42px;
  background: var(--gray-6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
}

.doc-meta {
  font-size: 12px;
  color: var(--gray-1);
  margin-top: 3px;
  letter-spacing: 0.05px;
}

.doc-detail-screen {
  background: var(--dark);
}

.doc-detail-top {
  background: #fff;
  padding: 54px 20px 20px;
  position: relative;
}

.doc-detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--gold-dark);
  margin-bottom: 16px;
  padding: 0;
}

.doc-detail-top-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}

.doc-detail-image-area {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doc-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--gray-2);
  font-size: 13px;
  font-weight: 500;
}

.doc-detail-bottom {
  background: var(--dark);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 120px;
  margin-top: -10px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.doc-detail-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 20px;
}

.doc-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.doc-detail-row:last-child {
  border-bottom: none;
}

.doc-detail-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.doc-detail-value {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  text-align: right;
}
