/* FRUIT: papaya */
/* YC Test App - Shared Styles */
/* - Job cards with pending requests get red border + "Action Needed" badge (2026-03-26) */
/* - Highlights claim requests, parts requests, and info requests */
/* - Increased badge size for better visibility (2026-03-26) */

/* Theme variables */
:root {
  --bg: #eef2f7;
  --card-bg: #ffffff;
  --primary: #c62828;
  --primary-dark: #8e0000;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-light: #d0d7de;
  --pile-header-bg: #111827;
  --pile-header-text: #f9fafb;
  --pile-button-collapsed: #c62828;
  --pile-button-expanded: #8e0000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #e5e7eb 0, #f9fafb 40%, #ffffff 100%);
  color: var(--text-main);
  font-size: 18px;
}

/* App header / nav */

.app-header {
  background-color: var(--primary);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.app-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-nav span {
  font-size: 1rem;
  opacity: 0.9;
}

.app-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
}

.app-nav a:hover {
  text-decoration: underline;
}

/* Layout container */

.app-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 14px 32px;
}

/* Generic card */

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 20px 18px 24px;
  margin-bottom: 22px;
}

.card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

/* Forms */

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

.form-field label {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 1.05rem;
  background-color: #ffffff;
}

/* Buttons */

.button-primary {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 1.0rem;
  cursor: pointer;
  margin-right: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.button-primary:hover {
  background-color: var(--primary-dark);
}

.button-secondary {
  display: inline-block;
  background-color: #f9fafb;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 6px;
  margin-bottom: 6px;
}

.button-secondary:hover {
  background-color: #e5e7eb;
}

/* Column layout (Jobs piles) */

.columns {
  display: flex;
  flex-direction: column; /* always stack piles vertically */
  gap: 18px;
}

.column {
  flex: 1 1 100%;
}

/* Pile wrapper (vertical stacks) */

.pile {
  background: radial-gradient(circle at top left, #f9fafb 0, #f3f4f6 45%, #e5e7eb 100%);
  border-radius: 16px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 4px 10px rgba(15, 23, 42, 0.05);
  padding: 10px 10px 12px;
}

/* Pile header with toggle */

.pile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 1.05rem;
  background: linear-gradient(90deg, #111827, #1f2937);
  color: var(--pile-header-text);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.35);
  cursor: pointer;
}

.pile-header.has-requests {
  background: linear-gradient(90deg, #7f1d1d, #b91c1c);
  border: 1px solid #fee2e2;
}

.job-card.has-requests {
  border: 2px solid #dc2626;
  background-color: #fef2f2;
  position: relative;
}

.job-card.has-requests::before {
  content: 'âš ï¸ Action Needed';
  position: absolute;
  top: -10px;
  right: 10px;
  background: #dc2626;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.pile-toggle-btn {
  padding: 7px 12px;
  font-size: 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  color: #ffffff;
  min-width: 52px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.35);
}

.pile-toggle-btn.collapsed {
  background-color: var(--pile-button-collapsed);
}

.pile-toggle-btn.expanded {
  background-color: var(--pile-button-expanded);
}

/* Job cards */

.job-card {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 10px 10px;
  margin-bottom: 10px;
  background-color: #ffffff;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.04);
}

.job-card:hover {
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.10),
    0 3px 8px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.job-card h4 {
  margin: 0 0 4px 0;
  font-size: 1.0rem;
}

.job-card small {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.job-card small.pending-label {
  color: #c62828;
  font-weight: 600;
}

/* Optional header/meta rows within job cards */

.job-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.job-card-header .customer-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.job-card-header .job-type-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: #e5e7eb;
  color: #374151;
}

.job-card-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.job-card-meta span + span::before {
  content: "â€¢";
  margin: 0 4px;
  color: #9ca3af;
}

/* Action buttons row in job cards */

.job-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Little status / count bubbles (for HW, keys, etc.) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fee2e2;
}

.badge-muted {
  background-color: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

/* Phone icon (calls/tasks) */

.phone-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  margin-left: 8px;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.3);
}

.phone-icon span {
  line-height: 1;
}

.phone-icon.has-tasks {
  border-color: #b00020;
}

.phone-icon.has-tasks::after {
  content: '!';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #b00020;
  color: #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Top-right bubble notifications */

.bubble {
  position: fixed;
  top: 16px;
  right: 16px;
  background-color: #e3f2fd;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-size: 1rem;
}

/* Responsive tweaks */

@media (max-width: 1024px) {
  body {
    font-size: 19px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .app-header h1 {
    font-size: 1.35rem;
  }

  .app-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .app-nav span {
    width: 100%;
  }

  .card {
    padding: 18px 14px 20px;
  }

  .button-primary {
    width: 100%;
    text-align: center;
  }

  .bubble {
    left: 12px;
    right: 12px;
  }
}