/* ==== BMFSE CRM – Minimal App Styles ==== */

/* Base */
:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #111827;
  --accent: #0ea5e9;
  --accent-2: #0369a1;
  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #dc2626;
  --shadow: 0 6px 20px rgba(0,0,0,.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

/* Layout */
.wrapper {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  margin: 16px 0;
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.header img.logo { height: 40px; width: auto; }
.header h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}

/* Text utils */
.muted { color: var(--muted); }
.mt { margin-top: 12px !important; }
.small { font-size: 12px; }

/* Grid-ish rows */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}
.row > * { flex: 0 1 auto; }

/* Forms */
label { font-weight: 600; margin-right: 8px; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  min-width: 220px;
  outline: none;
}
textarea { min-height: 80px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }

/* Fieldset sections */
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
  background: #fff;
}
legend {
  padding: 0 8px;
  font-weight: 700;
  color: var(--brand);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .02s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
.btn:hover { background: #f3f4f6; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #111; }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.pill.ok { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.pill.warn { color: #7c2d12; background: #fffbeb; border-color: #fde68a; }
.pill.bad { color: #991b1b; background: #fef2f2; border-color: #fecaca; }

/* Tables (if used) */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-weight: 700; }

/* Links */
a { color: var(--accent-2); }
a.link { text-decoration: none; border-bottom: 1px dashed var(--accent-2); }
a.link:hover { border-bottom-style: solid; }

/* Footer note */
.footer-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 720px) {
  .wrapper { margin: 18px auto; }
  .row { gap: 8px; }
  input, select { min-width: 160px; }
}

/* Print-friendly buttons hidden */
@media print { .btn, .pill { display: none !important; } }
