/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* CERM M3 brand palette */
    --c-primary:       #179e90;   /* CERM M3 teal — CTA buttons, links */
    --c-primary-dark:  #0f7a6e;   /* hover */
    --c-primary-light: #e0f5f3;   /* light teal tint */
    --c-navy:          #0d2e2e;   /* CERM M3 dark teal */
    --c-navy-light:    #1a4747;   /* slightly lighter for hover states */

    --c-danger:        #c0392b;
    --c-danger-light:  #fdf0ef;
    --c-warning:       #e67e22;
    --c-success:       #27ae60;
    --c-teal:          #0d8a7a;   /* Company-type roles (distinct from primary) */

    --border:          #d8e4e4;
    --header-bg:       var(--c-navy);
    --text:            #0d2e2e;
    --text-muted:      #547070;
    --bg:              #eef4f4;
    --bg-card:         #ffffff;
    --font:            -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius:          6px;
    --shadow-sm:       0 1px 4px rgba(13,46,46,0.08);
    --shadow-md:       0 4px 16px rgba(13,46,46,0.12);
}

body {
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────── */
header {
    background: var(--header-bg);
    color: #fff;
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.header-brand:hover { color: #ffffff; }
.header-brand img {
    height: 22px;
    width: auto;
    flex-shrink: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: #d1dce8;
    font-size: 12px;
}

.badge-admin {
    background: var(--c-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.btn-logout {
    color: #d1dce8;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #4d6476;
    border-radius: var(--radius);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-logout:hover { color: #fff; border-color: #7a92a4; background: rgba(255,255,255,0.08); }

/* ── View-as control (admin header) ─────────────────────────────── */
.view-as-form {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto 0 24px;
}

.view-as-label {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.view-as-select {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #4d6476;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.07);
    color: #d1dce8;
    cursor: pointer;
    max-width: 220px;
}
.view-as-select option { background: #1e293b; color: #fff; }
.view-as-select:focus  { outline: none; border-color: var(--c-primary); }

/* ── Impersonation banner ────────────────────────────────────────── */
.impersonation-banner {
    background: #fef9c3;
    border-bottom: 2px solid #fde047;
    color: #713f12;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
}

.impersonation-banner form { margin-left: auto; }

.btn-exit-impersonate {
    background: #78350f;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-exit-impersonate:hover { background: #92400e; }

/* ── Page body ───────────────────────────────────────────────────── */
.page-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Group selector bar ──────────────────────────────────────────── */
.group-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.group-bar select {
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
}
.group-bar select:focus {
    outline: none;
    border-color: var(--c-primary);
}

/* ── Toolbar ─────────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-left h2, .toolbar-left h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-navy);
}

.toolbar-left h3 { font-size: 14px; }

.summary-pill {
    background: #e8edf2;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 20px;
}
.pill-muted { background: #f1f5f9; color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    font-family: var(--font);
}
.btn:hover { background: #f4f7fa; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: var(--c-primary-dark);
    border-color: var(--c-primary-dark);
}
.btn-primary:disabled { background: #a3d99b; border-color: #a3d99b; }

.btn-danger { color: var(--c-danger); border-color: #f5b7b1; }
.btn-danger:hover { background: var(--c-danger-light); border-color: var(--c-danger); }

.btn-outline { background: transparent; }

.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ── Hierarchical group sections (admin dashboard) ──────────────── */
.group-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.group-section-header {
    background: #d4e8e6;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid #b0d0ce;
}

.group-section-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-navy);
}

/* Role list nested inside a group card — no extra border/shadow */
.group-role-list {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-card);
}

/* ── Role list (dashboard) ───────────────────────────────────────── */
.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: var(--shadow-sm);
}
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
}
.search-bar input::placeholder { color: #aab4be; }

.role-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.role-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f0f4f7;
    transition: background 0.12s;
}
.role-list-item:last-of-type { border-bottom: none; }
.role-list-item:hover { background: #f0faf9; }

.role-list-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.role-list-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-navy);
}

.role-list-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.role-sub-full       { color: var(--c-primary-dark); font-weight: 500; }
.role-sub-company    { color: var(--c-teal);          font-weight: 500; }
.role-sub-restricted { color: var(--c-warning);       font-weight: 500; }

.role-list-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Manager person badges — inline pills showing name, tooltip shows email */
.role-mgr-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.mgr-person-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
    cursor: default;
}
.mgr-person-badge:hover { background: #e8edf2; color: var(--text); }

/* Admin icon before manager pills */
.mgr-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    flex-shrink: 0;
    cursor: default;
}

/* Sortable table headers */
.users-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.users-table th.sortable:hover { background: #edf0f4; }
.sort-arrow { font-size: 10px; color: var(--text-muted); }

/* Group name + managers header on role detail page */
.role-group-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-group-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-navy);
    text-decoration: none;
}
.role-group-name:hover { text-decoration: underline; }

.role-list-arrow {
    color: var(--c-primary);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.12s, transform 0.12s;
}
.role-list-item:hover .role-list-arrow { opacity: 1; transform: translateX(3px); }

.role-list-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── ASType badge (PBI diamond) ──────────────────────────────────── */
.astype-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.astype-pbi {
    background: #eff6ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* ── Role attribute badges ───────────────────────────────────────── */
.role-attr-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.role-attr-badge.dwh {
    background: #eaf6f1;
    color: #0e6655;
    border-color: #a3d4c5;
}

/* ── Users table ─────────────────────────────────────────────────── */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #f4f7fa;
    padding: 9px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.users-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f4f7;
    vertical-align: middle;
}

.users-table tbody tr:last-child td { border-bottom: none; }
.users-table tbody tr:hover td { background: #f0faf9; }

.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 12px; }
.text-muted { color: var(--text-muted); }

.actions-cell {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

/* Pending/inactive rows — muted text colour, badge keeps its own colour */
.row-inactive td       { color: #8a97a4; }
.row-inactive:hover td { color: #64748b; }
.row-inactive .status-pending { color: #92620a; background: #fef8ec; }

.user-comment {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Status badges ───────────────────────────────────────────────── */
.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
}
.status-active   { background: #e4f7e4; color: #1e7b33; }
.status-pending  { background: #fef8ec; color: #92620a; }
.status-inactive { background: #f1f5f9; color: var(--text-muted); }

/* ── Info tooltip icon ───────────────────────────────────────────── */
.info-tip {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: #a0aab4;
    cursor: default;
    margin-left: 5px;
    flex-shrink: 0;
}
.info-tip:hover { color: var(--text-muted); }

/* Floating tooltip — appended to <body> by JS, never clipped */
.floating-tooltip {
    position: absolute;
    background: var(--c-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    padding: 7px 11px;
    border-radius: 5px;
    width: 240px;
    text-align: center;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 3px 10px rgba(0,0,0,0.22);
    transition: opacity 0.12s;
}

/* ── Collapsible sections ────────────────────────────────────────── */
.collapsible-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-navy);
    user-select: none;
    transition: background 0.12s;
    border-radius: var(--radius);   /* full radius when closed */
}
.section-toggle::-webkit-details-marker { display: none; }
details[open] > .section-toggle {
    border-radius: var(--radius) var(--radius) 0 0;   /* only top corners when open */
}
.section-toggle:hover { background: #f4f7fa; }

.toggle-icon {
    font-size: 8px;
    display: inline-block;
    transition: transform 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 10px;
}
details[open] > .section-toggle .toggle-icon { transform: rotate(90deg); }

.section-title { flex: 1; }

.section-body {
    border-top: 1px solid var(--border);
    padding: 14px 16px;
}

.section-body-flush {
    border-top: 1px solid var(--border);
}

.section-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
}
.section-search input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
}
.section-search input::placeholder { color: #aab4be; }

.section-body-table {
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    overflow-x: auto;
}

/* ── Role type badge (detail page header) ────────────────────────── */
.role-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.role-type-full       { background: var(--c-primary-light); color: var(--c-primary-dark); border: 1px solid #b7dfb0; }
.role-type-company    { background: #e8f8f5; color: #0e6655; border: 1px solid #a3d4c5; }
.role-type-restricted { background: #fef5ec; color: #a04000; border: 1px solid #f5cba7; }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,46,46,0.50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-card {
    background: var(--bg-card);
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(13,46,46,0.22);
    display: flex;
    flex-direction: column;
}

.modal-card--sm { max-width: 360px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-subtitle {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.modal-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
}

/* ── Form elements ───────────────────────────────────────────────── */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.required { color: var(--c-danger); }
.optional  { color: var(--text-muted); font-weight: 400; }

.form-row input,
.form-row select {
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(74,181,62,0.15);
}

.input-with-indicator { position: relative; }
.input-with-indicator input { padding-right: 32px; }

.email-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
}
.email-indicator.free      { color: var(--c-primary); }
.email-indicator.error-ind { color: var(--c-danger); }
.email-indicator.checking::after {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.field-msg        { font-size: 11px; color: var(--text-muted); min-height: 14px; }
.field-msg--error { color: var(--c-danger); }

.form-error {
    background: var(--c-danger-light);
    border: 1px solid #f5b7b1;
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 12px;
    color: var(--c-danger);
}

/* ── Modal success state ─────────────────────────────────────────── */
.modal-success-body {
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 24px 24px 20px;
}

.modal-success-icon {
    font-size: 28px;
    color: var(--c-primary);
    font-weight: 700;
    line-height: 1;
}

.modal-success-body p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    max-width: 360px;
}

/* ── Toast notifications ─────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--c-navy);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 300;
    max-width: 320px;
    box-shadow: var(--shadow-md);
}
.toast-show  { opacity: 1; transform: translateY(0); }
.toast-error { background: var(--c-danger); }

/* ── Role detail page ─────────────────────────────────────────────── */
.breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.breadcrumb a { color: var(--c-primary-dark); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-title-row h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-navy);
}

.detail-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.5;
}

.detail-header-right { flex-shrink: 0; }

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.detail-card-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.detail-prop-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--c-primary-dark);
    font-weight: 600;
}

.detail-prop-icon { font-size: 15px; }

.detail-prop-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-list li {
    font-size: 13px;
    padding: 4px 0 4px 14px;
    border-left: 3px solid var(--c-primary-light);
    color: var(--text);
}

.detail-list-mono li {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
}

.field-info-label { font-size: 12px; font-weight: 600; color: var(--text); }
.field-info-value  { font-size: 12px; color: var(--text-muted); padding: 2px 0; }

/* Object pills — table names and filter descriptions */
.object-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.obj-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.obj-table       { background: #e6f5f4; color: #0d6b60; border: 1px solid #a8d8d4; }
.obj-filter      { background: #fff7ed; color: #92400e; border: 1px solid #fde68a; }
.obj-model       { background: #f5f3ff; color: #5b21b6; border: 1px solid #c4b5fd; }
.obj-company-set { background: #e8f8f5; color: #0e6655; border: 1px solid #a3d4c5; }

.filter-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.obj-filter-raw {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 11px;
    white-space: normal;
    word-break: break-all;
}

.filter-pills-list { display: flex; flex-direction: column; gap: 10px; }
.filter-entry      { display: flex; flex-direction: column; gap: 4px; }
.filter-pill-row   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-arrow      { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.filter-dax-admin  { font-size: 11px; color: #aab4be; padding-left: 2px; word-break: break-all; }

/* ── Login page ──────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(145deg, #0d2e2e 0%, #1a4747 55%, #0d2e2e 100%);
}

.login-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 36px 40px 32px;
    text-align: center;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.login-icon {
    height: 32px;
    width: auto;
    max-width: 220px;
    margin-bottom: 12px;
}

.login-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--c-navy);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
    text-align: left;
    line-height: 1.3;
}

.login-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 0 0 20px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
}

.btn-ms-signin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--c-navy);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    transition: background 0.15s;
}
.btn-ms-signin:hover { background: var(--c-navy-light); }

/* ── Error page ──────────────────────────────────────────────────── */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 52px);
    padding: 24px;
}

.error-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 36px;
    text-align: center;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
}

.error-card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-navy);
}

.error-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}
