/* CollHub - shared design tokens and base components (landing + app). */
:root {
    --paper: #f6f4ef;
    --surface: #ffffff;
    --surface-2: #faf9f6;
    --line: #e5e1d8;
    --line-strong: #d3cdc0;
    --ink: #1c2733;
    --ink-2: #3a4655;
    --muted: #6d7580;
    --primary: #1f6f8b;
    --primary-600: #185a71;
    --primary-50: #e8f2f5;
    --accent: #d9774b;
    --accent-50: #fbeee7;
    --success: #2e8b57;
    --success-50: #e7f4ec;
    --danger: #c0392b;
    --danger-50: #fbeaea;
    --warning: #d98e04;
    --warning-50: #fdf3dd;
    --info: #3b6fd6;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(28, 39, 51, .06), 0 1px 3px rgba(28, 39, 51, .08);
    --shadow: 0 4px 12px rgba(28, 39, 51, .08), 0 2px 4px rgba(28, 39, 51, .06);
    --shadow-lg: 0 18px 48px rgba(28, 39, 51, .18);
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-brand: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.brand-wordmark { font-family: var(--font-brand); font-weight: 700; letter-spacing: .2px; }

/* ---- Buttons: green confirm, red cancel/delete, orange navigate/export, blue neutral ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
    background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px;
    cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #26744a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a63024; }
.btn-warning { background: var(--accent); color: #fff; }
.btn-warning:hover { background: #c4663c; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(28, 39, 51, .06); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 12px 22px; font-size: 15.5px; border-radius: var(--radius); }
.btn-icon { padding: 7px; width: 34px; height: 34px; }

/* ---- Fields ---- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.field .form-text { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 111, 139, .15); }
.input:invalid.touched, .textarea:invalid.touched { border-color: var(--danger); }
.textarea { resize: vertical; min-height: 70px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }

/* ---- Toasts ---- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
    background: var(--ink); color: #fff; border-radius: var(--radius); padding: 11px 14px; box-shadow: var(--shadow-lg);
    display: flex; gap: 10px; align-items: flex-start; animation: toast-in .18s ease-out; cursor: pointer;
}
.toast i { margin-top: 2px; }
.toast .toast-title { font-weight: 700; }
.toast .toast-body { opacity: .85; font-size: 13px; }
.toast.is-success { background: #1f6b44; }
.toast.is-error { background: #9c2c21; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
