/* Agent portal — base styles (no Bootstrap here), then the same ac-* design as the Teampace plugin. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #f5f5f7; color: #1d1d1f; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: #0071e3; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; }
.acp-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; background: rgba(255,255,255,0.9); border-bottom: 1px solid #e8e8ed; position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(20px); }
.acp-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #1d1d1f; }
.acp-user { display: flex; gap: 14px; align-items: center; text-align: right; }
.acp-user form { margin: 0; }
.acp-main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.acp-login { max-width: 460px; margin: 60px auto; }
.acp-login .ac-page-title { margin-bottom: 10px; }
.acp-wide { width: 100%; justify-content: center; padding: 12px 18px; font-size: 15px; }
.acp-row { display: flex; gap: 8px; align-items: center; }
.acp-wrap { flex-wrap: wrap; }
.acp-between { justify-content: space-between; flex-wrap: wrap; }
.acp-right { text-align: right; }
.acp-center { text-align: center; }
.acp-narrow { max-width: 200px; }
.acp-radio { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; cursor: pointer; }
.form-control { display: block; width: 100%; border-radius: 10px; border: 1px solid #e8e8ed; background: #fbfbfd; font: inherit; padding: 9px 12px; color: inherit; }
.form-control:focus { outline: none; border-color: #0071e3; background: #fff; box-shadow: 0 0 0 3.5px #e8f1fd; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
button { font: inherit; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 22px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 22px; } .pb-0 { padding-bottom: 0 !important; }
@media (max-width: 640px) { .acp-header { padding: 12px 14px; } .acp-main { padding: 16px 10px 40px; } .ac-stat-value { font-size: 20px; } }

:root {
    --ac-accent: #0071e3; --ac-accent-subtle: #e8f1fd;
    --ac-green: #1d8e3f; --ac-green-light: #e3f9e9;
    --ac-orange: #b96a00; --ac-orange-light: #fff3e0;
    --ac-red: #d70015; --ac-red-light: #ffe5e5;
    --ac-purple: #7c3aed; --ac-purple-light: #f0ebfc;
    --ac-ink: #1d1d1f; --ac-muted: #6e6e73; --ac-faint: #a1a1a6;
    --ac-border: #e8e8ed; --ac-surface: #fff; --ac-surface-2: #fbfbfd;
    --ac-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --ac-radius: 14px; --ac-radius-sm: 10px; --ac-t: 0.18s cubic-bezier(0.4,0,0.2,1);
    --ac-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
.ac-wrap { font-family: var(--ac-font); letter-spacing: -0.01em; }
.ac-card { background: var(--ac-surface); border-radius: var(--ac-radius); box-shadow: var(--ac-shadow); overflow: hidden; margin-bottom: 20px; border: 1px solid rgba(0,0,0,0.02); }
.ac-card-body { padding: 20px 24px; }
.ac-page-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--ac-border); flex-wrap: wrap; gap: 12px; }
.ac-page-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--ac-ink); margin: 0; }
.ac-page-title svg { width: 20px; height: 20px; color: var(--ac-accent); }
.ac-section-title { font-size: 15px; font-weight: 650; color: var(--ac-ink); margin: 0; }
.ac-actions-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* nav */
.ac-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.ac-nav a { padding: 8px 15px; border-radius: 980px; font-size: 13.5px; font-weight: 500; color: var(--ac-muted); text-decoration: none; }
.ac-nav a:hover { background: rgba(0,0,0,0.05); color: var(--ac-ink); }
.ac-nav a.active { background: var(--ac-accent); color: #fff; }

/* stats */
.ac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ac-stat { background: var(--ac-surface); border-radius: var(--ac-radius); padding: 18px; box-shadow: var(--ac-shadow); display: flex; gap: 14px; align-items: flex-start; text-decoration: none !important; color: inherit !important; }
a.ac-stat:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.10); }
.ac-stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.ac-stat-icon svg { width: 20px; height: 20px; }
.ac-stat-icon.blue { background: var(--ac-accent-subtle); color: var(--ac-accent); }
.ac-stat-icon.green { background: var(--ac-green-light); color: var(--ac-green); }
.ac-stat-icon.orange { background: var(--ac-orange-light); color: var(--ac-orange); }
.ac-stat-icon.purple { background: var(--ac-purple-light); color: var(--ac-purple); }
.ac-stat-icon.red { background: var(--ac-red-light); color: var(--ac-red); }
.ac-stat-label { font-size: 12px; color: var(--ac-muted); font-weight: 500; margin-bottom: 4px; }
.ac-stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--ac-ink); line-height: 1.15; }
.ac-stat-sub { font-size: 12px; color: var(--ac-faint); margin-top: 3px; }

/* buttons */
.ac-btn, .ac-btn-outline, .ac-btn-danger, .ac-btn-success { display: inline-flex; align-items: center; gap: 6px; border-radius: 980px; padding: 8px 16px; font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none !important; border: 1px solid transparent; line-height: 1.1; transition: all var(--ac-t); white-space: nowrap; }
.ac-btn { background: var(--ac-accent); color: #fff !important; }
.ac-btn:hover { background: #0077ed; }
.ac-btn-success { background: var(--ac-green); color: #fff !important; }
.ac-btn-danger { background: var(--ac-surface); color: var(--ac-red) !important; border-color: #f3c2c7; }
.ac-btn-danger:hover { background: var(--ac-red-light); }
.ac-btn-outline { background: var(--ac-surface); color: var(--ac-ink) !important; border-color: var(--ac-border); }
.ac-btn-outline:hover { background: var(--ac-surface-2); }
.ac-btn svg, .ac-btn-outline svg, .ac-btn-danger svg, .ac-btn-success svg { width: 15px; height: 15px; }
.ac-btn-sm { padding: 5px 11px; font-size: 12.5px; }
.ac-btn[disabled], .ac-btn-outline[disabled] { opacity: 0.5; pointer-events: none; }

/* tables */
.ac-table-wrap { overflow-x: auto; }
.ac-table { width: 100%; border-collapse: collapse; }
.ac-table thead th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ac-faint); padding: 11px 16px; border-bottom: 1px solid var(--ac-border); white-space: nowrap; }
.ac-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--ac-border); font-size: 13.5px; vertical-align: middle; }
.ac-table tbody tr:hover { background: var(--ac-surface-2); }
.ac-table tbody tr:last-child td { border-bottom: none; }
.ac-table tfoot td { padding: 12px 16px; font-weight: 650; border-top: 2px solid var(--ac-border); }
.ac-table .num, .ac-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-neg { color: var(--ac-red); }
.ac-name { font-weight: 600; color: var(--ac-ink); }
.ac-sub { font-size: 12px; color: var(--ac-muted); margin-top: 1px; }
.ac-row-actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }

/* badges + notices */
.ac-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 980px; display: inline-block; white-space: nowrap; }
.ac-badge.green { background: var(--ac-green-light); color: var(--ac-green); }
.ac-badge.blue { background: var(--ac-accent-subtle); color: var(--ac-accent); }
.ac-badge.orange { background: var(--ac-orange-light); color: var(--ac-orange); }
.ac-badge.red { background: var(--ac-red-light); color: var(--ac-red); }
.ac-badge.purple { background: var(--ac-purple-light); color: var(--ac-purple); }
.ac-badge.grey { background: #f0f0f2; color: var(--ac-muted); }
.ac-notice { border-radius: var(--ac-radius-sm); padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px; }
.ac-notice.info { background: var(--ac-accent-subtle); color: #0a4a8f; }
.ac-notice.warn { background: var(--ac-orange-light); color: #7a4600; }
.ac-notice.error { background: var(--ac-red-light); color: #8d000e; }
.ac-notice.ok { background: var(--ac-green-light); color: #145626; }
.ac-empty { text-align: center; padding: 44px 20px; color: var(--ac-muted); font-size: 14px; }

/* key/value + filters */
.ac-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; }
.ac-kv .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ac-faint); font-weight: 600; }
.ac-kv .v { font-size: 14px; color: var(--ac-ink); margin-top: 2px; }
.ac-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 24px; border-bottom: 1px solid var(--ac-border); background: var(--ac-surface-2); }
.ac-filters label { font-size: 11.5px; font-weight: 600; color: var(--ac-muted); display: block; margin-bottom: 3px; }
.ac-filters .form-control, .ac-filters select { min-width: 140px; height: 36px; padding: 6px 10px; font-size: 13px; }
.ac-pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 12px 24px; font-size: 13px; color: var(--ac-muted); }
.ac-help { font-size: 12.5px; color: var(--ac-muted); margin-top: 4px; }
.ac-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ac-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
@media (max-width: 900px) { .ac-grid-2 { grid-template-columns: 1fr; } .ac-stats { grid-template-columns: 1fr 1fr; } }

/* agent portal */
.ac-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 24px; }
.ac-hero .big { font-size: 34px; font-weight: 750; letter-spacing: -0.04em; color: var(--ac-ink); }
.ac-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ac-border); padding: 0 16px; overflow-x: auto; }
.ac-tabs a { padding: 13px 14px; font-size: 13.5px; font-weight: 550; color: var(--ac-muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.ac-tabs a.active { color: var(--ac-accent); border-bottom-color: var(--ac-accent); }
.ac-timeline { font-size: 12px; color: var(--ac-muted); }

/* printable statement */
@media print {
    body * { visibility: hidden; }
    .ac-print, .ac-print * { visibility: visible; }
    .ac-print { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
    .ac-no-print { display: none !important; }
}
