/* ============================================
   Aim High Systems — Shared Stylesheet
   Edit the variables below to rebrand instantly.
   ============================================ */

:root {
  /* Brand */
  --brand-primary: #1B4F8B;
  --brand-primary-dark: #0F3A6B;
  --brand-primary-darker: #0A2A50;
  --brand-primary-light: #E8F0F9;
  --brand-primary-lighter: #F4F8FC;
  --brand-accent: #2E6FB5;

  /* Neutrals */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Status */
  --status-success: #0F6E56;
  --status-success-bg: #E1F5EE;
  --status-warning: #BA7517;
  --status-warning-bg: #FAEEDA;
  --status-danger: #A32D2D;
  --status-danger-bg: #FCEBEB;

  /* Layout */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html, body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-size: 14px; font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-primary);
  color: white;
}
.btn-primary:hover { background: var(--brand-primary-dark); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-weight: 500;
}
.btn-secondary:hover { background: var(--bg-secondary); border-color: var(--text-tertiary); color: var(--text-primary); }
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover { background: var(--bg-secondary); }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ===== Logo ===== */
.logo-mark {
  width: 36px; height: 36px;
  background: var(--brand-primary);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Real PNG logo (replaces logo-mark + logo-wordmark when used together) */
.logo-img {
  height: 36px;
  width: auto;
  max-width: 240px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.logo-img-sm { height: 28px; max-width: 180px; }
.logo-img-lg { height: 52px; max-width: 320px; }

/* ===== Inputs ===== */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(27, 79, 139, 0.1);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ===== Status pills ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-not-started { background: var(--bg-tertiary); color: var(--text-secondary); }
.pill-not-started .pill-dot { background: var(--text-tertiary); }
.pill-in-progress { background: var(--brand-primary-light); color: var(--brand-primary-dark); }
.pill-in-progress .pill-dot { background: var(--brand-primary); }
.pill-complete { background: var(--status-success-bg); color: var(--status-success); }
.pill-complete .pill-dot { background: var(--status-success); }
.pill-blocked { background: var(--status-danger-bg); color: var(--status-danger); }
.pill-blocked .pill-dot { background: var(--status-danger); }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Topbar (used in app pages) ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ===== Utilities ===== */
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.font-medium { font-weight: 500; }
.font-display { font-family: var(--font-display); }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.15s ease; }
.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-lg { max-width: 700px; }
.modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.25s;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Loading spinner ===== */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .topbar-inner { padding: 12px 16px; }
  .hide-mobile { display: none !important; }
}
