/*
 * VTO Xero Connection public pages (landing, /connect, /callback, /process).
 * Same orange + navy SaaS system as admin, but a centred single-card
 * layout (no sidebar) appropriate for office-facing flows.
 */

:root {
    --brand-primary:        #fe8400;
    --brand-primary-hover:  #e6780a;
    --brand-primary-muted:  rgba(254, 132, 0, 0.10);
    --brand-accent:         #0f172a;

    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --bg:       #f1f5f9;
    --surface:  #ffffff;
    --surface-2:#f8fafc;
    --border:   #e2e8f0;

    --success: #16a34a;
    --warning: #d97706;
    --danger:  #dc2626;

    --success-muted: rgba(22, 163, 74, 0.10);
    --danger-muted:  rgba(220, 38, 38, 0.10);
    --warning-muted: rgba(217, 119, 6, 0.10);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.06);
    --transition: all 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--slate-800);
    background: var(--bg);
    min-height: 100vh;
    padding: 2rem 1.5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-hover); text-decoration: underline; }

/* ── Single-card layout (landing / connect / callback) ───────────────── */

.main {
    max-width: 480px;
    margin: 4rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.25rem 2rem;
    text-align: center;
}

.main .brand-mark {
    color: var(--brand-primary);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--slate-500);
    margin: 0 0 1.25rem;
}

p {
    color: var(--slate-600);
    margin: 0.5rem 0;
}

.main p:last-of-type { margin-top: 1.5rem; }

/* ── Log feed (process page) ─────────────────────────────────────────── */

.log {
    max-width: 760px;
    margin: 1.5rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
}

.log h4 {
    color: var(--slate-500);
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
}

.log h4:not(:first-of-type) {
    color: var(--brand-accent);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    margin-top: 1rem;
    padding-bottom: 0.4rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.2;
}

a.btn:hover,
button.btn:hover {
    background: var(--brand-primary-hover);
    color: white;
    text-decoration: none;
}

a.btn:focus-visible,
button.btn:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

button.btn.disabled,
button.btn[disabled] {
    background: var(--slate-300);
    color: white;
    cursor: not-allowed;
}

/* ── Error blocks (PDO connection failure HTML in Database.php) ──────── */

pre.error {
    background: var(--danger-muted);
    border-left: 3px solid var(--danger);
    color: var(--slate-800);
    padding: 1rem 1.25rem;
    margin: 1rem auto;
    max-width: 720px;
    font-family: 'IBM Plex Mono', 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
}
