:root {
  --dw-red: #D11E3C;
  --dw-dark-red: #A51831;
  --dw-gold: #FFCB03;
  --dw-black: #1A1A1A;
  --dw-white: #FFFFFF;
  --dw-grey: #F2F2F2;
  --dw-border: #E0E0E0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--dw-grey);
  color: var(--dw-black);
}
.dw-header {
  background: var(--dw-red);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.dw-header h1 { font-size: 1.05rem; margin: 0; font-weight: 700; letter-spacing: .02em; }
.dw-header .dw-user { font-size: .85rem; opacity: .9; }
.dw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: none;
  border-radius: 10px;
  padding: .75rem 1.1rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.dw-btn-primary { background: var(--dw-red); color: #fff; }
.dw-btn-primary:active { background: var(--dw-dark-red); }
.dw-btn-secondary { background: #fff; color: var(--dw-black); border: 1.5px solid var(--dw-black); }
.dw-btn-gold { background: var(--dw-gold); color: var(--dw-black); }
.dw-btn-danger { background: #fff; color: var(--dw-red); border: 1.5px solid var(--dw-red); padding: .4rem .7rem; font-size: .82rem; }
.dw-btn:disabled { opacity: .5; cursor: not-allowed; }
.dw-card { background: #fff; border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: .85rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dw-field { margin-bottom: .9rem; }
.dw-field:last-child { margin-bottom: 0; }
.dw-field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .3rem; color: #444; }
.dw-field input, .dw-field select, .dw-field textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1.5px solid var(--dw-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--dw-black);
}
.dw-field input:read-only { background: #F7F7F7; color: #777; }
.dw-checkbox-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--dw-border);
}
.dw-checkbox-row:last-child { border-bottom: none; }
.dw-checkbox-row input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.dw-checkbox-row label { margin: 0; font-size: .95rem; font-weight: 400; color: var(--dw-black); }
.dw-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.dw-badge-draft { background: #EEE; color: #555; }
.dw-badge-synced { background: #FFF3CD; color: #8a6d00; }
.dw-badge-completed { background: #DDF3E4; color: #14733d; }
.dw-container { max-width: 640px; margin: 0 auto; padding: 1rem; }
.dw-login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.dw-logo { font-size: 1.8rem; font-weight: 800; color: var(--dw-red); margin-bottom: .25rem; }
.dw-logo-img { width: 220px; max-width: 70vw; height: auto; margin-bottom: .5rem; }
.dw-tagline { color: #666; margin-bottom: 2rem; font-size: .9rem; }
.dw-app-version { color: #999; font-size: .75rem; margin-top: 2rem; }
.dw-error { color: var(--dw-red); font-size: .85rem; margin-top: .5rem; }
.dw-empty { text-align: center; color: #888; padding: 2rem 0; }
.dw-fab-space { height: 5.5rem; }
.dw-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .6rem; }
.dw-photo-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #eee; }
.dw-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-photo-thumb button {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: .8rem; line-height: 1; cursor: pointer;
}
.dw-voice-note { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--dw-border); }
.dw-voice-note:last-child { border-bottom: none; }
.dw-voice-note audio { flex: 1; height: 32px; min-width: 0; }
.dw-voice-note .dw-duration { font-size: .8rem; color: #666; width: 2.6rem; flex-shrink: 0; }
.dw-mic-btn {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--dw-red); color: #fff;
  border: none; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.dw-mic-btn.recording { background: var(--dw-dark-red); animation: dw-pulse 1.2s infinite; }
@keyframes dw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(209,30,60,.5); }
  70% { box-shadow: 0 0 0 14px rgba(209,30,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(209,30,60,0); }
}
.dw-note-hint { font-size: .78rem; color: #888; margin-top: .3rem; }
.dw-section-title { font-size: .95rem; font-weight: 700; margin: 0 0 .6rem; }
.dw-job-card { display: block; text-decoration: none; color: inherit; }
.dw-job-card .dw-row1 { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.dw-job-card .dw-job-number { font-weight: 700; }
.dw-job-card .dw-customer { color: #555; margin-top: .15rem; font-size: .9rem; }
.dw-job-card .dw-meta { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .82rem; color: #777; }
.dw-fab { position: fixed; right: 1.1rem; bottom: 1.1rem; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.dw-btn-block { display: flex; width: 100%; font-size: 1.05rem; padding: 1rem; margin-bottom: 1rem; }
.dw-new-job-btn { text-align: center; }
.dw-chart { display: flex; align-items: flex-end; gap: .6rem; height: 150px; padding-top: 1.2rem; }
.dw-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dw-chart-bar-track { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 100%; }
.dw-chart-count { font-size: .75rem; font-weight: 700; color: var(--dw-black); margin-bottom: .3rem; }
.dw-chart-bar { width: 60%; min-height: 2px; background: var(--dw-red); border-radius: 4px 4px 0 0; }
.dw-chart-week { font-size: .72rem; color: #777; margin-top: .5rem; white-space: nowrap; }
.dw-topbar-actions { display: flex; gap: .9rem; align-items: center; }
.dw-link-btn { background: none; border: none; color: #fff; font-size: .85rem; cursor: pointer; text-decoration: underline; padding: 0; font-family: inherit; }
#customerResults { margin-top: .4rem; }
#customerResults .dw-result-row { padding: .5rem .7rem; border-radius: 8px; background: #F7F7F7; margin-bottom: .3rem; cursor: pointer; }
#customerResults .dw-result-row:hover { background: #EFEFEF; }
