body[data-portal="finance"] { --header-bg: #065f46; --nav-bg: #d1fae5; --nav-fg: #065f46; --page-bg: #f7fdfa; --accent: #065f46; --accent-hover: #054c39; }
body[data-portal="supplier"] { --header-bg: #4338ca; --nav-bg: #e0e7ff; --nav-fg: #312e81; --page-bg: #f8f8ff; --accent: #4338ca; --accent-hover: #372ea8; }
body[data-portal="auth"] { --header-bg: #4338ca; --nav-bg: #e0e7ff; --nav-fg: #312e81; --page-bg: #f4f4f4; --accent: #4338ca; --accent-hover: #372ea8; }
body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: var(--page-bg); }
.portal-header { background: var(--header-bg); color: #fff; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.portal-header h1 { font-size: 1.1rem; margin: 0; font-weight: 700; }
.portal-header .auth-bar { color: #fff; font-size: 0.85rem; float: none; }
.portal-header .auth-bar a { color: #fff; }
.portal-header .auth-bar button { background: transparent; border: 1px solid #fff; color: #fff; border-radius: 4px; padding: 0.2rem 0.5rem; cursor: pointer; }
.portal-nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; align-items: center; padding: 0.75rem 2rem; background: var(--nav-bg); font-size: 0.9rem; }
.portal-nav a { margin-right: 0; color: var(--nav-fg); text-decoration: none; font-weight: 600; }
.portal-nav a:hover { text-decoration: underline; }
.portal-nav a.active { font-weight: 800; text-decoration: underline; }
main { padding: 2rem; }
.flash-list { list-style: none; margin: 0 0 1.25rem; padding: 0.75rem 1rem; background: #fdecea; border-left: 3px solid #b00020; border-radius: 6px; color: #b00020; font-size: 0.85rem; }
form.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1.5rem; }
form.filters label { display: flex; flex-direction: column; font-size: 0.8rem; color: #555; }
form.filters input, form.filters select { padding: 0.3rem; }
.metrics { display: flex; flex-wrap: wrap; gap: 2rem; margin-bottom: 1.5rem; }
.metrics div { background: #fff; border: 1px solid #e5e7eb; padding: 0.75rem 1.25rem; border-radius: 6px; }
.metrics .value { font-size: 1.3rem; font-weight: bold; }
table { border-collapse: collapse; width: 100%; margin-bottom: 2rem; }
th, td { border: 1px solid #ddd; padding: 0.4rem 0.6rem; text-align: left; font-size: 0.85rem; }
th { background: #f4f4f4; }
.num, .text-right { text-align: right; }
.btn-primary { padding: 0.55rem 1.1rem; background: var(--accent); color: #fff; font-size: 0.9rem; font-weight: 600; border-radius: 6px; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { padding: 0.35rem 0.75rem; font-size: 0.8rem; font-weight: 600; border-radius: 6px; border: 1px solid #d5d5d5; background: #fff; color: #1a1a1a; cursor: pointer; text-decoration: none; }
.status-pill, .pill { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.status-awaiting, .status-recorded { background: #eee; color: #555; }
.status-warn, .status-generated { background: #fff3cd; color: #8a6300; }
.status-danger { background: #fde2e2; color: #b00020; }
.status-ok, .type-income { background: #e2f7e6; color: #1a7a34; }
.type-expense { background: #fdecea; color: #b00020; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; }
.modal-overlay[hidden] { display: none; }
.modal-card, .modal { background: #fff; border-radius: 8px; padding: 1.5rem; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-wide { max-width: 90vw; overflow: auto; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: -0.5rem 0 1.5rem; font-size: 0.85rem; color: #555; }
.empty-state { color: #555; padding: 1rem 0; }
