/* Southern Skies CRM — light theme, navy + gold. Mobile-first. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f6f9;
  color: #1c2733;
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--primary, #1B2A4A); }
a:hover { text-decoration: underline; }

.app-header {
  background: #fff;
  border-bottom: 3px solid var(--accent, #C9A227);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; }
.brand-name { font-size: 1.25rem; font-weight: 700; color: var(--primary, #1B2A4A); }
.brand-tagline { font-size: 0.85rem; color: #6b7684; font-style: italic; }
.brand-contact { display: flex; flex-direction: column; text-align: right; font-size: 0.9rem; }
.brand-contact a { color: var(--primary, #1B2A4A); text-decoration: none; }

.main-nav {
  background: var(--primary, #1B2A4A);
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.main-nav a {
  color: #dfe5ee;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.main-nav a.active { background: var(--accent, #C9A227); color: #1B2A4A; font-weight: 600; }
.nav-user { margin-left: auto; color: #aeb8c6; font-size: 0.85rem; }
.nav-user a { color: #fff; padding: 0; }

.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.app-footer { text-align: center; color: #8a94a3; font-size: 0.85rem; padding: 1.5rem 0 2rem; }

h1 { font-size: 1.5rem; color: var(--primary, #1B2A4A); margin: 0.25rem 0 0.75rem; }
h2 { font-size: 1.15rem; color: var(--primary, #1B2A4A); margin: 0 0 0.6rem; }
h3 { font-size: 1rem; margin: 0.75rem 0 0.5rem; }
.muted { color: #6b7684; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 0.1rem; }

.card {
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.section h2 { border-bottom: 2px solid #eef1f5; padding-bottom: 0.4rem; }
.sub-block { border: 1px solid #eef1f5; border-radius: 8px; padding: 0.6rem; margin-bottom: 0.6rem; }

.summary-strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  background: #fff; border: 1px solid #e2e7ee; border-left: 4px solid var(--accent, #C9A227);
  border-radius: 8px; padding: 0.6rem 1rem; margin-bottom: 1rem; font-size: 0.95rem;
}

.alert { padding: 0.7rem 1rem; border-radius: 8px; margin: 0.5rem 0 1rem; }
.alert.error { background: #fdecea; color: #8f1d16; border: 1px solid #f5c6c0; }
.alert.ok { background: #e6f4ea; color: #1e6b34; border: 1px solid #b7dfc2; }

/* forms */
.form label, .card.form label { display: block; margin-bottom: 0.75rem; font-weight: 600; font-size: 0.95rem; }
.form input, .form select, .form textarea,
.inline-form input, .inline-form select {
  display: block; width: 100%; margin-top: 0.25rem;
  padding: 0.55rem 0.65rem; font-size: 1rem;
  border: 1px solid #c9d2dd; border-radius: 6px; background: #fff; color: #1c2733;
}
.form textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.check input { width: auto; }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin: 0.35rem 0.35rem 0.35rem 0; }
.inline-form input, .inline-form select { width: auto; display: inline-block; padding: 0.45rem 0.55rem; }
.inline-form input[type="file"] { max-width: 220px; }

.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-bar input, .filter-bar select {
  padding: 0.55rem 0.65rem; font-size: 1rem; border: 1px solid #c9d2dd; border-radius: 6px;
}
.filter-bar input { flex: 1 1 220px; }

/* buttons */
.btn {
  display: inline-block; padding: 0.55rem 1rem; border-radius: 6px;
  border: 1px solid #c9d2dd; background: #fff; color: var(--primary, #1B2A4A);
  font-size: 0.95rem; cursor: pointer; text-decoration: none; font-weight: 600;
}
.btn:hover { background: #eef1f5; text-decoration: none; }
.btn.primary { background: var(--primary, #1B2A4A); color: #fff; border-color: var(--primary, #1B2A4A); }
.btn.primary:hover { background: #26395f; }
.btn.small { padding: 0.35rem 0.6rem; font-size: 0.85rem; }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e2e7ee; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid #eef1f5; }
.table th { background: #f7f9fb; color: var(--primary, #1B2A4A); }
.table tr:last-child td { border-bottom: none; }

/* kanban */
.kanban { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; align-items: flex-start; }
.kanban-col {
  flex: 0 0 270px; background: #e9edf2; border-radius: 10px; padding: 0.6rem; min-height: 120px;
}
.kanban-col h2 { font-size: 1rem; margin: 0; }
.stage-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 0.3rem; }
.kanban-col .count { background: #fff; border-radius: 999px; padding: 0 0.5rem; font-size: 0.85rem; }
.col-total { font-weight: 700; color: var(--primary, #1B2A4A); font-size: 0.9rem; margin: 0.25rem 0 0.6rem; }
.kanban-card {
  background: #fff; border: 1px solid #dbe1e8; border-left: 4px solid var(--accent, #C9A227);
  border-radius: 8px; padding: 0.6rem; margin-bottom: 0.6rem; cursor: grab;
}
.card-title { font-weight: 700; display: block; margin-bottom: 0.2rem; }
.card-meta { font-size: 0.85rem; color: #6b7684; }
.kanban-card select { font-size: 0.85rem; padding: 0.3rem; margin-top: 0.4rem; width: 100%; }

/* checklists, badges, photos */
.checklist { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.checklist li { padding: 0.45rem 0; border-bottom: 1px solid #eef1f5; display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.checklist li.done { color: #6b7684; text-decoration: line-through; }
.checklist li.done .badge { text-decoration: none; }
.badge {
  display: inline-block; background: #eef1f5; color: var(--primary, #1B2A4A);
  border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.8rem; font-weight: 600;
}
.badge.due { background: #fdf0d5; color: #7a4a00; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.photo-thumb { margin: 0; }
.photo-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid #e2e7ee; display: block; }
.photo-thumb figcaption { font-size: 0.85rem; margin-top: 0.3rem; }

ul { padding-left: 1.25rem; }
ul li { margin-bottom: 0.3rem; }

@media (max-width: 640px) {
  .brand-contact { display: none; }
  .brand-name { font-size: 1.05rem; }
  .container { padding: 0.75rem; }
  .kanban-col { flex-basis: 240px; }
  .inline-form input[type="file"] { max-width: 100%; }
}

/* In-app camera (photos stay out of the camera roll) */
.cam-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cam-box { background: #fff; border-radius: 10px; padding: 16px; max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; }
.cam-box video, .cam-box img { width: 100%; border-radius: 8px; background: #000; }
.cam-error { color: #b3261e; }
