/* HostReady App Styles - matches landing page design language */
:root {
  --ink: #0a0f1a;
  --slate: #3d4663;
  --mist: #8892a8;
  --cloud: #e8ecf4;
  --snow: #f5f7fb;
  --mint: #00c896;
  --mint-deep: #00a67a;
  --mint-glow: rgba(0, 200, 150, 0.12);
  --amber: #f5a623;
  --red: #e5484d;
  --red-glow: rgba(229, 72, 77, 0.1);
}

/* ============ APP NAV ============ */
.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
}

.app-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.04);
}

.nav-link.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  font-size: 0.85rem;
  color: var(--slate);
  font-weight: 500;
}

.btn-logout {
  font-size: 0.8rem;
  color: var(--mist);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-logout:hover {
  color: var(--red);
  background: var(--red-glow);
}

/* ============ BUTTONS ============ */
.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  background: var(--mint);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: -0.2px;
}

.btn-primary:hover {
  background: var(--mint-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 200, 150, 0.25);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  background: white;
  border: 1px solid var(--cloud);
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--mist);
  background: var(--snow);
}

.btn-book {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: var(--mint);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-book:hover {
  background: var(--mint-deep);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.8rem !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: 6px !important;
}

.link-btn {
  font-size: 0.85rem;
  color: var(--mint-deep);
  text-decoration: none;
  font-weight: 500;
}

.link-btn:hover { text-decoration: underline; }

/* ============ MAIN LAYOUT ============ */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 2rem 3rem;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.page-desc {
  font-size: 0.95rem;
  color: var(--mist);
  width: 100%;
}

/* ============ AUTH ============ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--snow);
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--cloud);
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.auth-subtitle {
  color: var(--mist);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--snow);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mist);
  background: none;
  border: none;
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============ FORMS ============ */
.form-card {
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 2rem;
  max-width: 720px;
}

.form-card.inline-form {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.form-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--cloud);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

.field input,
.field select,
.field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--cloud);
  border-radius: 10px;
  background: var(--snow);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-glow);
  background: white;
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cloud);
}

.form-error {
  font-size: 0.85rem;
  color: var(--red);
  background: var(--red-glow);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: none;
}

.empty-inline {
  background: var(--snow);
  border: 1.5px dashed var(--cloud);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.empty-inline p {
  color: var(--mist);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ============ STATS GRID ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.stat-card.accent {
  border-color: var(--mint);
  background: linear-gradient(135deg, var(--mint-glow), rgba(255,255,255,0.5));
}

.stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -1px;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--mist);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ============ DASHBOARD ============ */
.dashboard-sections {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.dash-section {
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 1.5rem;
}

.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dash-section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* ============ JOB CARDS ============ */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.job-card {
  background: var(--snow);
  border: 1px solid var(--cloud);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}

.job-card:hover {
  border-color: var(--mist);
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.job-address {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.job-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.job-meta span {
  font-size: 0.78rem;
  color: var(--mist);
}

.job-type {
  font-weight: 500;
  color: var(--slate) !important;
}

.job-contractor {
  font-size: 0.8rem;
  color: var(--mint-deep);
  margin-top: 0.5rem;
  font-weight: 500;
}

.job-instructions {
  font-size: 0.8rem;
  color: var(--mist);
  margin-top: 0.35rem;
  font-style: italic;
}

.job-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cloud);
}

.btn-assign {
  color: var(--mint-deep) !important;
  background: var(--mint-glow) !important;
  border: none;
}

.btn-start {
  color: var(--amber) !important;
  background: rgba(245, 166, 35, 0.1) !important;
  border: none;
}

.btn-complete {
  color: white !important;
  background: var(--mint) !important;
  border: none;
}

/* Status badges */
.job-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.status-pending {
  color: var(--amber);
  background: rgba(245, 166, 35, 0.12);
}

.status-confirmed {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.status-active {
  color: var(--mint-deep);
  background: var(--mint-glow);
}

.status-completed {
  color: var(--slate);
  background: var(--cloud);
}

.status-cancelled {
  color: var(--red);
  background: var(--red-glow);
}

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--snow);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--cloud);
  width: fit-content;
}

.filter-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mist);
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-tab:hover:not(.active) {
  color: var(--slate);
}

/* ============ PROPERTIES ============ */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.property-card {
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.property-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.property-type-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--mint-deep);
  background: var(--mint-glow);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.property-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

.property-location {
  font-size: 0.85rem;
  color: var(--mist);
  margin-bottom: 0.75rem;
}

.property-details {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--slate);
  font-weight: 500;
}

/* ============ CONTRACTORS ============ */
.contractors-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contractor-card {
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s;
}

.contractor-card:hover {
  border-color: var(--mist);
}

.contractor-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--mint-glow);
  color: var(--mint-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contractor-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.contractor-email,
.contractor-phone {
  font-size: 0.8rem;
  color: var(--mist);
}

.contractor-status {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.contractor-status.status-active {
  color: var(--mint-deep);
  background: var(--mint-glow);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 26, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: -0.3px;
}

.contractor-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.contractor-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--snow);
  border: 1.5px solid var(--cloud);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.15s;
}

.contractor-option:hover {
  border-color: var(--mint);
  background: var(--mint-glow);
}

.contractor-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--mint-glow);
  color: var(--mint-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-close {
  width: 100%;
}

/* ============ EMPTY STATES ============ */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--mist);
  font-size: 0.9rem;
}

.empty-state.full {
  background: white;
  border: 1.5px dashed var(--cloud);
  border-radius: 16px;
  padding: 3rem 2rem;
  grid-column: 1 / -1;
}

.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.empty-state a {
  color: var(--mint-deep);
  text-decoration: none;
  font-weight: 500;
}

.empty-state a:hover { text-decoration: underline; }

.loading-placeholder {
  text-align: center;
  padding: 1.5rem;
  color: var(--mist);
  font-size: 0.85rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .app-nav { padding: 0 1rem; }
  .app-nav .nav-inner { gap: 0.5rem; }
  .nav-links { display: none; }
  .app-main { padding: 80px 1rem 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-sections { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-actions { flex-direction: column; }
  .form-actions button { width: 100%; }

  /* Mobile nav drawer */
  .nav-right { gap: 0.5rem; }
  .user-name { display: none; }
}

/* Mobile nav bottom bar */
@media (max-width: 768px) {
  .app-nav .nav-links {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--cloud);
    padding: 0.5rem;
    justify-content: center;
    gap: 0;
    z-index: 100;
  }
  .nav-link {
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem;
    text-align: center;
    flex: 1;
  }
  .app-main { padding-bottom: 5rem; }
}
