/* =============================================
   BRINDISA RETAIL CHECKS — GLOBAL STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --navy:       #2D3A5C;
  --navy-dark:  #1e2840;
  --navy-light: #3d4e78;
  --white:      #FFFFFF;
  --off-white:  #F5F4F0;
  --cream:      #EDE9E0;
  --green:      #2E7D5B;
  --green-light:#3a9e72;
  --red:        #C0392B;
  --amber:      #D4820A;
  --grey-light: #e8e6e1;
  --grey-mid:   #9a9590;
  --text-dark:  #1a1a2e;
  --shadow:     0 4px 24px rgba(45, 58, 92, 0.13);
  --radius:     10px;
  --radius-sm:  6px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--navy);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-header .logo img {
  height: 44px;
  width: auto;
}

.site-header .store-badge {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ---- PAGE WRAPPER ---- */
.page {
  display: none;
  min-height: calc(100vh - 76px);
  padding: 32px 20px 60px;
  max-width: 680px;
  margin: 0 auto;
}

.page.active { display: block; }

/* ---- HERO SECTION (landing) ---- */
.hero {
  text-align: center;
  padding: 48px 0 40px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-subtitle {
  color: var(--grey-mid);
  font-size: 0.95rem;
  font-weight: 400;
}

/* ---- STORE SELECTOR ---- */
.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.store-grid-audit {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.store-grid-audit .store-card {
  width: calc(50% - 8px);
}

.store-card {
  background: var(--white);
  border: 2px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.store-card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(45,58,92,0.18);
}

.store-card .store-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.store-card .store-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 600;
}

.store-card .store-location {
  font-size: 0.82rem;
  color: var(--grey-mid);
  margin-top: 4px;
}

/* ---- TIME NOTICE ---- */
.time-notice {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.time-notice .time-icon { font-size: 1.2rem; }
.time-notice strong { font-weight: 600; }

/* ---- CHECK MENU ---- */
.checks-header {
  margin-bottom: 24px;
}

.checks-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
}

.checks-header p {
  color: var(--grey-mid);
  font-size: 0.88rem;
  margin-top: 4px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin: 24px 0 10px;
}

.check-item {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.check-item:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow);
}

.check-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--cream);
}

.check-item .check-info { flex: 1; }

.check-item .check-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.check-item .check-window {
  font-size: 0.78rem;
  color: var(--grey-mid);
  margin-top: 2px;
}

.check-item .check-arrow {
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 600;
}

.check-item.locked .check-arrow { color: var(--grey-mid); }

.no-checks {
  text-align: center;
  padding: 48px 20px;
  color: var(--grey-mid);
}

.no-checks .no-checks-icon { font-size: 2.5rem; margin-bottom: 12px; }
.no-checks h3 { color: var(--navy); margin-bottom: 8px; font-family: 'Playfair Display', serif; }

/* ---- BACK BUTTON ---- */
.back-btn {
  background: none;
  border: none;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.back-btn:hover { opacity: 0.7; }

/* ---- FORM ---- */
.form-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--grey-light);
}

.form-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-header .form-meta {
  font-size: 0.82rem;
  color: var(--grey-mid);
}

.form-description {
  background: var(--cream);
  border-left: 3px solid var(--navy);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--navy-dark);
  margin-bottom: 24px;
  line-height: 1.6;
}

.form-section {
  margin-bottom: 28px;
}

.form-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--cream);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.form-field {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.form-field:focus-within { border-color: var(--navy); }

.form-field.has-error { border-color: var(--red); }

.field-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.field-label .order-num {
  background: var(--navy);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.field-label .required-star {
  color: var(--red);
  font-size: 0.75rem;
  margin-left: 2px;
}

/* Checkbox field */
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-field .checkbox-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
}

/* Yes/No field */
.yes-no-group {
  display: flex;
  gap: 10px;
}

.yes-no-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--grey-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.yes-no-btn:hover { border-color: var(--navy); }

.yes-no-btn.selected-yes {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.yes-no-btn.selected-no {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Numeric input */
.numeric-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--grey-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  transition: border-color 0.15s;
  background: var(--white);
}

.numeric-input:focus {
  outline: none;
  border-color: var(--navy);
}

.numeric-input.temp-input {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.05em;
}

/* Text input */
.text-input, .text-area {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--grey-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  transition: border-color 0.15s;
  background: var(--white);
}

.text-area { min-height: 80px; resize: vertical; }

.text-input:focus, .text-area:focus {
  outline: none;
  border-color: var(--navy);
}

/* Conditional reveal */
.conditional-field {
  margin-top: 12px;
  padding: 14px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  display: none;
}

.conditional-field.visible { display: block; }

.conditional-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

/* Photo upload */
.photo-upload-area {
  border: 2px dashed var(--grey-light);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
  background: var(--off-white);
}

.photo-upload-area:hover { border-color: var(--navy); }

.photo-upload-area input[type="file"] { display: none; }

.photo-upload-area .upload-icon { font-size: 1.8rem; margin-bottom: 8px; }

.photo-upload-area .upload-text {
  font-size: 0.82rem;
  color: var(--grey-mid);
}

.photo-preview {
  display: none;
  margin-top: 10px;
  position: relative;
}

.photo-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.photo-preview .remove-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Error message */
.field-error {
  color: var(--red);
  font-size: 0.78rem;
  margin-top: 6px;
  display: none;
}

.field-error.visible { display: block; }

/* ---- SUBMIT BUTTON ---- */
.submit-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--grey-light);
}

.submit-btn {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}

.submit-btn:hover { background: var(--navy-dark); }

.submit-btn:disabled {
  background: var(--grey-mid);
  cursor: not-allowed;
}

/* ---- SUCCESS PAGE ---- */
.success-screen {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.success-screen h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.success-screen p {
  color: var(--grey-mid);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--navy-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---- LOADING SPINNER ---- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .store-grid { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 48px; }
}

/* ---- NAME STEP ---- */
.name-step {
  padding: 8px 0;
}

.name-step-intro {
  text-align: center;
  padding: 32px 20px 28px;
  background: var(--cream);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.name-step-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.name-step-desc {
  font-size: 0.92rem;
  color: var(--navy);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

/* ---- SUBMISSION WARNING ---- */
.submission-warning {
  background: #fff8e6;
  border: 1px solid #f0c040;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--navy-dark);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ---- COMPLETED CHECK ---- */
.check-item.completed {
  background: #f0faf4;
  border-color: #b8e0c8;
  cursor: not-allowed;
}

.check-item.completed .check-name {
  color: var(--grey-mid);
}

.check-item.completed .check-window {
  color: var(--green);
  font-weight: 500;
}

.check-item.completed .check-arrow {
  font-size: 1.2rem;
}

/* ---- NAME SCREEN ---- */
.name-screen {
  max-width: 480px;
  margin: 48px auto 0;
  text-align: center;
}

.name-screen-check {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}

.name-screen-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.name-screen-sub {
  color: var(--grey-mid);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.name-screen-input {
  font-size: 1rem;
  padding: 14px 16px;
  border: 2px solid var(--grey-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
  text-align: center;
}

.name-screen-input:focus {
  border-color: var(--navy);
  outline: none;
}

.name-screen-error {
  color: var(--red);
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: none;
}

.name-screen-error.visible {
  display: block;
}

/* ---- FAILED CHECK ---- */
.check-item.failed {
  background: #fdecea;
  border-color: #f5c0bc;
  cursor: not-allowed;
}

.check-item.failed .check-name {
  color: var(--red);
}

.check-item.failed .check-window {
  color: var(--red);
  font-weight: 500;
}

.check-item.failed .check-arrow {
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---- LOGIN SCREEN ---- */
.login-screen {
  max-width: 420px;
  margin: 48px auto 0;
  text-align: center;
}

.login-store-name {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.login-sub {
  color: var(--grey-mid);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-field {
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 6px;
}

.login-error {
  color: var(--red);
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: none;
}

/* ---- AUDIT CARD ---- */
.store-card.audit-card {
  border-color: var(--navy);
  background: var(--navy);
}

.store-card.audit-card .store-name {
  color: var(--white);
}

.store-card.audit-card .store-location {
  color: rgba(255,255,255,0.6);
}

.store-card.audit-card:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  transform: translateY(-3px);
}

/* ---- AUTH BOX (shared) ---- */
.auth-box {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--grey-mid);
  font-size: 0.88rem;
  margin-bottom: 24px;
}


