/*
|--------------------------------------------------------------------------
| GLOBAL
|--------------------------------------------------------------------------
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family:
    Inter,
    sans-serif;
  background: #dbe1ea;
  color: #0f172a;
  touch-action: manipulation;
}

body {
  display: flex;
  justify-content: center;
}

/*
|--------------------------------------------------------------------------
| APP SHELL
|--------------------------------------------------------------------------
*/

.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.sync-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #22c55e;
}

.app-title {
  font-size: 28px;
  font-weight: 900;
}

.new-client-button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #0f172a;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| CLIENT CARD
|--------------------------------------------------------------------------
*/

.client-card {
  position: relative;
  flex-shrink: 0;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #1d4ed8
    );
  border-radius: 36px;
  padding: 24px;
  overflow: hidden;
  min-height: 230px;
}

.client-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background:
    rgba(255,255,255,0.08);
  top: -60px;
  right: -60px;
}

.client-card-content {
  position: relative;
  z-index: 2;
}

.client-input {
  width: 100%;
  border: none;
  background: transparent;
  color: white;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  padding: 0;
  caret-color: white;
}

.client-input::placeholder {
  color:
    rgba(255,255,255,0.5);
}

.client-name {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 18px;
}

#client-phone,
#client-address {
  font-size: 16px;
  font-weight: 500;
  margin-top: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding:
    10px 20px;
  border-radius: 999px;
  background:
    rgba(255,255,255,0.15);
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 20px;
}

/*
|--------------------------------------------------------------------------
| MAIN BUTTON
|--------------------------------------------------------------------------
*/

.status-action {
  flex-shrink: 0;
}

.status-button {
  width: 100%;
  height: 92px;
  border: none;
  border-radius: 32px;
  background:
    linear-gradient(
      135deg,
      #020617,
      #172554
    );
  color: white;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
  touch-action: pan-x;
}

.button-active {
  transform: scale(0.97);
  opacity: 0.9;
}

.recording {
  background: #dc2626 !important;
  box-shadow:
    0 0 28px
    rgba(220,38,38,0.5);
}

/*
|--------------------------------------------------------------------------
| WORKFLOW CARD
|--------------------------------------------------------------------------
*/

.workflow-card {
  flex: 1;
  min-height: 0;
  background:
    rgba(255,255,255,0.65);
  backdrop-filter: blur(20px);
  border-radius: 36px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workflow-card label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

#job-title {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  overflow: hidden;
  outline: none;
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  min-height: 92px;
}

.workflow-step-wrapper {
  margin-top: auto;
}

.workflow-step-label {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 8px;
}

#workflow-step {
  font-size: 20px;
  font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| DOCK
|--------------------------------------------------------------------------
*/

.bottom-dock {
  height: 92px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns:
    repeat(4, 1fr);
  gap: 12px;
}

.dock-button {
  border: none;
  border-radius: 28px;
  background:
    rgba(255,255,255,0.8);
  font-size: 15px;
  font-weight: 900;
  color: #000;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.dock-button:active {
  transform: scale(0.96);
}

/*
|--------------------------------------------------------------------------
| DRAWER
|--------------------------------------------------------------------------
*/

.drawer {
  position: fixed;
  left: 50%;
  transform:
    translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: 78vh;
  background: #f8fafc;
  border-radius:
    32px 32px 0 0;
  padding: 22px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  animation:
    slideUp 0.2s ease;
}

.hidden {
  display: none;
}

@keyframes slideUp {

  from {
    transform:
      translateX(-50%)
      translateY(100%);
  }

  to {
    transform:
      translateX(-50%)
      translateY(0);
  }

}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.drawer-header h2 {
  font-size: 34px;
  font-weight: 900;
}

#close-drawer {
  border: none;
  background:
    rgba(15,23,42,0.08);
  padding:
    12px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
}

/*
|--------------------------------------------------------------------------
| EMPTY STATES
|--------------------------------------------------------------------------
*/

.empty-state {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  background:
    rgba(15,23,42,0.04);
}

.empty-action {
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 18px;
  padding: 18px;
  font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| PHOTOS
|--------------------------------------------------------------------------
*/

.photo-item {
  margin-bottom: 24px;
}

.photo-preview {
  width: 100%;
  border-radius: 24px;
  display: block;
}

.photo-date {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.55;
}

/*
|--------------------------------------------------------------------------
| LOGS
|--------------------------------------------------------------------------
*/

.drawer-log {
  background: white;
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
}

.drawer-date {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.55;
}

/*
|--------------------------------------------------------------------------
| PHOTO INPUT
|--------------------------------------------------------------------------
*/

#photo-input {
  display: none;
}