:root {
    /* unified with the Zarf theme tokens (see zarf-theme.css) */
    --brand: #1C8FD0;
    --brand-dark: #1676ad;
    --accent: #EC5428;
}

body {
    font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
    background-color: #F4FAFF;
}

.bg-brand { background-color: var(--brand); }

.hero {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: .75rem;
}

.service-card { transition: transform .15s ease, box-shadow .15s ease; }
.service-card:hover, .service-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12);
}
.service-card .bi { font-size: 2rem; color: var(--brand); }

.btn-brand { background-color: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover, .btn-brand:focus { background-color: var(--brand-dark); color: #fff; }
/* Beneficiary portal & chat widget */
.portal-tabs .nav-link.active { background-color: var(--brand); color: #fff; }

#chat-widget { position: fixed; bottom: 1rem; inset-inline-start: 1rem; z-index: 1050; }
#chat-widget .chat-panel {
    width: min(360px, calc(100vw - 2rem)); background: #fff; border-radius: .75rem;
    margin-bottom: .5rem; display: flex; flex-direction: column; max-height: 70vh; overflow: hidden;
}
#chat-widget .chat-panel[hidden] { display: none; }
.chat-head { background: var(--brand); color: #fff; padding: .6rem .9rem; display: flex; justify-content: space-between; align-items: center; }
.chat-body { padding: .75rem; overflow-y: auto; flex: 1; min-height: 160px; background: #f5f7f9; }
.chat-msg { padding: .5rem .75rem; border-radius: .75rem; margin-bottom: .5rem; max-width: 90%; white-space: pre-wrap; }
.chat-msg.bot { background: #fff; border: 1px solid #dde3e8; }
.chat-msg.me { background: var(--brand); color: #fff; margin-inline-start: auto; }
.chat-chips { padding: .4rem .5rem; display: flex; flex-wrap: wrap; gap: .3rem; border-top: 1px solid #eee; }
.chat-chip { border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 1rem; padding: .1rem .6rem; font-size: .8rem; }
.chat-chip:hover { background: var(--brand); color: #fff; }
.chat-form { display: flex; gap: .4rem; padding: .5rem; border-top: 1px solid #eee; }

/* Print forms */
.print-sheet { background: #fff; }
.device-grid th, .device-grid td { font-size: .75rem; padding: .2rem; }
.terms-list li { margin-bottom: .15rem; }
@media print {
    header, footer, #chat-widget, .no-print, .visually-hidden-focusable { display: none !important; }
    body { background: #fff !important; font-size: 11pt; }
    main { padding: 0 !important; }
    .container { max-width: 100% !important; padding: 0 !important; }
    .print-sheet { page-break-inside: avoid; }
    .table-light { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
