/* ═══════════════════════════════════════
   iOS Settings Inspired Design
   Mobile-First Approach
═══════════════════════════════════════ */

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

html, body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: #F2F2F7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --ios-blue:        #007AFF;
  --ios-blue-dark:   #0051D5;
  --ios-red:         #FF3B30;
  --ios-orange:      #FF9500;
  --ios-green:       #34C759;
  --ios-gray:        #8E8E93;
  --ios-gray-light:  #C7C7CC;
  --ios-gray-bg:     #F2F2F7;
  --ios-gray-bg2:    #E5E5EA;
  --ios-separator:   rgba(60, 60, 67, 0.12);
  --ios-text:        #000000;
  --ios-text-secondary: #3C3C43;
  --ios-text-tertiary:  #3C3C4399;
  --ios-card-bg:     #FFFFFF;
  --ios-shadow:      rgba(0, 0, 0, 0.04);
  --ios-shadow-strong: rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════
   BASE LAYOUT
═══════════════════════════════════════ */

.screen {
  width: 100%;
  min-height: 100vh;
  transition: opacity 0.3s ease;
}

.screen.hidden {
  display: none;
}

/* ═══════════════════════════════════════
   OWNER LOGIN
═══════════════════════════════════════ */
#owner-login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--ios-gray-bg);
}

.owner-login-box {
  width: 100%;
  max-width: 375px;
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 32px 20px;
  box-shadow: 0 2px 10px var(--ios-shadow), 0 1px 3px var(--ios-shadow);
}

.aq-logo-mark {
  width: 60px;
  height: 60px;
  border-radius: 13.3px;
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  margin: 0 auto 20px;
}

.aq-logo-icon {
  font-size: 32px;
}

.owner-login-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: -0.3px;
}

.owner-login-sub {
  font-size: 13px;
  color: var(--ios-text-tertiary);
  text-align: center;
  margin-bottom: 28px;
  font-weight: 400;
}

.o-field-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--ios-text);
  margin-bottom: 8px;
  margin-left: 2px;
}

.o-field {
  width: 100%;
  background: var(--ios-gray-bg);
  border: 0.5px solid var(--ios-gray-light);
  border-radius: 10px;
  color: var(--ios-text);
  font-size: 17px;
  padding: 12px 14px;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
  font-weight: 400;
}

.o-field:focus {
  background: #FFFFFF;
  border-color: var(--ios-blue);
}

.owner-signin-btn {
  width: 100%;
  height: 50px;
  background: var(--ios-blue);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  letter-spacing: -0.4px;
}

.owner-signin-btn:active {
  background: var(--ios-blue-dark);
  transform: scale(0.98);
}

.owner-signin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.login-error {
  font-size: 13px;
  color: var(--ios-red);
  text-align: center;
  margin-top: 12px;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  font-weight: 400;
}

.login-error.show {
  opacity: 1;
}

/* ═══════════════════════════════════════
   GUEST PIN VERIFICATION
═══════════════════════════════════════ */
#guest-login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
  background: var(--ios-gray-bg);
}

.corner-mark {
  display: none;
}

.aquaguest-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.aq-name {
  font-size: 34px;
  font-weight: 700;
  color: var(--ios-text);
  letter-spacing: -0.5px;
}

.aq-domain {
  font-size: 15px;
  color: var(--ios-gray);
  letter-spacing: 0;
  font-weight: 400;
}

.verify-panel {
  width: 100%;
  max-width: 375px;
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 28px 20px 24px;
  box-shadow: 0 2px 10px var(--ios-shadow), 0 1px 3px var(--ios-shadow);
  margin-bottom: 20px;
}

.verify-headline {
  font-size: 24px;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.verify-subline {
  font-size: 15px;
  color: var(--ios-text-tertiary);
  line-height: 1.4;
  margin-bottom: 28px;
  font-weight: 400;
}

.pin-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.pin-box {
  width: 60px;
  height: 60px;
  background: var(--ios-gray-bg);
  border: 0.5px solid var(--ios-gray-light);
  border-radius: 10px;
  font-size: 32px;
  font-weight: 400;
  color: var(--ios-text);
  text-align: center;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}

.pin-box:focus {
  border-color: var(--ios-blue);
  background: #FFFFFF;
}

.pin-box.filled {
  border-color: var(--ios-blue);
  background: rgba(0, 122, 255, 0.05);
}

.pin-box.error {
  border-color: var(--ios-red);
  background: rgba(255, 59, 48, 0.05);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-8px); }
}

.verify-btn {
  width: 100%;
  height: 50px;
  background: var(--ios-blue);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.4px;
}

.verify-btn:active {
  background: var(--ios-blue-dark);
  transform: scale(0.98);
}

.verify-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.verify-btn.loading {
  opacity: 0.6;
}

.verify-error {
  font-size: 14px;
  color: var(--ios-red);
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
  max-width: 100%;
  line-height: 1.5;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 0 8px;
}

.verify-error.show {
  opacity: 1;
}

.verify-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.verify-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ios-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.verify-success-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--ios-text);
  letter-spacing: -0.3px;
}

.verify-success-sub {
  font-size: 15px;
  color: var(--ios-green);
  font-weight: 400;
}

.verify-privacy {
  font-size: 13px;
  color: var(--ios-gray);
  line-height: 1.5;
  text-align: center;
  padding: 0 20px;
  max-width: 375px;
  font-weight: 400;
}

/* ═══════════════════════════════════════
   GUEST CONTROL SCREEN
═══════════════════════════════════════ */
#guest-control-screen {
  background: var(--ios-gray-bg);
  min-height: 100vh;
  padding-bottom: 40px;
}

.water-bg,
.top-band,
.heat-glow {
  display: none;
}

.app-content {
  padding: 16px;
  max-width: 100%;
  margin: 0 auto;
}

/* iOS-style header bar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
  margin-bottom: 12px;
}

.prop-pill {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-text);
  letter-spacing: -0.4px;
}

.prop-pill-dot {
  display: none;
}

.access-badge {
  font-size: 13px;
  color: var(--ios-gray);
  font-weight: 400;
}

.welcome {
  text-align: left;
  margin-bottom: 20px;
  padding: 0 4px;
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ios-text);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

/* Temperature Display - iOS Card Style */
.orb-wrap {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  text-align: center;
}

.orb-svg,
.orb-ripple,
.orb-track,
.orb-fill {
  display: none;
}

.orb-inner {
  position: static;
  border: none;
  box-shadow: none;
  background: none;
  display: block;
}

.orb-temp {
  font-size: 64px;
  font-weight: 200;
  color: var(--ios-text);
  line-height: 1;
  letter-spacing: -2px;
}

.orb-temp.hot {
  color: var(--ios-orange);
}

.orb-temp.ready {
  color: var(--ios-green);
}

.orb-unit {
  font-size: 32px;
  font-weight: 300;
  color: var(--ios-gray);
  margin-left: -4px;
}

.orb-label {
  font-size: 15px;
  color: var(--ios-gray);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 4px;
  display: block;
  font-weight: 400;
}

.orb-target {
  font-size: 17px;
  color: var(--ios-text-secondary);
  margin-top: 12px;
  display: block;
  font-weight: 500;
}

.orb-target span {
  color: var(--ios-blue);
  font-weight: 600;
}

/* Status Badge - iOS Style */
.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ios-gray-bg2);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--ios-text-secondary);
  font-weight: 500;
}

.status-badge.heating {
  background: rgba(255, 149, 0, 0.1);
  color: var(--ios-orange);
}

.status-badge.ready {
  background: rgba(52, 199, 89, 0.1);
  color: var(--ios-green);
}

.s-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ios-gray);
}

.status-badge.heating .s-dot {
  background: var(--ios-orange);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-badge.ready .s-dot {
  background: var(--ios-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ETA Card - iOS Style */
.eta-card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  transition: opacity 0.3s, transform 0.3s;
}

.eta-card.hidden {
  display: none;
}

.eta-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.eta-text {
  flex: 1;
  text-align: left;
}

.eta-main {
  font-size: 17px;
  color: var(--ios-text);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
}

.eta-sub {
  font-size: 15px;
  color: var(--ios-text-tertiary);
  line-height: 1.4;
  font-weight: 400;
}

/* Power Button - iOS Style */
/* Swipe to Power Control */
.swipe-container {
  width: 100%;
  margin-bottom: 16px;
  position: relative;
}

.swipe-instruction {
  font-size: 15px;
  font-weight: 600;
  color: var(--ios-text);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
  transition: all 0.3s ease;
  animation: pulseInstruction 2s ease-in-out infinite;
}

@keyframes pulseInstruction {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.7; transform: translateX(4px); }
}

.swipe-container.swiping .swipe-instruction,
.swipe-container.loading .swipe-instruction {
  animation: none;
  opacity: 0.5;
}

.swipe-track {
  position: relative;
  height: 64px;
  background: var(--ios-card-bg);
  border-radius: 16px;
  box-shadow: 0 1px 3px var(--ios-shadow), inset 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Background fill */
.swipe-track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--ios-green);
  transition: width 0.2s ease, background 0.3s ease;
  z-index: 1;
}

.swipe-container.turn-off .swipe-track::before {
  background: var(--ios-red);
}

.swipe-container.swiping .swipe-track::before {
  transition: none;
}

/* Chevron arrows hint */
.swipe-track::after {
  content: '›››';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 300;
  color: var(--ios-gray-light);
  z-index: 0;
  letter-spacing: -4px;
  animation: slideHint 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes slideHint {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) translateX(0); }
  50% { opacity: 0.6; transform: translateY(-50%) translateX(-8px); }
}

.swipe-container.swiping .swipe-track::after,
.swipe-container.loading .swipe-track::after {
  display: none;
}

/* Shimmer effect on track */
.swipe-track {
  background: linear-gradient(
    90deg,
    var(--ios-card-bg) 0%,
    rgba(142, 142, 147, 0.05) 50%,
    var(--ios-card-bg) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

.swipe-container.swiping .swipe-track,
.swipe-container.loading .swipe-track {
  animation: none;
  background: var(--ios-card-bg);
}

.swipe-handle {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: grab;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.swipe-handle:active {
  cursor: grabbing;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.swipe-container.swiping .swipe-handle {
  transition: none;
}

.swipe-container.completed .swipe-handle {
  animation: pulse 0.4s ease;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Loading state */
.swipe-container.loading .swipe-handle {
  cursor: wait;
  animation: loading-pulse 1.5s ease-in-out infinite;
}

.swipe-container.loading .power-icon-circle {
  animation: rotate 1s linear infinite;
}

@keyframes loading-pulse {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(0) scale(0.95); }
}

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

/* Loading spinner in handle */
.swipe-handle .loading-spinner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ios-gray-light);
  border-top-color: var(--ios-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.swipe-container.loading .loading-spinner {
  opacity: 1;
}

.swipe-container.loading .power-icon-circle {
  opacity: 0;
}

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

/* Cooldown Message */
.cooldown-message {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid var(--ios-orange);
  border-radius: 12px;
  color: var(--ios-orange);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cooldown-message.hidden {
  display: none;
}

.power-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.power-icon-line {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
}

/* Cards - iOS List Style */
.card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 16px 8px;
  border-bottom: none;
}

.card-title {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ios-gray);
  font-weight: 400;
}

/* Temperature Slider - iOS Style */
.temp-big-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 0.5px solid var(--ios-separator);
}

.temp-set-num {
  font-size: 48px;
  font-weight: 200;
  color: var(--ios-blue);
  line-height: 1;
  letter-spacing: -1.5px;
}

.temp-set-unit {
  font-size: 24px;
  color: var(--ios-gray);
  font-weight: 300;
  margin-left: -2px;
}

.set-btn {
  background: var(--ios-blue);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.set-btn:active {
  background: var(--ios-blue-dark);
  transform: scale(0.95);
}

.temp-slider {
  -webkit-appearance: none;
  width: calc(100% - 32px);
  height: 3px;
  border-radius: 1.5px;
  background: var(--ios-gray-light);
  outline: none;
  margin: 20px 16px 16px;
  cursor: pointer;
}

.temp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.temp-range-row {
  display: flex;
  justify-content: space-between;
  padding: 0 16px 16px;
  font-size: 13px;
  color: var(--ios-gray);
  font-weight: 400;
}

/* Session Card - iOS List Style */
#session-card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px var(--ios-shadow);
}

.session-time-big {
  font-size: 56px;
  font-weight: 200;
  color: var(--ios-text);
  line-height: 1;
  letter-spacing: -2px;
}

.session-meta {
  font-size: 15px;
  color: var(--ios-gray);
  margin-top: 4px;
  margin-bottom: 16px;
  font-weight: 400;
}

.session-bar-bg {
  height: 4px;
  background: var(--ios-gray-bg2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.session-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--ios-blue);
  transition: width 1s linear, background 0.3s;
}

.session-bar-fill.low {
  background: var(--ios-red);
}

.renewals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.renewals-label {
  font-size: 15px;
  color: var(--ios-text-secondary);
  font-weight: 400;
}

.renewals-pips {
  display: flex;
  gap: 6px;
}

.pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ios-blue);
}

.pip.used {
  background: var(--ios-gray-light);
}

.renew-btn {
  width: 100%;
  height: 50px;
  background: var(--ios-gray-bg);
  border: none;
  border-radius: 10px;
  color: var(--ios-blue);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.4px;
}

.renew-btn:active {
  background: var(--ios-gray-bg2);
  transform: scale(0.98);
}

.renew-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Notice Cards - iOS Alert Style */
.notice-card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notice-card.warn {
  background: rgba(255, 149, 0, 0.05);
}

.notice-card.alert {
  background: rgba(255, 59, 48, 0.05);
}

.notice-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
  color: var(--ios-text);
}

.notice-card.warn .notice-title {
  color: var(--ios-orange);
}

.notice-card.alert .notice-title {
  color: var(--ios-red);
}

.notice-body {
  font-size: 15px;
  color: var(--ios-text-tertiary);
  line-height: 1.4;
  font-weight: 400;
}

/* Safety Card - iOS List Style */
.safety-card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px var(--ios-shadow);
}

.safety-title {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ios-gray);
  margin-bottom: 12px;
  font-weight: 400;
}

.safety-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.safety-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--ios-text-secondary);
  line-height: 1.4;
  font-weight: 400;
}

.safety-list li::before {
  content: '•';
  color: var(--ios-gray);
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

.disclaimer {
  font-size: 13px;
  color: var(--ios-gray);
  line-height: 1.5;
  text-align: center;
  padding: 0 20px;
  margin-top: 20px;
  font-weight: 400;
}

/* Offline Banner - iOS Style */
.offline-banner {
  background: rgba(255, 59, 48, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ios-red);
  text-align: center;
  margin-bottom: 16px;
  display: none;
  font-weight: 500;
}

.offline-banner.show {
  display: block;
}

/* ═══════════════════════════════════════
   CONFIRMATION MODAL - iOS Alert Style
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--ios-card-bg);
  border-radius: 14px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.modal-overlay.show .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 20px 16px 12px;
  text-align: center;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.modal-message {
  font-size: 13px;
  color: var(--ios-text-tertiary);
  line-height: 1.4;
  font-weight: 400;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid var(--ios-separator);
  margin-top: 16px;
}

.modal-btn {
  height: 44px;
  border: none;
  background: transparent;
  color: var(--ios-blue);
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 0.5px solid var(--ios-separator);
}

.modal-btn:last-child {
  border-bottom: none;
}

.modal-btn:active {
  background: var(--ios-gray-bg2);
}

.modal-btn.primary {
  font-weight: 600;
}

.modal-btn.destructive {
  color: var(--ios-red);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   OWNER DASHBOARD - iOS Settings Style
═══════════════════════════════════════ */
#owner-dashboard-screen {
  background: var(--ios-gray-bg);
  min-height: 100vh;
}

/* iOS-style navigation bar */
.owner-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 20px 16px;
  background: var(--ios-gray-bg);
  border-bottom: 0.5px solid var(--ios-separator);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.owner-nav-left h2 {
  font-size: 34px;
  font-weight: 700;
  color: var(--ios-text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.owner-nav-left .sub {
  font-size: 13px;
  color: var(--ios-gray);
  margin-top: 2px;
  font-weight: 400;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 199, 89, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ios-green);
  font-weight: 600;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ios-green);
  animation: pulse 2s infinite;
}

.owner-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logout-btn {
  font-size: 17px;
  color: var(--ios-blue);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 400;
  transition: opacity 0.2s;
}

.logout-btn:active {
  opacity: 0.4;
}

/* Owner Content Area */
.owner-body {
  padding: 20px 16px;
  max-width: 100%;
}

/* Stats Grid - iOS Card Style */
.owner-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.o-stat {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  text-align: center;
}

.o-stat .label {
  font-size: 13px;
  color: var(--ios-gray);
  margin-bottom: 8px;
  font-weight: 400;
}

.o-stat .value {
  font-size: 36px;
  font-weight: 600;
  color: var(--ios-text);
  line-height: 1;
  letter-spacing: -1px;
}

.o-stat .value.copper {
  color: var(--ios-blue);
}

.o-stat .value.green {
  color: var(--ios-green);
}

.o-stat .value.red {
  color: var(--ios-red);
}

.o-stat .sub {
  font-size: 13px;
  color: var(--ios-gray);
  margin-top: 6px;
  font-weight: 400;
}

/* Section Headers - iOS Style */
.o-section-title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ios-gray);
  margin-bottom: 8px;
  margin-top: 12px;
  margin-left: 16px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 16px;
  letter-spacing: -0.1px;
}

/* iOS Settings Card/List */
.o-card {
  background: var(--ios-card-bg);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px var(--ios-shadow);
  overflow: hidden;
}

/* Control Groups - Elevated Button Style */
.control-group {
  margin-bottom: 24px;
}

.control-group-label {
  font-size: 13px;
  color: var(--ios-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-left: 4px;
}

.control-btn {
  width: 100%;
  background: var(--ios-card-bg);
  border: none;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.control-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.control-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.control-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.control-btn.primary .control-btn-icon {
  background: linear-gradient(135deg, var(--ios-blue), #4A90E2);
  color: white;
}

.control-btn.danger .control-btn-icon {
  background: linear-gradient(135deg, var(--ios-red), #E85D5D);
  color: white;
}

.control-btn.warn .control-btn-icon {
  background: linear-gradient(135deg, var(--ios-orange), #FFB84D);
  color: white;
}

.control-btn-content {
  flex: 1;
  text-align: left;
}

.control-btn-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: 2px;
  letter-spacing: -0.4px;
}

.control-btn-desc {
  font-size: 13px;
  color: var(--ios-text-tertiary);
  font-weight: 400;
  line-height: 1.3;
}

/* Settings Rows - iOS List Style */
.o-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--ios-separator);
  gap: 16px;
  min-height: 56px;
}

.o-setting:last-child {
  border-bottom: none;
}

.o-setting-label {
  font-size: 17px;
  color: var(--ios-text);
  flex: 1;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.o-setting-desc {
  font-size: 13px;
  color: var(--ios-gray);
  margin-top: 2px;
  font-weight: 400;
}

.o-setting-val {
  background: var(--ios-gray-bg);
  border: 0.5px solid var(--ios-gray-light);
  border-radius: 8px;
  color: var(--ios-text);
  font-size: 17px;
  font-weight: 400;
  padding: 8px 12px;
  width: 70px;
  text-align: center;
  outline: none;
}

.o-setting-val:focus {
  border-color: var(--ios-blue);
  background: #FFFFFF;
}

/* iOS Toggle Switch */
.o-toggle {
  position: relative;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

.o-toggle input {
  display: none;
}

.o-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--ios-gray-bg2);
  border: none;
  border-radius: 15.5px;
  cursor: pointer;
  transition: all 0.3s;
}

.o-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
}

.o-toggle input:checked + .o-toggle-track {
  background: var(--ios-green);
}

.o-toggle input:checked + .o-toggle-track::after {
  transform: translateX(20px);
}

/* Input Fields - iOS Style */
.o-input {
  width: 100%;
  background: var(--ios-gray-bg);
  border: 0.5px solid var(--ios-gray-light);
  border-radius: 10px;
  color: var(--ios-text);
  font-size: 17px;
  padding: 12px 14px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.2s, background 0.2s;
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
  min-height: 50px;
  display: block;
}

.o-input:focus {
  border-color: var(--ios-blue);
  background: #FFFFFF;
}

.o-input[type="datetime-local"] {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  line-height: 1.4;
}

.o-input-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

.o-input-label {
  font-size: 13px;
  color: var(--ios-text);
  margin-bottom: 8px;
  margin-left: 2px;
  font-weight: 400;
}

@media (min-width: 768px) {
  .o-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
}

/* Generate Button */
.o-generate-btn {
  width: 100%;
  height: 50px;
  background: var(--ios-blue);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
  letter-spacing: -0.4px;
}

.o-generate-btn:active {
  background: var(--ios-blue-dark);
  transform: scale(0.98);
}

.o-save-btn {
  background: var(--ios-gray-bg2);
  color: var(--ios-blue);
}

.o-save-btn:active {
  background: var(--ios-gray-light);
}

/* Link Box - iOS Style */
.o-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ios-gray-bg);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: var(--ios-blue);
  cursor: pointer;
  word-break: break-all;
  margin-top: 12px;
  transition: background 0.2s;
  font-weight: 400;
}

.o-link-box:active {
  background: var(--ios-gray-bg2);
}

/* Activity Log - iOS List Style */
.o-log {
  display: flex;
  flex-direction: column;
}

.o-log-entry {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--ios-separator);
  font-size: 15px;
  align-items: flex-start;
}

.o-log-entry:last-child {
  border-bottom: none;
}

.o-log-ts {
  color: var(--ios-gray);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
}

.o-log-actor {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
}

.o-log-actor.guest {
  color: var(--ios-blue);
}

.o-log-actor.owner {
  color: var(--ios-green);
}

.o-log-actor.system {
  color: var(--ios-gray);
}

.o-log-msg {
  color: var(--ios-text-secondary);
  font-size: 15px;
  font-weight: 400;
}

/* ═══════════════════════════════════════
   RESPONSIVE - TABLET & DESKTOP
═══════════════════════════════════════ */

@media (min-width: 768px) {
  .app-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
  }

  .owner-body {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 20px;
  }

  .owner-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .owner-nav {
    padding: 60px 20px 20px;
  }

  .pin-box {
    width: 70px;
    height: 70px;
    font-size: 36px;
  }
}

@media (min-width: 1024px) {
  .app-content {
    max-width: 700px;
  }

  .owner-body {
    max-width: 900px;
  }
}

/* ═══════════════════════════════════════
   RESERVATIONS TABLE
═══════════════════════════════════════ */

.reservation-row {
  padding: 16px;
  border-bottom: 0.5px solid var(--ios-separator);
  background: var(--ios-card-bg);
}

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

.reservation-row.cancelled {
  opacity: 0.5;
}

.res-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.res-guest {
  flex: 1;
  min-width: 0;
}

.res-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--ios-text);
  margin-bottom: 4px;
}

.res-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ios-gray);
}

.res-phone {
  display: inline-block;
}

.res-pin {
  display: inline-block;
  background: var(--ios-gray-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--ios-blue);
}

.res-pin-missing {
  display: inline-block;
  background: var(--ios-gray-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--ios-gray);
}

.res-status {
  flex-shrink: 0;
}

.res-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.res-badge.active {
  background: rgba(52, 199, 89, 0.15);
  color: var(--ios-green);
}

.res-badge.upcoming {
  background: rgba(0, 122, 255, 0.15);
  color: var(--ios-blue);
}

.res-badge.expired {
  background: rgba(142, 142, 147, 0.15);
  color: var(--ios-gray);
}

.res-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ios-text-secondary);
}

.res-date-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.res-date-item i {
  color: var(--ios-gray);
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .res-dates {
    flex-direction: row;
    gap: 16px;
  }
}
