/* ---------- Tinker Design System ----------
 * Heavily-reused UI primitives shared across the CRM and any embedded
 * surfaces (e.g. user-authored Custom Pages rendered in iframes).
 * Keep this file dependency-free and self-contained so it can be loaded
 * in isolation.
 */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f3f3f3;
    color: #1f2d3d;
}

a { color: inherit; text-decoration: none; }

/* ---------- Headings ---------- */
h1 { font-size: 22px; font-weight: 600; color: #1f2d3d; margin: 0 0 12px; }
h2 { font-size: 18px; font-weight: 600; color: #1f2d3d; margin: 20px 0 10px; }
h3 { font-size: 15px; font-weight: 600; color: #1f2d3d; margin: 16px 0 8px; }

/* ---------- Buttons ---------- */
.btn {
    padding: 7px 14px;
    background: #0070d2;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #0070d2;
    cursor: pointer;
    transition: opacity 0.12s ease, background-color 0.12s ease;
}
.btn:hover { opacity: 0.88; }
.btn-secondary {
    background: #fff;
    color: #1f2d3d;
    border-color: #d8d8d8;
}
.btn-secondary:hover {
    opacity: 1;
    background: #f3f4f6;
}

/* ---------- Card ---------- */
.card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}
.card-padded { padding: 20px; }
.card-padded > :first-child { margin-top: 0; }
.card-padded > :last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
thead th {
    text-align: left;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
}
tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #4b5563;
    font-weight: 400;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

/* ---------- Pills ---------- */
.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #eef3f8;
    color: #2d5680;
}
.pill.green { background: #e6f4ea; color: #1e6b3a; }
.pill.amber { background: #fef3c7; color: #92560a; }
.pill.red   { background: #fde2e2; color: #a3271e; }
.pill.gray  { background: #eceef0; color: #5e6470; }

/* ---------- Mono / inline code ---------- */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: #2d5680;
}

/* ---------- Row link (first column in tables) ---------- */
.row-link { color: #0070d2; }
.row-link:hover { text-decoration: underline; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}
.breadcrumb a { color: #0070d2; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Tinker page wrapper (used by <tinker:page>) ---------- */
.tinker-page-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}
.tinker-page-wrapper > :first-child { margin-top: 0; }

/* ---------- Notice / inline alert ---------- */
.notice {
    padding: 10px 14px;
    background: #fff7e6;
    border: 1px solid #fde2b8;
    border-radius: 6px;
    font-size: 13px;
    color: #8a5a00;
    margin-bottom: 16px;
}
