/* Janus360 main UI — extracted from index.html; edit here or split into page-specific sheets. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; min-height: 100vh; color: #1a1a2e; }

/* APP LAYOUT */
.app-container { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: 260px; background: #ffffff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; box-shadow: 2px 0 8px rgba(0,0,0,0.08); }
.sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,0.1); display: flex; align-items: center; gap: 0.7rem; }
.sidebar-logo {
  width: 96px;
  height: 24px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: 0;
  padding: 0;
  display: block;
}
.sidebar-title { color: #1a1a2e; font-size: 1.1rem; font-weight: 600; }
.sidebar-subtitle { color: rgba(0,0,0,0.5); font-size: 0.7rem; }
.sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.nav-section-title { color: rgba(0,0,0,0.4); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.75rem 1.25rem 0.4rem; }
.nav-item,
.portal-nav-item,
.ticketing-nav-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.25rem; color: rgba(0,0,0,0.7); text-decoration: none; transition: all 0.2s; cursor: pointer; border-left: 3px solid transparent; font-size: 0.875rem; }
.nav-item:hover,
.portal-nav-item:hover,
.ticketing-nav-item:hover { background: rgba(0,0,0,0.05); color: #1a1a2e; }
.nav-item.active,
.portal-nav-item.active,
.ticketing-nav-item.active { background: rgba(255,107,53,0.1); color: #ff6b35; border-left-color: #ff6b35; }

/* Portal module sidebars */
.ticketing-sidebar[hidden] { display: none !important; }
.ticketing-sidebar-header { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.sidebar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  background: #f8f9fa;
  color: #1a1a2e;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.sidebar-back-btn:hover { background: #eef0f2; border-color: rgba(0,0,0,0.18); }
.sidebar-back-icon { font-size: 1.1rem; line-height: 1; }
.ticketing-sidebar-brand { padding: 0.85rem 1.25rem 0.25rem; }
body.module-ticketing .portal-sidebar { display: none; }

/* Portal dashboard cards */
.portal-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.portal-dashboard-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.portal-dashboard-card:hover {
  border-color: #ff6b35;
  box-shadow: 0 4px 14px rgba(255,107,53,0.12);
  transform: translateY(-1px);
}
.portal-dashboard-card-icon { font-size: 1.5rem; }
.portal-dashboard-card-title { font-size: 1rem; font-weight: 600; color: #1a1a2e; }
.portal-dashboard-card-desc { font-size: 0.82rem; color: #6c757d; line-height: 1.4; }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: linear-gradient(135deg, #84fab0, #8fd3f4); color: #2c3e50; font-size: 0.6rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 8px; }
.recent-chats { border-top: 1px solid rgba(0,0,0,0.1); padding: 0; flex-shrink: 0; }
.recent-chats-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0,0,0,0.4);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: inherit;
    text-align: left;
}
.recent-chats-toggle:hover { color: rgba(0,0,0,0.55); background: rgba(0,0,0,0.03); }
.recent-chats-chevron { font-size: 0.65rem; opacity: 0.7; flex-shrink: 0; line-height: 1; user-select: none; }
.recent-chats-list { max-height: 200px; overflow-y: auto; padding-bottom: 0.5rem; }
.recent-chats.is-collapsed .recent-chats-list { display: none; }
.recent-chat-item { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.25rem; color: rgba(0,0,0,0.6); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.recent-chat-item:hover { background: rgba(0,0,0,0.05); color: #1a1a2e; }
.sidebar-footer { padding: 0.75rem 1.25rem; border-top: 1px solid rgba(0,0,0,0.1); font-size: 0.65rem; color: rgba(0,0,0,0.4); text-align: center; }

/* MAIN CONTENT */
.main-content { flex: 1; margin-left: 260px; background: linear-gradient(180deg, #f8f9fa 0%, #e8f5e9 50%, #c8e6c9 100%); min-height: 100vh; }
.top-header { background: #fff; padding: 0.875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dee2e6; position: sticky; top: 0; z-index: 50; }
.top-header-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.user-session-bar { display: none; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; max-width: min(100%, 420px); }
.user-session-bar.visible { display: flex; }
.user-session-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6c757d; }
.user-session-email { font-size: 0.85rem; color: #1a1a2e; font-weight: 500; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-session-logout { font-size: 0.8rem; color: #ff6b35; text-decoration: none; font-weight: 500; white-space: nowrap; }
.user-session-logout:hover { text-decoration: underline; }
.user-session-signin { display: none; align-items: center; gap: 0.5rem; }
.user-session-signin.visible { display: flex; }
.user-session-signin a { font-size: 0.85rem; color: #ff6b35; font-weight: 600; text-decoration: none; }
.user-session-signin a:hover { text-decoration: underline; }

/* USER PROFILE DROPDOWN (top-right header) */
.user-profile-wrap { position: relative; display: inline-flex; }
.user-profile-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff; font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(255, 107, 53, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.user-profile-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(255, 107, 53, 0.35); }
.user-profile-btn:focus-visible { outline: none; border-color: #1a1a2e; }
.user-profile-btn[aria-expanded="true"] { border-color: #1a1a2e; }
.user-profile-initials { line-height: 1; letter-spacing: 0.02em; user-select: none; }
.user-profile-menu { position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 260px; background: #fff; border: 1px solid #e2e6ea; border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18); padding: 0.5rem 0; z-index: 200; }
.user-profile-menu[hidden] { display: none; }
.user-profile-menu-header { display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 0.85rem 0.55rem; }
.user-profile-menu-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.user-profile-menu-id { min-width: 0; flex: 1; }
.user-profile-menu-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6c757d; margin-bottom: 0.1rem; }
.user-profile-menu-email { font-size: 0.85rem; color: #1a1a2e; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-menu-role { font-size: 0.72rem; color: #6c757d; margin-top: 0.1rem; text-transform: capitalize; }
.user-profile-menu-divider { height: 1px; background: #eef0f3; margin: 0.35rem 0; }
.user-profile-menu-item { width: 100%; display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.85rem; background: transparent; border: none; color: #1a1a2e; font-size: 0.88rem; cursor: pointer; text-align: left; }
.user-profile-menu-item:hover { background: #f6f7f9; }
.user-profile-menu-item:focus-visible { outline: 2px solid #ff6b35; outline-offset: -2px; }
.user-profile-menu-item-danger { color: #c53030; }
.user-profile-menu-item-danger:hover { background: #fff5f5; }
.user-profile-menu-icon { width: 1.25rem; display: inline-flex; justify-content: center; font-size: 0.95rem; }

/* ACCOUNT / RESET PASSWORD MODALS (top-right dropdown) */
.account-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.account-modal[hidden] { display: none; }
.account-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); }
.account-modal-card { position: relative; width: min(100%, 460px); margin: 1rem; background: #fff; border-radius: 12px; box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25); display: flex; flex-direction: column; max-height: calc(100vh - 2rem); overflow: hidden; }
.account-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #eef0f3; }
.account-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 600; color: #1a1a2e; }
.account-modal-close { background: transparent; border: none; font-size: 1.4rem; color: #6c757d; cursor: pointer; line-height: 1; padding: 0 0.25rem; }
.account-modal-close:hover { color: #1a1a2e; }
.account-modal-body { padding: 1rem 1.25rem; overflow-y: auto; }
.account-modal-help { color: #6c757d; font-size: 0.85rem; margin: 0 0 0.75rem; }
.account-modal-row { display: flex; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px dashed #f1f3f5; }
.account-modal-row:last-child { border-bottom: none; }
.account-modal-row dt { flex: 0 0 130px; color: #6c757d; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.account-modal-row dd { margin: 0; color: #1a1a2e; font-size: 0.9rem; word-break: break-word; }
.account-modal-error { display: block; color: #c53030; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; padding: 0.55rem 0.75rem; font-size: 0.85rem; margin-top: 0.5rem; }
.account-modal-error[hidden] { display: none; }
.account-modal-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.25rem 1rem; border-top: 1px solid #eef0f3; background: #fafbfc; }
#reset-password-form .account-modal-foot { border-top: none; padding: 0; margin-top: 1rem; background: transparent; }

.page-title { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; display: flex; align-items: center; gap: 0.6rem; }
.page-container { padding: 1.5rem; }
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* WIDGETS */
.widget { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); overflow: hidden; margin-bottom: 1.5rem; }
.widget-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem; background: linear-gradient(135deg, #f8f9fa, #e9ecef); border-bottom: 1px solid #dee2e6; }
.widget-title-section { display: flex; align-items: center; gap: 0.6rem; }
.widget-header h3 { margin: 0; color: #1a1a2e; font-size: 1rem; font-weight: 600; }
.widget-content { padding: 1.25rem; min-height: 200px; }
.widget-controls { display: flex; align-items: center; gap: 0.6rem; }
.ai-badge { display: inline-flex; align-items: center; gap: 0.2rem; background: linear-gradient(135deg, #84fab0, #8fd3f4); color: #2c3e50; padding: 0.2rem 0.6rem; border-radius: 15px; font-size: 0.7rem; font-weight: 500; }
.region-selector { padding: 0.4rem 2rem 0.4rem 0.75rem; border: 1px solid #ced4da; border-radius: 6px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L2 5h8z'/%3E%3C/svg%3E") no-repeat right 0.6rem center; font-size: 0.85rem; color: #495057; cursor: pointer; appearance: none; }
.asset-search-input { padding: 0.4rem 0.75rem; border: 1px solid #ced4da; border-radius: 6px; font-size: 0.85rem; color: #495057; min-width: 180px; }
.asset-search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.asset-search-input::placeholder { color: #adb5bd; }
.customer-status { padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.customer-status.status-active { background: #d4edda; color: #155724; }
.customer-status.status-closed { background: #f8d7da; color: #721c24; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* TABLES */
.table-container { max-height: 350px; overflow-y: auto; border-radius: 8px; }

/* Tickets page: use available viewport height instead of a short fixed panel */
#page-tickets .widget {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}
#page-tickets .widget-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#page-tickets .table-container {
  flex: 1;
  max-height: calc(100vh - 300px);
}
.accounts-table, .asset-table, .data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.accounts-table th, .asset-table th, .data-table th { background: #f8f9fa; padding: 0.6rem; text-align: left; font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6; position: sticky; top: 0; z-index: 10; font-size: 0.75rem; text-transform: uppercase; }
.accounts-table td, .asset-table td, .data-table td { padding: 0.6rem; border-bottom: 1px solid #e9ecef; font-size: 0.85rem; }
.account-row, .asset-row, .clickable-row { cursor: pointer; transition: background 0.2s; }
.account-row:hover, .asset-row:hover, .clickable-row:hover { background: #f8f9fa; }
.risk-indicator, .asset-ratio-indicator { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.5rem; }
.blocker-risk { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.critical-risk { background: linear-gradient(135deg, #f39c12, #e67e22); }
.high-risk { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.medium-risk { background: linear-gradient(135deg, #3498db, #2980b9); }
.good-ratio { background: linear-gradient(135deg, #28a745, #20c997); }
.medium-ratio { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.poor-ratio { background: linear-gradient(135deg, #dc3545, #c82333); }
.high-risk-count, .asset-count { margin-top: 1rem; padding: 0.6rem; background: #f8f9fa; border-radius: 6px; text-align: center; font-size: 0.85rem; color: #6c757d; }
.popup-refine-callout { margin-top: 0.75rem; padding: 0.65rem 0.75rem; background: #e7f3ff; border-left: 3px solid #0d6efd; border-radius: 6px; font-size: 0.8rem; color: #495057; line-height: 1.45; }
.tier-select-wrap { position: relative; display: inline-block; }
.tier-select-btn { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; text-align: left; min-width: 11rem; }
.tier-select-btn .risk-indicator { flex-shrink: 0; }
.tier-select-chevron { font-size: 0.6rem; opacity: 0.65; margin-left: auto; }
.tier-select-menu { position: absolute; top: calc(100% + 4px); left: 0; margin: 0; padding: 0.35rem 0; list-style: none; background: #fff; border: 1px solid #dee2e6; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); z-index: 200; min-width: 12rem; }
.tier-select-menu li { padding: 0.5rem 0.85rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #495057; }
.tier-select-menu li:hover { background: #f8f9fa; }
.tier-select-menu .risk-indicator { flex-shrink: 0; }

/* QBR */
.qbr-list { max-height: 350px; overflow-y: auto; }
.qbr-item { display: flex; align-items: center; padding: 0.6rem 0.75rem; border-bottom: 1px solid #e9ecef; cursor: pointer; transition: background 0.2s; }
.qbr-item:hover { background: #f8f9fa; }
.qbr-risk-indicator { width: 10px; height: 10px; border-radius: 50%; margin-right: 0.75rem; flex-shrink: 0; }
.qbr-risk-indicator.critical { background: #dc3545; }
.qbr-risk-indicator.high { background: #fd7e14; }
.qbr-risk-indicator.medium { background: #ffc107; }
.qbr-risk-indicator.low { background: #28a745; }
.qbr-content { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.qbr-account-info { flex: 1; }
.qbr-account-name { font-weight: 500; color: #495057; font-size: 0.9rem; }
.qbr-account-region { font-size: 0.75rem; color: #6c757d; }
.qbr-csm-label { font-size: 0.75rem; color: #6c757d; background: #f8f9fa; padding: 0.2rem 0.4rem; border-radius: 4px; }
.qbr-date-info { text-align: right; }
.qbr-date { font-size: 0.85rem; color: #6c757d; }
.qbr-days-away { font-size: 0.75rem; color: #6c757d; }

/* KYC */
.kyc-container { max-width: 850px; margin: 0 auto; position: relative; }
.kyc-menu-bar { display: flex; justify-content: flex-end; margin-bottom: 0.25rem; position: relative; z-index: 20; }
.kyc-menu-container { position: relative; }
.kyc-menu-btn {
    background: none; border: none; cursor: pointer; padding: 0.55rem 0.75rem;
    font-size: 1.95rem; line-height: 1; color: #6c757d; border-radius: 10px;
    min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.kyc-menu-btn:hover { background: rgba(0, 0, 0, 0.06); color: #1a1a2e; }
.kyc-menu-dropdown {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: #fff; border: 1px solid #dee2e6; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); min-width: 220px; overflow: hidden;
}
.kyc-menu-dropdown.show { display: block; }
.kyc-query-count {
    padding: 0.5rem 1rem; font-size: 0.72rem; color: #6c757d; background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
.kyc-menu-item {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1rem;
    cursor: pointer; transition: background 0.15s; color: #495057; font-size: 0.88rem;
}
.kyc-menu-item:hover { background: #f8f9fa; }
.kyc-menu-item.kyc-menu-danger:hover { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.kyc-menu-divider { height: 1px; background: #dee2e6; margin: 0.2rem 0; }
.kyc-hero { text-align: center; padding: 2rem 0 1.5rem; }
.kyc-hero-title-row { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.kyc-hero h2 { font-size: 1.75rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0; }
.kyc-hero p { color: #6c757d; font-size: 1rem; }
.input-section { background: #fff; border: 1px solid #dee2e6; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.input-wrapper { display: flex; gap: 0.75rem; }
#query-input { flex: 1; padding: 0.875rem 1rem; font-size: 0.95rem; border: 1px solid #dee2e6; border-radius: 10px; background: #f8f9fa; color: #1a1a2e; outline: none; }
#query-input:focus { border-color: #ff6b35; box-shadow: 0 0 0 3px rgba(255,107,53,0.2); }
#submit-btn { padding: 0.875rem 1.5rem; font-size: 0.95rem; font-weight: 500; background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff; border: none; border-radius: 10px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
#submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,107,53,0.3); }
#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.recent-queries { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.recent-queries-label { width: 100%; font-size: 0.7rem; color: #6c757d; margin-bottom: 0.2rem; }
.query-bubble { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; border: 1px solid #dee2e6; border-radius: 15px; padding: 0.4rem 0.6rem 0.4rem 0.8rem; font-size: 0.8rem; color: #495057; cursor: pointer; transition: all 0.2s; }
.query-bubble:hover { background: #f8f9fa; border-color: #ff6b35; color: #ff6b35; }
.query-delete { width: 16px; height: 16px; border-radius: 50%; background: #e9ecef; color: #6c757d; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.query-delete:hover { background: rgba(239,68,68,0.3); color: #ef4444; }
.loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.5rem; color: #6c757d; }
.spinner { width: 18px; height: 18px; border: 2px solid #dee2e6; border-top-color: #ff6b35; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.history-container { display: flex; flex-direction: column; gap: 1.25rem; }
.history-item { border: 1px solid #dee2e6; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.history-question { background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff; padding: 0.875rem 1.25rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.history-response { padding: 1rem; }
.response-card { background: #fff; border: 1px solid #dee2e6; border-radius: 12px; padding: 1.25rem; margin-bottom: 0.75rem; }
.response-card h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #6c757d; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.sql-box { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 0.875rem; font-family: 'SF Mono', monospace; font-size: 0.85rem; overflow-x: auto; white-space: pre-wrap; color: #495057; }
.insights-box { line-height: 1.65; color: #495057; font-size: 0.9rem; overflow-x: auto; }
.insights-box ul { margin: 0.4rem 0; padding-left: 1.25rem; }
.insights-box h2, .insights-box h3, .insights-box h4 { margin: 0.6rem 0 0.4rem; color: #1a1a2e; }
.insights-box strong { color: #ff6b35; }
.data-table-wrapper { overflow-x: auto; max-height: 350px; overflow-y: auto; }
.data-table th { background: #ff6b35; color: #fff; }
.data-table tr:hover td { background: #fff5f0; }

#page-users .projects-view-tab.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

/* Flash a form field that failed validation */
.saml-field-flash { outline: 2px solid #dc3545 !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(220,53,69,0.15) !important; transition: outline-color 0.2s, box-shadow 0.2s; }

/* POPUP */
.account-popup-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.2s; }
.account-popup { background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); max-width: 550px; max-height: 80vh; overflow-y: auto; margin: 1rem; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.popup-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem; border-bottom: 1px solid #dee2e6; background: linear-gradient(135deg, #f8f9fa, #e9ecef); border-radius: 12px 12px 0 0; gap: 0.75rem; flex-wrap: wrap; }
.popup-header h3 { margin: 0; color: #1a1a2e; font-size: 1.1rem; flex: 1; min-width: 0; }
.popup-header-trailing { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.popup-header .action-btn.primary { padding: 0.45rem 0.9rem; font-size: 0.8rem; white-space: nowrap; }
.popup-close { background: none; border: none; font-size: 1.4rem; color: #6c757d; cursor: pointer; padding: 0.2rem; width: 1.75rem; height: 1.75rem; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.popup-close:hover { background: #e9ecef; color: #495057; }
.popup-content { padding: 1.25rem; }
.popup-summary { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; padding: 0.875rem; background: #f8f9fa; border-radius: 8px; flex-wrap: wrap; }
.summary-item { display: flex; align-items: center; gap: 0.4rem; }
.summary-item .label { font-weight: 500; color: #6c757d; font-size: 0.85rem; }
.summary-item .value { font-weight: 600; color: #1a1a2e; font-size: 0.9rem; }

/* Ticket detail — DevOps-style header + two-column body + full-width comments */
.ticket-detail-widget-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.widget-header .widget-title-section.ticket-detail-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: min(100%, 220px);
}
.widget-header .ticket-detail-title-block h3 { margin: 0; font-size: 1.05rem; }
.ticket-detail-back-btn { align-self: flex-start; }
.ticket-detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.ticket-detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1rem 1.35rem;
  align-items: start;
  margin-bottom: 0.4rem;
}
.ticket-detail-primary {
  min-width: 0;
  width: 100%;
  max-width: none;
}
.ticket-detail-primary-field { margin-bottom: 0.75rem; }
.ticket-detail-primary-field:last-child { margin-bottom: 0; }
.ticket-detail-primary-field label,
.ticket-detail-comments-section label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
}
.ticket-detail-input { width: 100%; max-width: none; box-sizing: border-box; }
.ticket-detail-textarea {
  width: 100%; max-width: none; box-sizing: border-box;
  padding: 0.65rem; border: 1px solid #dee2e6; border-radius: 8px;
  font-family: inherit; font-size: 0.875rem; resize: vertical;
}
.ticket-detail-widget .ticket-detail-primary-input,
.ticket-detail-widget .ticket-detail-primary-textarea {
  max-width: none;
  width: 100%;
}
.ticket-detail-primary-textarea {
  min-height: min(220px, 36vh);
}
.ticket-detail-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ticket-detail-sidebar-panel {
  padding: 0.65rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.ticket-detail-sidebar-readonly { background: #f8f9fa; }
.ticket-detail-sidebar-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: #6c757d;
  margin: 0 0 0.45rem;
}
.ticket-detail-readonly-row {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.35rem 0.65rem;
  font-size: 0.8rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid #e9ecef;
}
.ticket-detail-readonly-row:last-child { border-bottom: none; padding-bottom: 0; }
.ticket-detail-readonly-label { color: #6c757d; font-weight: 500; }
.ticket-detail-readonly-value { color: #1a1a2e; font-weight: 600; word-break: break-word; }
.ticket-detail-sidebar-field { margin-bottom: 0.65rem; }
.ticket-detail-sidebar-field:last-child { margin-bottom: 0; }
.ticket-detail-sidebar-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
}
.ticket-detail-sidebar-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ticket-detail-file-input { font-size: 0.8rem; max-width: 100%; }
.ticket-detail-attach-field .ticket-detail-attach-list {
  margin-top: 0.2rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}
.ticket-detail-comments-section { margin-top: 0; }
@media (max-width: 960px) {
  .ticket-detail-columns {
    grid-template-columns: 1fr;
  }
  .ticket-detail-primary {
    max-width: none;
  }
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  align-items: end;
}
.field-row .field label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 500; color: #495057; }
.ticket-detail-attach-list { margin: 0.35rem 0 0; padding-left: 1.25rem; font-size: 0.85rem; }

/* Comments: full width under columns; inner scroll; nested comment cards */
.ticket-comments-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0.65rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f1f3f5;
  max-height: min(520px, 58vh);
  overflow-y: auto;
}
.ticket-conversations {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.ticket-conversations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ticket-conv-item { margin: 0; }
.ticket-conversations-empty {
  padding: 1rem;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
  border: 1px dashed #ced4da;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.ticket-conv-card {
  padding: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.85rem;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}
.ticket-conv-header {
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
}
.ticket-conv-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.ticket-conv-time {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.82rem;
  line-height: 1.4;
  display: block;
  width: 100%;
}
.ticket-conv-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.ticket-conv-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.ticket-conv-badge-incoming { background: #e7f3ff; color: #0d47a1; }
.ticket-conv-badge-outgoing { background: #f3e8fd; color: #5e35b1; }
.ticket-conv-badge-private { background: #fff8e1; color: #856404; }
.ticket-conv-reporter { margin: 0; }
.ticket-conv-reporter-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #6c757d;
}
.ticket-conv-reporter-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.35;
  word-break: break-word;
}
.ticket-conv-reporter-email {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #495057;
  word-break: break-all;
}
.ticket-conv-body-readonly {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #212529;
  background: #f8f9fa;
  resize: none;
  min-height: 3.25rem;
  cursor: default;
  white-space: pre-wrap;
  word-break: break-word;
}
.ticket-conv-body-readonly:focus {
  outline: none;
}

/* Email-thread style conversation cards */
.ticket-email-card {
  margin: 0;
  background: #fff;
  border: 1px solid #c5cbd3;
  border-radius: 6px;
  font-size: 0.85rem;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ticket-email-card--in {
  border-left: 4px solid #1976d2;
}
.ticket-email-card--out {
  border-left: 4px solid #7b1fa2;
}

.ticket-email-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem 0.55rem;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f3f5 100%);
  border-bottom: 1px solid #e9ecef;
}
.ticket-email-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.ticket-email-avatar--in {
  background: linear-gradient(145deg, #2196f3, #1565c0);
}
.ticket-email-avatar--out {
  background: linear-gradient(145deg, #9c27b0, #6a1b9a);
}
.ticket-email-header-main {
  flex: 1;
  min-width: 0;
}
.ticket-email-header-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
  line-height: 1.45;
}
.ticket-email-sender-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0d6efd;
}
.ticket-email-sender-verb {
  font-size: 0.82rem;
  color: #495057;
  font-weight: 400;
}
.ticket-email-sender-when {
  font-size: 0.78rem;
  color: #6c757d;
  font-weight: 400;
  flex: 1 1 10rem;
  min-width: 0;
  word-break: break-word;
}
.ticket-email-inline-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-left: auto;
}
.ticket-email-from-row,
.ticket-email-to-row,
.ticket-email-cc-row {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #212529;
  line-height: 1.4;
  word-break: break-word;
}
.ticket-email-to-label {
  font-weight: 600;
  color: #495057;
}
.ticket-email-to-link {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ticket-email-to-link:hover {
  color: #0a58ca;
}

.ticket-email-body-wrap {
  border-top: none;
  background: #fff;
}
.ticket-email-body--rich {
  margin: 0;
  padding: 0.65rem 0.75rem 0.95rem;
  max-height: min(420px, 48vh);
  overflow: auto;
}
.ticket-email-body-inner {
  border-left: 3px solid #adb5bd;
  padding: 0.15rem 0 0.15rem 0.85rem;
  margin: 0;
  background: #fff;
}
.ticket-email-card--out .ticket-email-body-inner {
  border-left-color: #7b1fa2;
}
.ticket-email-card--in .ticket-email-body-inner {
  border-left-color: #1976d2;
}
.ticket-email-body-p {
  margin: 0 0 1.05em;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 0.9rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: #212529;
  white-space: pre-wrap;
  word-break: break-word;
}
.ticket-email-body-p:last-child {
  margin-bottom: 0;
}
.ticket-email-body-p--spacer {
  min-height: 0.5em;
  margin-bottom: 1.05em;
  padding: 0;
  border: none;
}
.ticket-email-body-p--spacer:last-child {
  margin-bottom: 0;
}
.ticket-email-body-link {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.ticket-email-body-link:hover {
  color: #0a58ca;
}

.ticket-reply-composer {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.ticket-reply-composer-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a1a2e;
  margin-bottom: 0.55rem;
}
.ticket-reply-textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 5rem;
}
.ticket-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid #ced4da;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: #495057;
}
.btn-secondary:hover { background: #f8f9fa; border-color: #adb5bd; }
.btn-secondary:active { filter: brightness(0.97); }

.toast-bottom-left {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  max-width: min(420px, calc(100vw - 2.5rem));
  padding: 0.75rem 2.25rem 0.75rem 0.85rem;
  background: #f8d7da;
  color: #721c24;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 10060;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
}
.toast-bottom-left-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #721c24;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}
.toast-bottom-left-close:hover { background: rgba(0, 0, 0, 0.06); }

.toast-top-right {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 2.5rem));
  padding: 0.75rem 1rem;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 10061;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
  text-align: center;
}

.risk-score-large { font-size: 1.1rem; color: #007bff; }
.popup-details h4, .popup-risk-factors h4, .popup-notes h4 { margin: 1.25rem 0 0.75rem; color: #1a1a2e; font-size: 1rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.detail-item { display: flex; flex-direction: column; gap: 0.2rem; }
.detail-label { font-size: 0.7rem; color: #6c757d; font-weight: 500; text-transform: uppercase; }
.detail-value { font-weight: 500; color: #495057; font-size: 0.9rem; }
.risk-factors-list { margin: 0.4rem 0 0 0; padding-left: 1rem; font-size: 0.85rem; color: #6c757d; }
.risk-factors-list li { margin-bottom: 0.2rem; }
.action-btn { padding: 0.6rem 1.25rem; border: none; border-radius: 6px; font-weight: 500; cursor: pointer; font-size: 0.85rem; }
.action-btn.primary { background: #007bff; color: #fff; }
.action-btn.primary:hover { background: #0056b3; }
.action-btn.secondary { background: #6c757d; color: #fff; }
.action-btn.secondary:hover { background: #545b62; }
.risk-badge { display: inline-block; padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; margin-left: 0.5rem; }
.risk-badge.very-high, .risk-badge.critical { background: #dc3545; color: #fff; }
.risk-badge.high { background: #fd7e14; color: #fff; }
.risk-badge.medium { background: #ffc107; color: #212529; }
.risk-badge.low { background: #28a745; color: #fff; }
.parsed-entry { margin-bottom: 0.4rem; padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.85rem; line-height: 1.4; background: #f8f9fa; border-left: 3px solid #dee2e6; }
.parsed-entry.highlight-entry { background: #d4edda; border-left-color: #28a745; color: #155724; }
.parsed-entry.lowlight-entry { background: #f8d7da; border-left-color: #dc3545; color: #721c24; }
.note-section { margin-bottom: 0.75rem; }
.note-section strong { display: block; margin-bottom: 0.4rem; color: #495057; font-size: 0.85rem; }
.parsed-content { margin-left: 0.5rem; }
.popup-projects { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e9ecef; }
.popup-projects h4 { margin: 0 0 0.75rem; color: #1a1a2e; font-size: 1rem; }
.projects-list { list-style: none; padding: 0; margin: 0; }
.projects-list li { padding: 0.5rem; background: #f8f9fa; border-radius: 6px; margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.projects-list li.popup-project-item { flex-direction: column; align-items: flex-start; }
.popup-project-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.project-timeline-wrap { width: 100%; margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px solid #e9ecef; }
.project-timeline-line { margin: 0 0 0.5rem; font-size: 0.82rem; line-height: 1.45; color: #495057; }
.project-timeline-line:last-child { margin-bottom: 0; }
.projects-list li strong { color: #1a1a2e; }
.project-status { font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 4px; background: #e9ecef; color: #495057; }
.popup-licenses { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e9ecef; }
.popup-licenses h4 { margin: 0 0 0.75rem; color: #1a1a2e; font-size: 1rem; }
.license-metrics { font-size: 0.78rem; color: #495057; display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; align-items: center; max-width: 100%; justify-content: flex-end; text-align: right; }
.license-metrics span { white-space: nowrap; }
.account-category-badge { display: inline-block; padding: 0.25rem 0.6rem; font-size: 0.75rem; font-weight: 600; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.account-category-badge.category-logo { background-color: #ff6b6b; color: white; border: 1px solid #ff5252; }
.account-category-badge.category-growth { background-color: #4ecdc4; color: white; border: 1px solid #26a69a; }
.account-category-badge.category-retention { background-color: #45b7d1; color: white; border: 1px solid #2196f3; }
.account-category-badge.category-growth-plus-retention { background-color: #f7b731; color: white; border: 1px solid #f39c12; }
.popup-meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.9rem; color: #495057; }
.popup-meta-item { display: flex; align-items: center; gap: 0.3rem; }

/* Gong transcripts modal (Customers page) */
.gong-transcripts-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1100; animation: fadeIn 0.2s; }
.gong-transcripts-modal { background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); max-width: 720px; width: 100%; max-height: 85vh; overflow: hidden; margin: 1rem; display: flex; flex-direction: column; animation: slideUp 0.3s ease; }
.gong-modal-body { overflow-y: auto; flex: 1; min-height: 0; }
.gong-transcripts-cell { text-align: center; vertical-align: middle; }
.gong-transcripts-btn { background: #6c5ce7; color: #fff; border: none; border-radius: 6px; padding: 0.35rem 0.75rem; font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.gong-transcripts-btn:hover { background: #5649c0; }
.gong-call-list { list-style: none; margin: 0; padding: 0; }
.gong-call-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0.5rem; border-bottom: 1px solid #e9ecef; cursor: pointer; border-radius: 6px; }
.gong-call-row:hover { background: #f8f9fa; }
.gong-call-id { font-family: 'SF Mono', ui-monospace, monospace; font-size: 0.8rem; color: #495057; word-break: break-all; }
.gong-call-date { font-size: 0.85rem; color: #6c757d; flex-shrink: 0; }
.gong-modal-empty { color: #6c757d; font-size: 0.9rem; margin: 0; }
.gong-modal-participants { margin: 0 0 0.75rem; font-size: 0.88rem; line-height: 1.45; }
.gong-participant-line { margin: 0.35rem 0; }
.gong-participant-label { font-weight: 600; color: #495057; display: inline-block; min-width: 12rem; vertical-align: top; }
.gong-participant-names { display: inline; }
.gong-participant-name { white-space: nowrap; }
.gong-modal-detail-meta { margin: 0 0 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }
.gong-meta-date { font-size: 0.95rem; color: #495057; font-weight: 500; }
.gong-meta-callid { font-size: 0.75rem; color: #6c757d; }
.gong-transcript-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 0.88rem; line-height: 1.55; color: #212529; background: #f8f9fa; padding: 1rem; border-radius: 8px; max-height: 55vh; overflow-y: auto; }

/* EMPTY STATE */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; text-align: center; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.5; }
.empty-state-title { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0.4rem; }
.empty-state-description { color: #6c757d; max-width: 350px; font-size: 0.9rem; }

/* SORT CONTROLS */
.sort-controls { display: flex; gap: 0.4rem; }
.sort-btn { background: #fff; border: 1px solid #ced4da; border-radius: 4px; padding: 0.2rem 0.4rem; font-size: 0.85rem; cursor: pointer; color: #495057; }
.sort-btn:hover { background: #e9ecef; }
.sort-btn.active { background: #3498db; color: #fff; border-color: #3498db; }

/* METRICS TABLE */
.metrics-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.metrics-table thead th { background: #f8f9fa; padding: 0.5rem 0.75rem; text-align: left; font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6; font-size: 0.8rem; }
.metrics-table tbody tr { border-bottom: 1px solid #e9ecef; }
.metrics-table td { padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.metric-label { font-weight: 600; color: #495057; }
.metric-value { color: #212529; }
.status-good { color: #28a745; font-weight: 600; }
.status-warning { color: #ffc107; font-weight: 600; }
.status-danger { color: #dc3545; font-weight: 600; }

/* BADGE */
.badge { display: inline-block; padding: 0.2rem 0.4rem; font-size: 0.7rem; font-weight: 600; border-radius: 4px; text-transform: uppercase; }
.badge-danger { background: #dc3545; color: #fff; }
.badge-warning { background: #ffc107; color: #212529; }
.badge-info { background: #17a2b8; color: #fff; }
.badge-success { background: #28a745; color: #fff; }
.badge-primary { background: #007bff; color: #fff; }
.badge-secondary { background: #6c757d; color: #fff; }

.copyright { text-align: center; color: #6c757d; font-size: 0.7rem; margin-top: 0.6rem; }

/* CALENDAR */
.on-prem-calendar-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; max-width: 1200px; margin: 0 auto; width: 100%; }
.on-prem-calendar-sub { color: #6c757d; font-size: 0.9rem; margin-bottom: 0.75rem; }
.on-prem-calendar-iframe { flex: 1; width: 100%; min-height: min(720px, calc(100vh - 180px)); border: 1px solid #e9ecef; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); background: #fff; }
.rca-page-wrap { max-width: 1280px; margin: 0 auto; width: 100%; padding: 0 0.5rem; }
.rca-header-row { margin-bottom: 1rem; }
.rca-intro { color: #6c757d; font-size: 0.9rem; margin: 0 0 0.75rem; max-width: 56rem; line-height: 1.45; }
.rca-code-path { font-size: 0.82em; background: #f1f3f5; padding: 0.1rem 0.35rem; border-radius: 4px; font-family: ui-monospace, monospace; }
.rca-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.rca-year-label { font-size: 0.85rem; color: #495057; }
.rca-year-select { padding: 0.35rem 0.5rem; border: 1px solid #ced4da; border-radius: 6px; font-size: 0.9rem; background: #fff; }
.rca-refresh-btn { padding: 0.35rem 0.75rem; border: none; border-radius: 6px; background: #0d6efd; color: #fff; font-size: 0.85rem; cursor: pointer; }
.rca-refresh-btn:hover { background: #0b5ed7; }
.rca-error-banner { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.rca-meta { font-size: 0.8rem; color: #6c757d; margin-bottom: 0.5rem; }
.rca-list-view { width: 100%; }
/* Match .rg-list-container: soft shadow, no border lines */
.rca-list-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.rca-list-head {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.72fr) minmax(0, 0.58fr) minmax(0, 0.52fr);
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    background: #f8f9fa;
}
.rca-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
}
.rca-list > li { margin: 0; padding: 0; }
.rca-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.72fr) minmax(0, 0.58fr) minmax(0, 0.52fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    width: 100%;
    font: inherit;
    background: #fff;
    color: inherit;
    border: none;
}
.rca-list-item:hover, .rca-list-item:focus-visible {
    background: #f8f9fa;
    outline: none;
}
.rca-list-item:focus-visible { box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.25); }
.rca-list-account { font-weight: 600; color: #0d6efd; }
.rca-list-date { font-size: 0.9rem; color: #495057; }
.rca-list-source { font-size: 0.88rem; color: #495057; }
.rca-list-col-svc { display: flex; align-items: center; min-width: 0; }
@media (max-width: 640px) {
    .rca-list-head { display: none; }
    .rca-list-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        align-items: start;
    }
    .rca-list-item::before {
        content: '';
        display: none;
    }
    .rca-list-mobile-label { font-size: 0.65rem; color: #868e96; text-transform: uppercase; letter-spacing: 0.03em; }
}
@media (min-width: 641px) {
    .rca-list-mobile-label { display: none; }
}
.rca-detail-view { padding: 0 0 2rem; }
.rca-detail-nav { margin-bottom: 1rem; }
.rca-detail-inner { display: flex; flex-direction: column; gap: 1rem; max-width: 72rem; }
.rca-detail-dates-card h3,
.rca-detail-rca-info-card h3,
.rca-detail-insight-card h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}
.rca-detail-dates-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}
@media (max-width: 560px) {
    .rca-detail-dates-row { grid-template-columns: 1fr; }
}
.rca-doc-tile-date { min-height: 3.25rem; }
.rca-detail-middle-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 0.85fr) minmax(0, 1.25fr);
    gap: 1rem;
    align-items: start;
}
@media (max-width: 900px) {
    .rca-detail-middle-grid { grid-template-columns: 1fr; }
}
.rca-rca-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: stretch;
}
@media (max-width: 420px) {
    .rca-rca-info-grid { grid-template-columns: 1fr; }
}
.rca-doc-tile {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}
.rca-doc-tile-lbl {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}
.rca-doc-tile-val { font-size: 0.9rem; font-weight: 600; color: #212529; word-break: break-word; }
.rca-doc-tile-filename { font-weight: 500; font-size: 0.85rem; }
.rca-doc-link-row { margin: 0.5rem 0 0; font-size: 0.85rem; }
.rca-src-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}
.rca-src-product { background: #e7f5ff; color: #1971c2; }
.rca-src-misconfiguration { background: #fff4e6; color: #d9480f; }
.rca-src-other { background: #e9ecef; color: #495057; }
.rca-svc-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
}
.rca-svc-yes { background: #ffe3e3; color: #c92a2a; }
.rca-svc-no { background: #d3f9d8; color: #2b8a3e; }
.rca-svc-na { background: #f1f3f5; color: #495057; }
.rca-insight-empty { margin: 0; }
.rca-detail-insight-card .rca-detail-body { margin-top: 0; }
.rca-detail-title-block { margin-bottom: 0.25rem; }
.rca-detail-title-block .rca-detail-h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.35rem;
}
.rca-detail-sub { font-size: 0.88rem; color: #6c757d; }
.rca-detail-section { margin: 0; }
.rca-detail-section h3 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}
.rca-detail-body {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #212529;
    white-space: pre-wrap;
    word-break: break-word;
}
.rca-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.65rem 1rem;
    font-size: 0.85rem;
}
.rca-detail-meta-item .lbl { display: block; font-size: 0.65rem; color: #868e96; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.12rem; }
.rca-detail-meta-item .val { font-weight: 500; color: #212529; word-break: break-word; }
.rca-detail-insight-note { font-size: 0.8rem; color: #6c757d; margin-top: 0.5rem; }
.rca-parse-error-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #664d03;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
}
.rca-parse-badge { display: inline-block; padding: 0.2rem 0.45rem; border-radius: 4px; font-size: 0.75rem; text-transform: capitalize; }
.rca-parse-ok { background: #d1e7dd; color: #0f5132; }
.rca-parse-partial { background: #fff3cd; color: #664d03; }
.rca-parse-error { background: #f8d7da; color: #842029; }
.rca-parse-unknown { background: #e9ecef; color: #495057; }
.rca-file-link { color: #0d6efd; text-decoration: none; }
.rca-file-link:hover { text-decoration: underline; }
.rca-local-badge { font-size: 0.78rem; color: #495057; }
.calendar-page-container { max-width: 1100px; margin: 0 auto; }
.calendar-header-section { margin-bottom: 1.25rem; }
.calendar-title-row { margin-bottom: 1rem; }
.calendar-title-row h2 { color: #1a1a2e; font-size: 1.5rem; margin-bottom: 0.25rem; }
.calendar-filters-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; background: #f8f9fa; padding: 1rem; border-radius: 8px; }
.filter-toggles { display: flex; gap: 0.4rem; }
.filter-toggle { padding: 0.4rem 0.75rem; border: none; border-radius: 15px; font-size: 0.8rem; font-weight: 500; cursor: pointer; background: #e9ecef; color: #495057; transition: all 0.2s; }
.filter-toggle:hover { background: #dee2e6; }
.filter-toggle.active { background: #007bff; color: #fff; }
.filter-toggle[data-type="qbrs"].active { background: #fd7e14; }
.filter-toggle[data-type="renewals"].active { background: #ffc107; color: #212529; }
.filter-toggle[data-type="projects"].active { background: #17a2b8; }
.today-btn { padding: 0.4rem 0.75rem; background: #28a745; color: #fff; border: none; border-radius: 6px; font-size: 0.8rem; cursor: pointer; }
.today-btn:hover { background: #218838; }
.calendar-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat-box { background: #fff; padding: 1rem; border-radius: 8px; text-align: center; border: 1px solid #dee2e6; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: #007bff; }
.stat-label { font-size: 0.8rem; color: #6c757d; }
.calendar-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.calendar-main { flex: 1; background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.calendar-nav-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.nav-btn { background: #007bff; color: #fff; border: none; padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.nav-btn:hover:not(:disabled) { background: #0056b3; }
.nav-btn:disabled { background: #6c757d; opacity: 0.5; cursor: not-allowed; }
.month-year { font-size: 1.1rem; font-weight: 600; color: #1a1a2e; }
.calendar-grid { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8f9fa; border-bottom: 1px solid #dee2e6; }
.calendar-weekdays div { padding: 0.6rem; text-align: center; font-weight: 600; font-size: 0.8rem; color: #495057; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day { min-height: 85px; border-right: 1px solid #e9ecef; border-bottom: 1px solid #e9ecef; padding: 0.4rem; cursor: pointer; transition: background 0.2s; }
.calendar-day:nth-child(7n) { border-right: none; }
.calendar-day:hover { background: #f8f9fa; }
.calendar-day.other-month { background: #f8f9fa; color: #adb5bd; }
.calendar-day.today { background: #e3f2fd; border: 2px solid #2196f3; }
.calendar-day.selected { background: #fff3cd; border: 2px solid #ffc107; }
.day-num { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.25rem; }
.day-events { display: flex; flex-direction: column; gap: 2px; }
.event-dot { height: 4px; border-radius: 2px; }
.event-dot.qbr { background: #fd7e14; }
.event-dot.renewal { background: #ffc107; }
.event-dot.project { background: #17a2b8; }
.event-panel { width: 320px; background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-left: 4px solid #007bff; max-height: 500px; overflow-y: auto; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #dee2e6; }
.panel-header h3 { margin: 0; font-size: 1rem; color: #1a1a2e; }
.close-btn { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: #6c757d; }
.panel-events { display: flex; flex-direction: column; gap: 0.6rem; }
.panel-event { padding: 0.6rem; border-radius: 6px; border-left: 4px solid; background: #f8f9fa; cursor: pointer; }
.panel-event:hover { background: #e9ecef; }
.panel-event.qbr { border-left-color: #fd7e14; }
.panel-event.renewal { border-left-color: #ffc107; }
.panel-event.project { border-left-color: #17a2b8; }
.panel-event-title { font-weight: 600; font-size: 0.9rem; color: #1a1a2e; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.4rem; }
.panel-event-meta { font-size: 0.8rem; color: #6c757d; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.panel-event-category { display: inline-block; padding: 0.15rem 0.4rem; font-size: 0.65rem; font-weight: 600; border-radius: 8px; text-transform: uppercase; }
.panel-event-category.logo { background-color: #ff6b6b; color: white; }
.panel-event-category.growth { background-color: #4ecdc4; color: white; }
.panel-event-category.retention { background-color: #45b7d1; color: white; }
.panel-event-category.growth-plus-retention { background-color: #f7b731; color: white; }

@media (max-width: 1024px) { .sidebar { width: 220px; } .main-content { margin-left: 220px; } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .sidebar { transform: translateX(-100%); } .main-content { margin-left: 0; } }
/* R&G BUBBLE CHART */
.rg-container { padding: 1.5rem; }
.rg-header { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.rg-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.rg-title { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; }
.rg-filters { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.rg-view-toggle { display: flex; background: #e9ecef; border-radius: 6px; padding: 3px; }
.rg-view-btn { padding: 0.4rem 1rem; border: none; background: transparent; font-size: 0.85rem; color: #495057; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.rg-view-btn.active { background: #fff; color: #1a1a2e; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.rg-view-btn:hover:not(.active) { color: #1a1a2e; }
.rg-list-container { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; overflow-x: auto; }
.rg-list-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rg-list-table thead { background: #f8f9fa; }
.rg-list-table th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6; white-space: nowrap; }
.rg-list-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #eee; }
.rg-list-table tbody tr { cursor: pointer; transition: background 0.15s; }
.rg-list-table tbody tr:hover { background: #f8f9fa; }
.rg-list-table .account-name { font-weight: 500; color: #667eea; display: flex; align-items: center; gap: 0.5rem; }
.rg-segment-bullet { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rg-list-table .empty-cell { color: #adb5bd; font-style: italic; }
.rg-list-table .header-group { background: #667eea; color: #fff; text-align: center; border-bottom: none; }
.rg-list-table .header-subrow th { background: #e8ecfc; color: #495057; font-size: 0.8rem; border-top: none; }
.rg-th-unit { display: block; font-weight: 500; color: #6c757d; font-size: 0.7rem; margin-top: 0.15rem; }
.rg-list-table .header-group-row th { vertical-align: bottom; }
.rg-list-table .opp-cell { background: rgba(102, 126, 234, 0.03); }
.rg-opp-summary { display: flex; justify-content: flex-end; padding: 1rem; background: #f8f9fa; border-top: 1px solid #dee2e6; }
.rg-opp-summary-box { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 0.75rem 1.5rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); }
.rg-opp-summary-label-wrap { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rg-opp-summary-label { font-size: 0.85rem; opacity: 0.9; }
.rg-opp-summary-unit { font-size: 0.7rem; opacity: 0.85; font-weight: 500; margin-top: 0.1rem; }
.rg-opp-summary-value { font-size: 1.25rem; font-weight: 700; }
.rg-filter-group { display: flex; align-items: center; gap: 0.5rem; }
.rg-filter-label { font-size: 0.85rem; font-weight: 500; color: #495057; }
.rg-filter-select { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; background: #fff; cursor: pointer; min-width: 80px; }
.rg-filter-select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.rg-toggle-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.85rem; color: #495057; }
.rg-toggle-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #667eea; }
.rg-toggle-text { user-select: none; }
.rg-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.rg-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: #495057; }
.rg-legend-item.hidden { opacity: 0.4; text-decoration: line-through; }
.rg-legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.rg-legend-dot.logo { background: #ff6b6b; }
.rg-legend-dot.growth { background: #4ecdc4; }
.rg-legend-dot.retention { background: #45b7d1; }
.rg-legend-dot.growth-plus-retention { background: #f7b731; }
.rg-legend-dot.allother { background: #adb5bd; }
.rg-chart-container { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: relative; height: 600px; }
.rg-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.rg-stats { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.rg-stat { background: #f8f9fa; padding: 0.75rem 1rem; border-radius: 8px; text-align: center; min-width: 100px; }
.rg-stat-value { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; }
.rg-stat-label { font-size: 0.75rem; color: #6c757d; margin-top: 0.2rem; }

/* Recent Wins */
.rw-container { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.rw-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.rw-title { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; }
.rw-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.rw-filter-group { display: flex; align-items: center; gap: 0.5rem; }
.rw-filter-label { font-size: 0.85rem; font-weight: 500; color: #495057; }
.rw-search-input { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; min-width: 220px; max-width: 320px; }
.rw-search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.rw-filter-select { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; background: #fff; cursor: pointer; min-width: 120px; }
.rw-filter-select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.rw-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rw-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: #495057; }
.rw-table-wrap { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: auto; }
.rw-table.rg-list-table th { white-space: nowrap; }
.rw-table .rw-val { text-align: right; font-variant-numeric: tabular-nums; }
.rw-meta { font-size: 0.75rem; color: #6c757d; margin-top: 0.5rem; }
.rw-title-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; }
.rw-view-toggle { display: flex; background: #e9ecef; border-radius: 6px; padding: 3px; }
.rw-list-view { min-height: 200px; }
.rw-chart-view { padding-top: 0.25rem; }
.rw-chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.rw-chart-toolbar label { font-size: 0.85rem; font-weight: 500; color: #495057; display: flex; align-items: center; gap: 0.5rem; }
.rw-chart-toolbar select { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; background: #fff; min-width: 100px; }
.rw-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .rw-charts-row { grid-template-columns: 1fr; } }
.rw-chart-panel { background: #fff; border-radius: 12px; padding: 1rem 1rem 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.rw-chart-panel h4 { margin: 0 0 0.5rem 0; font-size: 0.95rem; font-weight: 600; color: #1a1a2e; }
.rw-chart-panel .rw-chart-sub { font-size: 0.75rem; color: #6c757d; margin-bottom: 0.5rem; }
.rw-chart-canvas-wrap { position: relative; height: 300px; max-width: 100%; }
.rw-chart-summary-line { font-size: 0.85rem; color: #495057; margin-top: 1rem; padding: 0.75rem 1rem; background: #f8f9fa; border-radius: 8px; }

/* Projects Page */
.projects-container { padding: 1.5rem; position: relative; }
.projects-header { display: flex; flex-direction: column; align-items: stretch; margin-bottom: 1rem; gap: 0.75rem; }
.projects-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.projects-title { font-size: 1.25rem; font-weight: 600; color: #1a1a2e; }
.projects-ai-insight-btn {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6c5ce7 0%, #5b4fcf 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.35);
    white-space: nowrap;
}
.projects-ai-insight-btn:hover { filter: brightness(1.06); }
.projects-ai-insight-btn:focus-visible { outline: 2px solid #a29bfe; outline-offset: 2px; }

.projects-insight-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    box-sizing: border-box;
}
.projects-insight-backdrop[hidden] { display: none !important; }
.projects-insight-panel {
    background: #fff;
    border-radius: 14px;
    max-width: 960px;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    padding: 0;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}
.projects-insight-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}
.projects-insight-panel-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #1a1a2e; }
.projects-insight-close {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: #f1f3f5;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #495057;
}
.projects-insight-close:hover { background: #e9ecef; }
.projects-insight-lede {
    margin: 0;
    padding: 0.75rem 1.25rem 0;
    font-size: 0.88rem;
    color: #495057;
    line-height: 1.45;
}
.projects-insight-body { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; flex: 1; }
.projects-insight-llm-card {
    background: linear-gradient(135deg, #f8f7ff 0%, #fff 100%);
    border: 1px solid #e0dcff;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.projects-insight-llm-card h3 { margin: 0 0 0.5rem 0; font-size: 0.95rem; font-weight: 600; color: #5b4fcf; }
.projects-insight-llm-text { font-size: 0.9rem; line-height: 1.5; color: #212529; }
.projects-insight-llm-card--muted {
    background: #f8f9fa;
    border-color: #e9ecef;
}
.projects-insight-llm-card--muted h3 { color: #6c757d; }
.projects-insight-llm-p { margin: 0 0 0.65rem 0; }
.projects-insight-llm-p:last-child { margin-bottom: 0; }
.projects-insight-card--full { grid-column: 1 / -1; max-width: 100%; }
.projects-insight-ado-summary { font-size: 0.88rem; line-height: 1.45; color: #343a40; margin: 0 0 0.5rem 0; }
.projects-insight-loading, .projects-insight-error { padding: 2rem; text-align: center; color: #6c757d; }
.projects-insight-error { color: #c92a2a; }
.projects-insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 800px) { .projects-insight-grid { grid-template-columns: 1fr; } }
.projects-insight-card {
    background: #f8f9fc;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 1rem;
}
.projects-insight-card h3 {
    margin: 0 0 0.65rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}
.projects-insight-card-note { font-size: 0.78rem; color: #868e96; margin-top: 0.5rem; line-height: 1.35; }
.projects-insight-chart-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.projects-insight-pie {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.projects-insight-legend { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; color: #495057; }
.projects-insight-legend span { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.4rem; vertical-align: middle; }
.projects-insight-region-wrap { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.projects-insight-region-wrap label { font-size: 0.85rem; font-weight: 500; color: #495057; }
.projects-insight-region-wrap select {
    padding: 0.35rem 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}
.projects-insight-posture-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.projects-insight-posture-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.projects-insight-posture-row .lbl { min-width: 120px; color: #495057; }
.projects-insight-posture-row .bar { flex: 1; height: 10px; border-radius: 5px; background: #dee2e6; overflow: hidden; display: flex; }
.projects-insight-posture-row .bar-fill { height: 100%; border-radius: 5px; }
.projects-insight-table-wrap { overflow-x: auto; margin-top: 1rem; border-radius: 8px; border: 1px solid #e9ecef; }
.projects-insight-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.projects-insight-table th, .projects-insight-table td { padding: 0.5rem 0.65rem; text-align: left; border-bottom: 1px solid #eee; }
.projects-insight-table thead { background: #f1f3f5; }
.projects-insight-table tbody tr:hover { background: #fafbff; }
.projects-insight-table .cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.projects-filters { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
/* Metrics & Trends: only region + new/migration (JS sets data-projects-view + .projects-header--metrics; inline display as fallback). */
.projects-header--metrics #projects-filter-group-search,
.projects-header--metrics #projects-filter-group-status,
.projects-header--metrics #projects-filter-group-on-prem,
.projects-header--metrics #projects-filter-group-completion,
.projects-header--metrics #projects-stats,
#page-projects[data-projects-view="metrics"] #projects-filter-group-search,
#page-projects[data-projects-view="metrics"] #projects-filter-group-status,
#page-projects[data-projects-view="metrics"] #projects-filter-group-on-prem,
#page-projects[data-projects-view="metrics"] #projects-filter-group-completion,
#page-projects[data-projects-view="metrics"] #projects-stats {
    display: none !important;
}
.projects-filter-group { display: flex; align-items: center; gap: 0.5rem; }
.projects-filter-label { font-size: 0.85rem; font-weight: 500; color: #495057; }
.projects-filter-select { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; background: #fff; cursor: pointer; min-width: 80px; }
.projects-filter-select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.projects-search-input { padding: 0.4rem 0.75rem; border: 1px solid #dee2e6; border-radius: 6px; font-size: 0.85rem; background: #fff; min-width: 200px; max-width: 280px; }
.projects-search-input::placeholder { color: #adb5bd; }
.projects-search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
.projects-checkbox-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: #495057; cursor: pointer; user-select: none; white-space: nowrap; }
.projects-checkbox-label input { width: 16px; height: 16px; accent-color: #667eea; cursor: pointer; }
.projects-toggle { display: flex; background: #e9ecef; border-radius: 6px; padding: 3px; }
.projects-filter-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.projects-toggle-btn { padding: 0.4rem 1rem; border: none; background: transparent; font-size: 0.85rem; color: #495057; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.projects-toggle-btn.active { background: #fff; color: #1a1a2e; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.projects-toggle-btn:hover:not(.active) { color: #1a1a2e; }
.projects-stats { display: flex; gap: 1.5rem; }
.projects-stat { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.projects-stat-count { font-weight: 600; }
.projects-stat-count.green { color: #28a745; }
.projects-stat-count.amber { color: #ffc107; }
.projects-stat-count.red { color: #dc3545; }
.projects-legend { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.projects-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #495057; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.green { background: #28a745; }
.status-dot.amber { background: #ffc107; }
.status-dot.red { background: #dc3545; }
.status-dot.completed { background: #6c757d; }
.projects-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; }
.projects-table-container { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; overflow-x: auto; }
.projects-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.projects-table thead { background: #f8f9fa; }
.projects-table th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: #495057; border-bottom: 2px solid #dee2e6; white-space: nowrap; }
.projects-table th.th-status { width: 50px; text-align: center; }
.projects-table th.header-group { background: #667eea; color: #fff; text-align: center; border-bottom: none; }
.projects-table .header-group-row th { vertical-align: bottom; }
.projects-table .header-subrow th { background: #e8ecfc; color: #495057; font-size: 0.8rem; border-top: none; }
.projects-table .asset-cell { background: rgba(102, 126, 234, 0.03); text-align: center; }
.projects-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.projects-table tbody tr { cursor: pointer; transition: background 0.15s; }
.projects-table tbody tr:hover { background: #f8f9fa; }
.projects-table .status-cell { width: 50px; text-align: center; }
.projects-table .completion-bar { width: 80px; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 0.5rem; }
.projects-table .completion-fill { height: 100%; border-radius: 4px; }
.projects-table .completion-fill.green { background: #28a745; }
.projects-table .completion-fill.amber { background: #ffc107; }
.projects-table .completion-fill.red { background: #dc3545; }
.projects-table .completion-fill.completed { background: #6c757d; }
.projects-table .completion-text { font-size: 0.85rem; color: #495057; }
.projects-table .project-name { font-weight: 500; color: #1a1a2e; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects-table .account-name { color: #667eea; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects-table .date-cell { white-space: nowrap; color: #6c757d; }
.projects-table .date-cell.overdue { color: #dc3545; font-weight: 500; }
.projects-table .projects-status-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #495057; font-size: 0.88rem; }

/* Project analytics (full page, same shell as account hub) */
#projects-analytics-root .customer-hub-header { margin-bottom: 0.5rem; }
#projects-analytics-content .pa-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 900px) {
    #projects-analytics-content .pa-kpi-row { grid-template-columns: 1fr; }
}
#projects-analytics-content .pa-kpi h3 { margin: 0 0 0.4rem; font-size: 1rem; }
#projects-analytics-content .pa-kpi-big { font-size: 1.85rem; font-weight: 700; color: #1a1a2e; margin: 0 0 0.25rem; }
#projects-analytics-content .pa-note { font-size: 0.85rem; color: #6c757d; margin: 0.2rem 0; line-height: 1.4; }
#projects-analytics-content .pa-subh { font-size: 0.9rem; font-weight: 600; color: #495057; margin: 0.75rem 0 0.35rem; }
#projects-analytics-content .pa-h3 { font-size: 1.1rem; font-weight: 600; color: #1a1a2e; margin: 1.25rem 0 0.5rem; }
#projects-analytics-content .pa-table-wrap { overflow-x: auto; margin: 0.4rem 0; border: 1px solid #e9ecef; border-radius: 8px; }
#projects-analytics-content .pa-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
#projects-analytics-content .pa-table th, #projects-analytics-content .pa-table td { padding: 0.45rem 0.55rem; text-align: left; border-bottom: 1px solid #eee; }
#projects-analytics-content .pa-table thead { background: #f1f3f5; }
#projects-analytics-content .pa-table .cell-num { text-align: right; font-variant-numeric: tabular-nums; }
#projects-analytics-content .pa-llm { background: linear-gradient(135deg, #f8f7ff 0%, #fff 100%); border: 1px solid #e0dcff; }
#projects-analytics-content .pa-llm h3 { color: #5b4fcf; }
#projects-analytics-content .pa-llm-p { margin: 0 0 0.6rem; font-size: 0.92rem; line-height: 1.5; }
#projects-analytics-content .pa-err { color: #c92a2a; padding: 1rem; }
#projects-analytics-content .pa-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0.5rem 0; }
@media (max-width: 900px) { #projects-analytics-content .pa-two-col { grid-template-columns: 1fr; } }
#projects-analytics-content .pa-posture { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
#projects-analytics-content .pa-bar { flex: 1; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
#projects-analytics-content .pa-bar i { display: block; height: 100%; background: #2b8a3e; border-radius: 4px; }
#projects-analytics-content .pa-bar i.br { background: #5c7cfa; }
#projects-analytics-content .pa-dr-list { font-size: 0.85rem; margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
#projects-analytics-content .pa-dr-n { color: #495057; font-weight: 600; }
#projects-analytics-content .pa-region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin: 0.5rem 0 1rem; }
#projects-analytics-content .pa-region-card { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; padding: 0.65rem 0.75rem; font-size: 0.82rem; }
#projects-analytics-content .pa-region-meta { color: #6c757d; margin-top: 0.2rem; }
#projects-analytics-content .pa-delay { max-width: 220px; font-size: 0.78rem; }
.pa-lede { font-size: 0.9rem; color: #495057; margin: 0.25rem 0 0.75rem; line-height: 1.5; }
.project-analytics-body { min-height: 6rem; }

/* Projects: list vs metrics tab */
.projects-view-tabs {
    display: flex;
    gap: 0.35rem;
    margin: 0.75rem 0 0.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}
.projects-view-tab {
    padding: 0.45rem 1rem;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: 0.9rem;
    color: #495057;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 500;
}
.projects-view-tab:hover { background: #f8f9fa; }
.projects-view-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
.projects-metrics-lede { font-size: 0.88rem; color: #495057; margin: 0 0 0.75rem; line-height: 1.45; }
.projects-metrics-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.projects-metrics-body { margin-top: 0.5rem; }
.pm-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pm-kpi {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
}
.pm-kpi strong { display: block; font-size: 1.35rem; font-weight: 700; color: #1a1a2e; }
.pm-kpi strong.pm-kpi-num--good { color: #198754; }
.pm-kpi strong.pm-kpi-num--bad { color: #dc3545; }
.pm-kpi .pm-kpi-hint { color: #6c757d; font-size: 0.8rem; margin: 0.2rem 0 0; }
.pm-kpi--drillable { cursor: pointer; user-select: none; }
.pm-kpi--drillable:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }
.projects-metrics-drilldown { margin-top: 0.5rem; }
.projects-metrics-drilldown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.projects-metrics-drilldown-back {
    font-size: 0.9rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background: #fff;
    color: #495057;
    cursor: pointer;
}
.projects-metrics-drilldown-back:hover { background: #f8f9fa; }
.projects-metrics-drilldown-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1 1 auto;
    min-width: 0;
}
.projects-metrics-drilldown-table-wrap { margin-top: 0.25rem; }
.projects-metrics-drilldown .projects-table tbody tr { cursor: default; }
.pm-h3 { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin: 0 0 0.35rem; }
/* Metrics charts: one row = title (flex) + info icon; tooltip is JS (hidden) + same-row layout. */
#projects-metrics-panel .pm-chart-head {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.5rem 0;
}
#projects-metrics-panel .pm-chart-h3 {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
    color: #1a1a2e;
}
#projects-metrics-panel .pm-chart-title-text {
    display: inline;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
#projects-metrics-panel .pm-info-wrap {
    position: relative;
    flex: 0 0 auto;
    align-self: center;
    line-height: 0;
    z-index: 5;
}
#projects-metrics-panel .pm-chart-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    cursor: help;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
    transition: background 0.15s, transform 0.1s;
    vertical-align: middle;
}
#projects-metrics-panel .pm-chart-info-btn:hover,
#projects-metrics-panel .pm-chart-info-btn:focus-visible {
    background: #495057;
    outline: 2px solid rgba(102, 126, 234, 0.45);
    outline-offset: 1px;
}
#projects-metrics-panel .pm-chart-info-svg {
    display: block;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
/* Shown by toggling the [hidden] attribute in initProjectMetricsInfoTooltips. */
#projects-metrics-panel .pm-info-wrap .pm-info-tooltip {
    position: absolute;
    z-index: 200;
    top: calc(100% + 0.2rem);
    right: 0;
    left: auto;
    width: min(18.5rem, calc(100vw - 1.5rem));
    max-width: 100vw;
    margin: 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    color: #212529;
    text-align: left;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    box-sizing: border-box;
}
#projects-metrics-panel .pm-info-wrap .pm-info-tooltip:not([hidden]) {
    display: block !important;
    visibility: visible;
    pointer-events: auto;
}
#projects-metrics-panel .pm-info-wrap .pm-info-tooltip[hidden] {
    display: none !important;
    pointer-events: none;
}
#projects-metrics-panel .pm-info-tooltip strong { font-weight: 600; }
#projects-metrics-panel .pm-info-tooltip em { font-style: italic; }
.pm-note { font-size: 0.83rem; color: #6c757d; margin: 0 0 0.5rem; line-height: 1.4; }
.pm-charts { display: flex; flex-direction: column; gap: 1.5rem; }
/* Delay themes + SLA trend: side by side */
.pm-delay-sla-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    margin: 1.25rem 0 0;
    min-height: 0;
}
.pm-delay-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    max-height: 520px;
    padding: 1rem;
    background: #f7f9fc;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
}
.pm-delay-lede {
    font-size: 0.82rem;
    color: #495057;
    margin: 0 0 0.5rem;
    line-height: 1.45;
}
.pm-delay-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 260px;
    height: 100%;
    max-width: 100%;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
}
.pm-trend-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    max-height: 520px;
}
.pm-trend-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 340px;
    height: 100%;
    max-width: 100%;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
}
/* Full-width AI insight below delay + SLA row */
.pm-ai-full-row {
    margin: 1rem 0 0;
    min-height: 0;
}
.pm-ai-col-full {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: 520px;
    padding: 1rem;
    background: #f8f7ff;
    border: 1px solid #e0dcff;
    border-radius: 8px;
    min-width: 0;
}
.pm-ai-content--scroll-full {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
}
@media (max-width: 1000px) {
    .pm-delay-sla-row {
        grid-template-columns: 1fr;
    }
    .pm-delay-col { max-height: none; }
    .pm-trend-col { max-height: none; }
}
.pm-chart-canvas-wrap {
    position: relative;
    /* Taller now that the description sits in the (i) tooltip */
    height: 320px;
    max-width: 100%;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
}
.pm-ai { margin: 1.25rem 0; padding: 1rem; background: #f8f7ff; border: 1px solid #e0dcff; border-radius: 8px; }
.pm-ai-col .pm-ai-actions,
.pm-ai-col-full .pm-ai-actions { margin-bottom: 0.5rem; }
.pm-ai-actions { margin-bottom: 0.5rem; }
.pm-ai-hint { font-size: 0.84rem; color: #5c4fcf; margin: 0.35rem 0; }
.pm-ai-content .pa-llm-p { font-size: 0.9rem; line-height: 1.5; margin: 0 0 0.5rem; }
.pm-details { margin-top: 1rem; background: #fff; border: 1px solid #e9ecef; border-radius: 8px; padding: 0.75rem; }
.pm-details summary { font-weight: 600; cursor: pointer; color: #495057; }
.projects-metrics-tables { margin-top: 0.75rem; }
.pm-empty { padding: 1.5rem; text-align: center; color: #6c757d; font-size: 0.9rem; }
@media (min-width: 1000px) {
    .pm-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
}
.projects-metrics-tables .pa-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
.projects-metrics-tables .pa-table th,
.projects-metrics-tables .pa-table td { padding: 0.45rem 0.55rem; text-align: left; border-bottom: 1px solid #eee; }
.projects-metrics-tables .pa-table thead { background: #f1f3f5; }
.projects-metrics-tables .pa-table .cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.projects-metrics-tables .pa-h3 { font-size: 1rem; font-weight: 600; color: #1a1a2e; }
.projects-metrics-tables .pa-table-wrap { overflow-x: auto; margin: 0.4rem 0; border: 1px solid #e9ecef; border-radius: 8px; }

/* ==================== PRODUCT ADOPTION — account drill-down ==================== */
#page-adoption[data-adoption-view="account"] { background: #f0f2f5; }
.adoption-account-view { min-height: calc(100vh - 4rem); padding: 0 0 2rem; }
.adoption-account-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.adoption-account-loading { display: flex; align-items: center; gap: 0.75rem; padding: 2rem; color: #6c757d; }
.adoption-account-error { margin: 1rem 0; padding: 1rem 1.25rem; background: #fff3f0; border: 1px solid #ffc9c2; border-radius: 8px; color: #c92a2a; }
.adoption-account-header { margin: 0.5rem 0 1rem; }
.adoption-account-h1 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin: 0 0 0.25rem; }
.adoption-account-sub { font-size: 0.9rem; color: #6c757d; margin: 0; }
.adoption-account-assets { display: flex; flex-direction: column; gap: 1.25rem; }
.adoption-asset-section { padding: 1.25rem; }
.adoption-asset-h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; color: #1a1a2e; }
.adoption-asset-idx { font-weight: 500; color: #868e96; font-size: 0.85rem; }

/* Product Adoption — list sub-tabs (Accounts | Trends & Metrics) */
.adoption-page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0 0.25rem;
    border-bottom: 1px solid #dee2e6;
}
.adoption-page-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.9rem 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    margin-bottom: -1px;
}
.adoption-page-tab:hover { color: #1a1a2e; }
.adoption-page-tab.active {
    color: #1a1a2e;
    border-bottom-color: #1971c2;
}
.adoption-trends-meta {
    font-size: 0.85rem;
    color: #495057;
    margin: 0 0 1rem;
    line-height: 1.4;
}
.adoption-tiles--trends {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.adoption-tile--trend {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 4rem;
    justify-content: center;
    padding: 0.5rem 0.4rem;
}
.adoption-trend-count {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #1971c2;
    line-height: 1.1;
    margin-top: 0.15rem;
    margin-bottom: 0;
}
.adoption-tile--trend .adoption-tile-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.25;
    margin: 0 0 0.25rem;
    max-width: 100%;
}
.adoption-trends-hint { font-weight: 500; color: #868e96; font-size: 0.75rem; }
.adoption-tiles--trend-scope {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}
@media (max-width: 700px) {
    .adoption-tiles--trend-scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Four top-level boxes: 2x2 on wide screens */
.adoption-four-boxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 900px) {
    .adoption-four-boxes {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
    }
}
.adoption-box {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    min-width: 0;
}
.adoption-box-h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}
.adoption-box-empty { font-size: 0.88rem; color: #868e96; margin: 0; }

.adoption-tiles {
    display: grid;
    gap: 0.6rem;
}
.adoption-tiles--metric {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.adoption-tiles--integration {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
.adoption-tiles--feature {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.adoption-tile {
    background: #f8f9fc;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
    min-width: 0;
}
.adoption-tile--integration {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3.4rem;
}
.adoption-tile--integration .adoption-tile-name {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    margin-bottom: 0.35rem;
}
.adoption-tile--integration .adoption-tile-value.integration-cell {
    font-size: 0.88rem;
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}
.adoption-tile--metric .adoption-tile-name,
.adoption-tile--feature .adoption-tile-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}
.adoption-tile--metric .adoption-tile-value.metric-cell {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
    font-variant-numeric: tabular-nums;
}
.adoption-tile--feature .adoption-tile-value {
    font-size: 0.9rem;
    font-weight: 600;
}
.adoption-tile--feature .adoption-flag.is-enabled {
    color: #2b8a3e;
}
.adoption-tile--feature .adoption-flag.is-disabled {
    color: #868e96;
}
.adoption-tile--feature .adoption-flag.is-raw {
    color: #212529;
}
.adoption-tile--feature .adoption-flag.is-off {
    color: #adb5bd;
    font-weight: 500;
}
.adoption-security-subh {
    font-size: 0.8rem;
    font-weight: 700;
    color: #495057;
    margin: 0.75rem 0 0.45rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}
.adoption-security-metrics {
    margin-bottom: 0.25rem;
}
.adoption-security-metrics-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
}
.adoption-security-breach-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    width: 100%;
    align-items: start;
}
.adoption-security-breach-inner {
    grid-column: 2;
    width: 100%;
    min-width: 0;
}
.adoption-security-breach-inner .adoption-tile {
    text-align: center;
}
.adoption-security-three-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 560px) {
    .adoption-security-breach-inner {
        grid-column: 1 / -1;
    }
    .adoption-security-three-row {
        grid-template-columns: 1fr;
    }
}
.adoption-tiles--in-security {
    margin-top: 0.25rem;
}

.adoption-info-banner {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #495057;
    background: #fff9e6;
    border: 1px solid #ffe8a3;
    border-radius: 10px;
}
.adoption-tiles--per-asset {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.adoption-tile--per-asset {
    min-height: auto;
    padding: 0.55rem 0.6rem;
}
.adoption-tile--per-asset .adoption-tile-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
}
.adoption-tile-stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.adoption-tile--per-asset .adoption-tile-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.8rem;
}
.adoption-tile--per-asset .adoption-tile-meta .lbl { color: #868e96; }
.adoption-tile--per-asset .adoption-tile-meta .val {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #212529;
}
.adoption-per-asset-section { margin-top: 0.5rem; }

/* ==================== CUSTOMER ACCOUNT HUB (full-page) ==================== */
.customer-hub-root { min-height: calc(100vh - 4rem); background: #f0f2f5; padding: 0 0 2rem; }
.customer-hub-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.customer-hub-back {
    margin: 0.75rem 0 0.5rem;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    color: #6c5ce7;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
}
.customer-hub-back:hover { background: rgba(108, 92, 231, 0.08); }
.customer-hub-header {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 0.75rem;
}
.customer-hub-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.85rem; }
.customer-hub-h1 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; }
.customer-hub-category {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(108, 92, 231, 0.12);
    color: #5b4fcf;
    text-transform: capitalize;
}
.customer-hub-ask {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #f8f9fc;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    margin-bottom: 1rem;
}
.customer-hub-ask-btn {
    flex: 1;
    text-align: left;
    background: none;
    border: none;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
}
.customer-hub-ask-btn:hover { color: #6c5ce7; }
.customer-hub-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.customer-hub-kpi {
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
}
.customer-hub-kpi-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #868e96; margin-bottom: 0.35rem; }
.customer-hub-kpi-value { font-size: 1.05rem; font-weight: 700; color: #212529; }
.customer-hub-kpi-value.risk-tier-critical { color: #c92a2a; }
.customer-hub-kpi-value.risk-tier-high { color: #e8590c; }
.customer-hub-kpi-value.risk-tier-medium { color: #f08c00; }
.customer-hub-kpi-value.risk-tier-low { color: #2b8a3e; }
.customer-hub-kpi-value.health-risk { color: #c92a2a; }
.customer-hub-kpi-value.health-ok { color: #2b8a3e; }
.customer-hub-kpi-value.kpi-adoption-strong { color: #2b8a3e; }
.customer-hub-kpi-value.kpi-adoption-mid { color: #f08c00; }
.customer-hub-kpi-value.kpi-adoption-weak { color: #c92a2a; }
/* Account hub — risk factors as scannable tiles */
.hub-risk-card .hub-risk-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 0.65rem;
}
.hub-risk-tile {
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    min-height: 2.75rem;
    box-sizing: border-box;
}
.hub-risk-tile--kv {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
}
.hub-risk-tile-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #868e96;
    line-height: 1.25;
}
.hub-risk-tile-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.25;
    word-break: break-word;
}
.hub-risk-tile-value.hub-risk-val--favorable { color: #2b8a3e; }
.hub-risk-tile-value.hub-risk-val--watch { color: #e67700; }
.hub-risk-tile-value.hub-risk-val--concern { color: #c92a2a; }
.hub-risk-tile-value.hub-risk-val--accent {
    color: #1a1a2e;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.hub-risk-tile--plain {
    display: flex;
    align-items: center;
}
.hub-risk-tile-plain {
    font-size: 0.88rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.4;
}
.customer-hub-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    background: #e9ecef;
    border-radius: 10px;
    margin-bottom: 1rem;
}
.customer-hub-tab {
    flex: 1;
    max-width: 200px;
    padding: 0.55rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #495057;
    cursor: pointer;
}
.customer-hub-tab:hover { background: rgba(255,255,255,0.7); }
.customer-hub-tab.active { background: #fff; color: #6c5ce7; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.customer-hub-panels { position: relative; }
.customer-hub-panel { display: none; }
.customer-hub-panel.active { display: block; }
.customer-hub-loading { padding: 2rem; text-align: center; color: #868e96; }
.customer-hub-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1rem;
    align-items: start;
}
.customer-hub-main-col,
.customer-hub-side-col { min-width: 0; }
@media (max-width: 1100px) {
    .customer-hub-grid { grid-template-columns: 1fr; }
}
.customer-hub-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}
.customer-hub-card h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #868e96;
    margin-bottom: 0.75rem;
}
.customer-hub-featured-meta { font-size: 0.88rem; color: #495057; margin-top: 0.35rem; }
.hub-gong-featured-card .customer-hub-featured-meta {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.45rem;
}
.hub-gong-featured-participants {
    margin: 0.35rem 0 0.65rem;
    padding-top: 0.35rem;
    border-top: 1px solid #eee;
}
.hub-gong-featured-card .gong-activity-part-line {
    margin-bottom: 0.4rem;
}
.hub-gong-featured-summary {
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}
.hub-gong-featured-sec {
    margin-bottom: 0.9rem;
}
.hub-gong-featured-sec:last-child {
    margin-bottom: 0;
}
.hub-gong-featured-sec-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c5ce7;
    margin: 0 0 0.4rem;
}
.hub-gong-featured-sec-body {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #343a40;
}
.hub-gong-featured-sec-empty {
    margin: 0;
    font-size: 0.84rem;
    color: #adb5bd;
}
.hub-gong-featured-empty {
    margin: 0;
    font-size: 0.88rem;
    color: #868e96;
}
.hub-gong-featured-sec--fallback .hub-gong-featured-sec-body {
    font-size: 0.84rem;
}
.customer-hub-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
}
.customer-hub-detail-item { font-size: 0.88rem; }
.customer-hub-detail-item .lbl { display: block; font-size: 0.65rem; color: #868e96; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.15rem; }
.customer-hub-detail-item .val { font-weight: 600; color: #212529; }
.hub-projects-wrap { overflow-x: auto; }
/* Sidebar opportunities: show ~3 rows; scroll inside the box for the rest */
.hub-side-opps-scroll {
    max-height: calc(2.35rem + 3 * 2.45rem);
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: #fff;
}
.hub-side-opps-scroll .hub-projects-table { margin-bottom: 0; }
.hub-side-opps-scroll .hub-projects-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 #dee2e6;
}
.hub-projects-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.hub-projects-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid #dee2e6;
}
.hub-projects-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.hub-projects-table tr.hub-project-delay td { background: rgba(255, 193, 7, 0.06); }
.hub-license-signals-table .hub-license-product { font-weight: 600; max-width: 260px; }
.hub-license-signals-table th.hub-num-col,
.hub-license-signals-table td.hub-num-col { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-license-empty { color: #868e96; font-size: 0.88rem; margin: 0; }
.hub-status-pill {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}
.hub-status-pill.status-active { background: rgba(40, 167, 69, 0.15); color: #1e7e34; }
.hub-status-pill.status-risk { background: rgba(220, 53, 69, 0.12); color: #c92a2a; }
.hub-status-pill.status-warn { background: rgba(255, 193, 7, 0.2); color: #a15c00; }
.hub-status-pill.status-neutral { background: #e9ecef; color: #495057; }
.hub-opp-amount { font-variant-numeric: tabular-nums; font-weight: 600; color: #1a1a2e; }
.hub-brief-section { margin-bottom: 1.25rem; }
.hub-brief-section h4 { font-size: 0.95rem; margin-bottom: 0.5rem; color: #212529; }
.hub-brief-section ul { margin-left: 1.1rem; color: #42484f; line-height: 1.5; }
.hub-brief-section li { margin-bottom: 0.35rem; }
.hub-account-insight-card .hub-account-insight-md,
.hub-account-insight-card .insights-box {
    line-height: 1.55;
    font-size: 0.88rem;
    color: #343a40;
}
.hub-account-insight-card h4 {
    font-size: 0.95rem;
    margin: 0.75rem 0 0.35rem;
    color: #212529;
}
.hub-insight-placeholder {
    margin: 0.25rem 0 0;
}
.hub-brief-highlight li { color: #1e6f3e; }
.hub-brief-lowlight li { color: #a15c00; }
.customer-hub-activity-list { list-style: none; }
.customer-hub-activity-list li {
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    background: #fff;
}
.customer-hub-activity-list li:hover { border-color: #c9b8ff; background: #faf9ff; }

/* Activity: left column = ADO + Account notes (same width); right column = Gong */
.activity-ado-gong-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.activity-ado-gong-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}
.activity-account-notes-slot {
    min-width: 0;
}
.activity-account-notes-slot .customer-hub-card {
    margin-bottom: 0;
}
.activity-ado-gong-grid .activity-section {
    margin-bottom: 0;
}
@media (max-width: 960px) {
    .activity-ado-gong-grid {
        grid-template-columns: 1fr;
    }
}
.activity-block-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.15rem;
}
.activity-block-ado .hub-projects-wrap { margin-top: 0.35rem; }

/* Gong accordion — date primary, summary inline */
.gong-activity-stack { list-style: none; margin: 0; padding: 0; }
.gong-activity-item { margin-bottom: 0.65rem; border-radius: 10px; overflow: hidden; border: 1px solid #e9ecef; background: #fff; }
.gong-activity-item.is-expanded { border-color: #c9b8ff; box-shadow: 0 2px 8px rgba(108, 92, 231, 0.12); }
.gong-activity-trigger {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: none;
    background: #fafbff;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.gong-activity-trigger:hover { background: #f3f0ff; }
.gong-activity-date-primary { font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.gong-activity-panel {
    padding: 0 1rem 1rem;
    border-top: 1px solid #eee;
    background: #fff;
}
.gong-activity-panel[hidden] { display: none !important; }
.gong-activity-panel-loading { margin: 0; padding: 0.75rem 0; color: #868e96; font-size: 0.88rem; }
.gong-activity-inline-header { padding-top: 0.75rem; }
.gong-activity-inline-date { font-size: 0.9rem; color: #212529; margin-bottom: 0.65rem; }
.gong-activity-participants-block { margin-bottom: 0.75rem; }
.gong-activity-part-line { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin-bottom: 0.4rem; font-size: 0.88rem; line-height: 1.45; }
.gong-activity-part-label {
    font-weight: 700;
    color: #495057;
    min-width: 10rem;
}
.gong-activity-part-names { color: #212529; flex: 1; min-width: 12rem; }
.gong-activity-summary-body { margin-top: 0.35rem; }
.gong-activity-summary-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #868e96; margin-bottom: 0.35rem; }
.gong-activity-summary-pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #333;
    max-height: 420px;
    overflow-y: auto;
    margin: 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.customer-hub-participants { font-size: 0.85rem; color: #495057; margin-bottom: 0.75rem; }
#customers-table-body .account-name-link {
    color: #6c5ce7;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
}
#customers-table-body .account-name-link:hover { text-decoration: underline; }
#customers-table-body .gong-hub-btn {
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
#customers-table-body .gong-hub-btn:hover { background: #5649c0; }

/* Account hub — Activity tab: QBR + ADO + Gong */
.activity-intro { font-size: 0.88rem; color: #495057; margin: 0 0 1rem; line-height: 1.45; }
.activity-section { margin-bottom: 1.5rem; }
.activity-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #868e96;
    margin: 0 0 0.65rem;
}
.activity-muted { color: #868e96; font-size: 0.88rem; }
.activity-error { color: #c92a2a; font-size: 0.88rem; }
.activity-qbr-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.activity-qbr-card {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.activity-qbr-card--next { border-color: rgba(108, 92, 231, 0.45); background: linear-gradient(180deg, #faf9ff 0%, #fff 100%); }
.activity-qbr-card--last { border-left: 4px solid #20c997; }
.activity-qbr-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #868e96; }
.activity-qbr-date { font-size: 1rem; font-weight: 700; color: #212529; }
.hub-ado-table td { font-size: 0.8rem; }
.hub-ado-imp { font-size: 0.72rem; font-weight: 600; color: #e8590c; }
.activity-gong-hint { font-size: 0.88rem; color: #495057; margin: 0 0 0.65rem; }

/* People — CSM */
.people-csm-root { max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem 2rem; }
.people-csm-proj-hub-row { cursor: pointer; }
.people-csm-proj-hub-row:focus { outline: 2px solid #667eea; outline-offset: 2px; }
.people-csm-hero { margin-bottom: 1.5rem; }
.people-csm-title { margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 700; color: #1a1a2e; }
.people-csm-lede { margin: 0 0 1rem; color: #495057; font-size: 0.95rem; }
.people-csm-search-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.people-csm-label { font-size: 0.85rem; font-weight: 500; color: #495057; width: 100%; }
.people-csm-search-input {
    flex: 1;
    min-width: 200px;
    max-width: 420px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}
.people-csm-primary-btn, .people-csm-secondary-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    border: 1px solid #667eea;
    background: #667eea;
    color: #fff;
}
.people-csm-secondary-btn { background: #fff; color: #667eea; }
.people-csm-detail-header h3 { margin: 0 0 1rem; font-size: 1.15rem; color: #1a1a2e; }
.people-csm-kpi-risk-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
    .people-csm-kpi-risk-row { grid-template-columns: 1fr; }
}
.people-csm-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.people-csm-tile {
    background: #f8f9fc;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}
.people-csm-tile-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #868e96; margin-bottom: 0.35rem; }
.people-csm-tile-value { font-size: 1.05rem; font-weight: 700; color: #212529; word-break: break-word; }
.people-csm-risk-panel {
    background: #fff8f5;
    border: 1px solid #ffe8dc;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}
.people-csm-subh { margin: 0 0 0.65rem; font-size: 0.85rem; font-weight: 600; color: #c92a2a; }
.people-csm-risk-ol { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; line-height: 1.45; }
.people-csm-risk-name { font-weight: 600; color: #212529; }
.people-csm-muted { color: #868e96; font-size: 0.85rem; }
.people-csm-insight {
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid #e8eaf0;
    background: #fafbff;
}
.people-csm-insight-actions { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.people-csm-summary-block { margin: 0; }
/* Paragraphs: normal weight, clear gap after each (browser shows inter-paragraph space via margin). */
.people-csm-insight .people-csm-insight-p {
    margin: 0 0 1.1em;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    color: #343a40;
}
.people-csm-summary-block .people-csm-insight-p:last-child {
    margin-bottom: 0;
}
.people-csm-narrative {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e9ecef;
}
.people-csm-narrative .people-csm-insight-p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #212529;
    font-weight: 400;
    margin: 0 0 1.1em;
}
.people-csm-narrative .people-csm-insight-p:last-child {
    margin-bottom: 0;
}
/* LLM returns **bold**; we render <strong> — keep weight above parent 400. */
.people-csm-insight .people-csm-insight-p strong {
    font-weight: 600;
    color: #1a1a2e;
}
.people-csm-section { margin-bottom: 1.75rem; }
.people-csm-section-title { margin: 0 0 0.65rem; font-size: 1rem; font-weight: 600; color: #1a1a2e; }
.people-csm-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #e9ecef; }
/* ~10 work-item rows visible; scroll for the rest (header stays on top) */
.people-csm-ado-scroll-wrap {
    max-height: 26rem;
    overflow-y: auto;
    overflow-x: auto;
}
.people-csm-ado-scroll-wrap .people-csm-ado-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f9fa;
    box-shadow: 0 1px 0 #dee2e6;
}
.people-csm-opp-table { margin: 0; }
.card-like { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* People → Deployment: insight + combined scatter chart */
.people-de-kpi-row { align-items: start; }
.people-de-delayed-panel .people-csm-subh { color: #c92a2a; }
.people-de-insight-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
    align-items: stretch;
}
@media (max-width: 900px) {
    .people-de-insight-chart-row { grid-template-columns: 1fr; }
}
.people-de-insight { margin-bottom: 0; }
.people-de-chart-wrap {
    padding: 1rem 1.1rem 1.1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.people-de-chart-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
}
.people-de-chart-canvas {
    position: relative;
    flex: 1;
    min-height: 280px;
    max-height: 360px;
}
.people-de-chart-canvas canvas { max-height: 360px; }

/* List export (CSV / XLSX) */
.list-export-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    font-family: inherit;
}
.list-export-tile:hover {
    filter: brightness(1.08);
}
.list-export-tile:active {
    filter: brightness(0.95);
}

.list-export-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.list-export-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.list-export-modal-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
}
.list-export-modal-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}
.list-export-modal-body {
    padding: 1rem 1.1rem 1.15rem;
}
.list-export-page-line {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: #495057;
}
.list-export-fieldset {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.65rem;
    margin: 0 0 0.85rem;
}
.list-export-fieldset legend {
    padding: 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}
.list-export-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.list-export-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.35rem;
}
.list-export-filename-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.55rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}
.list-export-hint {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #6c757d;
}
.list-export-error {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #b00020;
}
.list-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.list-export-btn-secondary {
    padding: 0.45rem 0.9rem;
    border: 1px solid #ced4da;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
}
.list-export-btn-primary {
    padding: 0.45rem 0.9rem;
    border: none;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
}
.list-export-btn-primary:hover {
    filter: brightness(1.06);
}

/* Admin startup metrics */
.admin-startup-table td.admin-startup-note {
    font-size: 0.82rem;
    max-width: 22rem;
    line-height: 1.35;
}
.admin-startup-total-row td {
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
}
.admin-startup-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
}
.admin-startup-status-ok { background: #d4edda; color: #155724; }
.admin-startup-status-error { background: #f8d7da; color: #721c24; }
.admin-startup-status-skipped { background: #e2e3e5; color: #383d41; }
.admin-startup-status-deferred { background: #fff3cd; color: #856404; }
.admin-duckdb-cell {
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: pre-line;
    max-width: 22rem;
    color: #343a40;
    vertical-align: top;
}

/* Operations → Reports */
.reports-page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
}
.reports-page-wrap--wide {
    max-width: 1200px;
}
.reports-hero-title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    color: #212529;
}
.reports-hero-sub {
    margin: 0 0 1.25rem;
    color: #495057;
    font-size: 0.95rem;
}
.reports-catalog-tiles {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.reports-catalog-tile-wrap {
    margin: 0;
    padding: 0;
    min-height: 11rem;
}
.reports-catalog-tile {
    width: 100%;
    height: 100%;
    min-height: 11rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem 1.15rem;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8fafc 0%, #fff 55%);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    font-family: inherit;
}
.reports-catalog-tile:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}
.reports-catalog-tile-icon {
    font-size: 2rem;
    line-height: 1;
}
.reports-catalog-tile-title {
    font-weight: 700;
    font-size: 1.08rem;
    color: #1a1a2e;
}
.reports-catalog-tile-desc {
    font-size: 0.82rem;
    color: #6c757d;
    line-height: 1.4;
    flex: 1;
}
.reports-catalog-tile-cta {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: #667eea;
}
.reports-detail-nav {
    margin-bottom: 0.75rem;
}
.reports-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}
.reports-detail-header--with-export {
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 1rem;
}
.reports-detail-header--with-export .reports-detail-title {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}
.reports-detail-header--with-export .list-export-tile {
    flex-shrink: 0;
    align-self: flex-start;
}
@media (max-width: 520px) {
    .reports-detail-header--with-export {
        flex-wrap: wrap;
    }
    .reports-detail-header--with-export .list-export-tile {
        margin-left: auto;
    }
}
.reports-detail-title {
    margin: 0;
    font-size: 1.35rem;
}
.reports-as-of {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #6c757d;
}
.reports-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    color: #495057;
}
.reports-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
/* CX Weekly: match /ask insight blocks (response-card + insights-box + metrics-table) */
.reports-cx-block {
    margin-bottom: 0;
}
.reports-cx-block:last-child {
    margin-bottom: 0;
}
.reports-cx-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
/* Side-by-side pairs (QBR / Renewals / Upsell), same rhythm as QBR dashboard-grid */
.reports-cx-sections .reports-cx-dashboard-row.dashboard-grid {
    margin-bottom: 0;
    align-items: stretch;
}
.reports-cx-sections .reports-cx-dashboard-row.dashboard-grid > .reports-cx-page-widget.widget {
    margin-bottom: 0;
    min-width: 0;
}
@media (max-width: 900px) {
    .reports-cx-sections .reports-cx-dashboard-row.dashboard-grid {
        grid-template-columns: 1fr;
    }
}
.reports-cx-sections .reports-cx-page-widget.widget {
    margin-bottom: 0;
}
.reports-cx-page-widget .widget-content {
    min-height: 0;
}
.reports-cx-sections .qbr-list {
    max-height: min(52vh, 520px);
}
.reports-cx-table-embed {
    margin-top: 0.5rem;
}
.reports-cx-project-row {
    cursor: pointer;
}
.reports-cx-empty-state.empty-state {
    padding: 1.25rem 1rem;
    min-height: 0;
}
.rca-weekly-res-snippet {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: #6c757d;
    line-height: 1.35;
}
.reports-cx-rca-card.rca-list-card {
    margin-top: 0.25rem;
}
.reports-cx-rg-embed.rg-list-container {
    margin-top: 0.35rem;
}

.reports-cx-lede {
    margin: 0 0 0.75rem;
    line-height: 1.65;
    color: #495057;
    font-size: 0.9rem;
}
.reports-cx-lede strong {
    color: #ff6b35;
}
.reports-cx-table-host {
    margin: 0;
}
.reports-cx-table-host .metrics-table {
    margin: 0;
}
.reports-cx-table-host .metrics-table tbody tr:hover td {
    background: #fff5f0;
}
.reports-cx-empty {
    text-align: center;
    font-style: italic;
    color: #868e96 !important;
    padding: 1.25rem 0.75rem !important;
}
.metrics-table td.reports-cx-wrap {
    max-width: 16rem;
    word-break: break-word;
    white-space: normal;
    vertical-align: top;
}
button.reports-cx-link {
    display: inline;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: inherit;
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    max-width: 100%;
    word-break: break-word;
}
button.reports-cx-link:hover {
    color: #0056b3;
}
button.reports-cx-link:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
    border-radius: 2px;
}

.reports-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.reports-mini-table th,
.reports-mini-table td {
    border: 1px solid #dee2e6;
    padding: 0.35rem 0.5rem;
    text-align: left;
}
.reports-mini-table th {
    background: #f1f3f5;
}

.reports-project-sub {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #495057;
}

/* Project hub (inline on Projects page, same chrome as account hub) */
.project-hub-page-root .customer-hub-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}
.project-hub-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.project-hub-page-body {
    padding-top: 0.35rem;
}
.project-hub-page-title {
    margin-bottom: 0.75rem;
}
.project-hub-section {
    margin-bottom: 1.15rem;
}
.project-hub-section > h3 {
    margin-top: 0;
    font-size: 1rem;
    color: #1a1a2e;
}
.project-hub-kpi-wrap.customer-hub-kpis {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.project-hub-kpi-wide {
    grid-column: span 2;
}
@media (max-width: 720px) {
    .project-hub-kpi-wide {
        grid-column: span 1;
    }
}
.project-hub-kpi-multiline {
    white-space: normal;
    line-height: 1.35;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
}
.project-hub-subh {
    font-size: 0.82rem;
    font-weight: 600;
    color: #495057;
    margin: 1rem 0 0.5rem;
}
.project-hub-detail-subsection:first-of-type .project-hub-subh {
    margin-top: 0;
}
.project-hub-date-col-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 0.25rem 0 0.75rem;
}
.project-hub-date-col-table th {
    text-align: left;
    background: #f8f9fa;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}
.project-hub-date-col-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.project-hub-date-cell {
    white-space: nowrap;
    width: 8.5rem;
    color: #495057;
    font-weight: 600;
}
.project-hub-text-cell {
    color: #212529;
}
.project-hub-simple-list {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
    color: #212529;
    line-height: 1.45;
}
.project-hub-exec-md {
    margin-top: 0.35rem;
}
.project-hub-narrative {
    margin-bottom: 0.25rem;
}
.project-hub-narrative .insights-box {
    margin-top: 0.35rem;
}
.project-hub-asset-tile.customer-hub-kpi-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    font-size: inherit;
    line-height: 1.35;
    white-space: normal;
}
.project-hub-asset-type-line {
    font-size: 1.02rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
}
.project-hub-asset-metric-line {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    letter-spacing: 0.01em;
}
.project-hub-asset-metric-num {
    font-weight: 700;
    color: #212529;
}
.project-hub-kpi-category {
    min-width: 0;
}
.project-hub-kpi-category .customer-hub-kpi-value {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    line-height: 1.35;
}
.project-hub-ask-split {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.35rem;
}
.project-hub-ask-split-date {
    font-weight: 700;
    color: #495057;
    flex: 0 0 auto;
}
.project-hub-ask-split-sep {
    color: #868e96;
    font-weight: 500;
}
.project-hub-ask-split-body {
    flex: 1 1 12rem;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.project-hub-deployment-summary-body {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #343a40;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Support metrics (Freshdesk) */
.support-metrics-wrap {
    padding-bottom: 2rem;
}
.support-metrics-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.support-metrics-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.support-metrics-body {
    margin-top: 1rem;
}
.support-metrics-section {
    margin-bottom: 2rem;
}
.support-metrics-h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    color: #212529;
}
.support-metrics-note {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}
.support-metrics-table th {
    text-align: left;
}
.support-metrics-table td.num {
    text-align: right;
}
.support-metrics-eng-block {
    margin-bottom: 1.5rem;
}

/* Product → New Features */
.product-features-root .projects-table tbody tr.product-features-row:hover {
    background: #f1f3f5;
}

.product-features-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
}
.product-features-filter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.product-features-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    font-size: 0.78rem;
    color: #495057;
}
.product-features-legend-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #868e96;
    margin-right: 0.15rem;
}
.product-features-legend-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.product-features-note {
    font-size: 0.84rem;
    line-height: 1.45;
    color: #495057;
    background: #e7f5ff;
    border: 1px solid #a5d8ff;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
}
.product-features-legend-hint {
    flex: 1 1 100%;
    font-size: 0.76rem;
    line-height: 1.4;
    margin-top: 0.1rem;
    color: #868e96;
}
@media (min-width: 720px) {
    .product-features-legend-hint {
        flex: 1 1 auto;
        margin-top: 0;
        margin-left: 0.5rem;
    }
}

.product-features-spotlight {
    margin-bottom: 2rem;
}
.product-features-spotlight-head {
    margin-bottom: 1rem;
}
.product-features-spotlight-title {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
    color: #212529;
}
.product-features-spotlight-sub {
    font-size: 0.88rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.45;
    max-width: 52rem;
}
.product-features-spotlight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1rem;
}

.product-features-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.product-features-critical-wrap {
    margin-bottom: 2rem;
    padding: 1rem 1.1rem 1.15rem;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    border-radius: 12px;
}
.product-features-critical-head {
    margin-bottom: 0.85rem;
}
.product-features-critical-title {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
    color: #c92a2a;
}
.product-features-critical-sub {
    font-size: 0.82rem;
    color: #868e96;
    margin: 0;
    line-height: 1.45;
}
.product-features-critical-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 0.85rem;
}

.product-features-category-root {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.pf-layout-platform-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}
@media (min-width: 900px) {
    .pf-layout-platform-stack {
        grid-template-columns: 1fr 1fr;
    }
}
.pf-platform-cell .pf-category-box {
    height: 100%;
}
.pf-stack-cell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
.pf-layout-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .pf-layout-two-col {
        grid-template-columns: 1fr 1fr;
    }
}
.pf-layout-col {
    min-width: 0;
}

.product-features-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 900px) {
    .product-features-two-col {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}
.product-features-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.pf-category-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.85rem 1rem 1rem;
}
.pf-category-title {
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid #dee2e6;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.pf-category-count {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #868e96;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}
.pf-category-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pf-spot-card,
.pf-cat-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pf-spot-card:hover,
.pf-cat-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.pf-spot-card:focus-visible,
.pf-cat-card:focus-visible {
    outline: 2px solid #4dabf7;
    outline-offset: 2px;
}
.pf-spot-card-top,
.pf-cat-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.45rem;
}
.pf-spot-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
}
.pf-spot-score {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 800;
    color: #495057;
    background: #e9ecef;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
}
.pf-cat-head-right {
    margin-left: auto;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}
.pf-cat-rel {
    font-size: 0.72rem;
    font-weight: 600;
    color: #868e96;
}
.pf-spot-title,
.pf-cat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}
.pf-spot-sum,
.pf-cat-sum {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #495057;
    margin: 0;
}
.pf-spot-meta {
    margin-top: 0.55rem;
    font-size: 0.72rem;
    color: #868e96;
}
.pf-cat-score {
    font-size: 0.72rem;
    font-weight: 700;
    color: #868e96;
}

.pf-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    line-height: 1.2;
}
.pf-badge.pf-imp-critical {
    background: #fff5f5;
    color: #c92a2a;
    border: 1px solid #ffc9c9;
}
.pf-badge.pf-imp-high {
    background: #fff4e6;
    color: #d9480f;
    border: 1px solid #ffd8a8;
}
.pf-badge.pf-imp-medium {
    background: #e7f5ff;
    color: #1864ab;
    border: 1px solid #a5d8ff;
}
.pf-badge.pf-imp-low {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}

.pf-cat-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: #495057;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.18rem 0.45rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-override-pill {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5f3dc4;
    background: #f3f0ff;
    border: 1px solid #d0bfff;
    border-radius: 999px;
    padding: 0.12rem 0.4rem;
}

.pf-cat-empty {
    font-size: 0.82rem;
    color: #868e96;
    margin: 0;
    font-style: italic;
}

.product-feature-modal {
    max-width: 620px;
}
.product-feature-modal-body {
    max-height: min(70vh, 32rem);
    overflow-y: auto;
}
.product-feature-modal-meta {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 0 0 0.5rem;
}
.product-feature-modal-classification {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #343a40;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
}
.product-feature-modal-classification[hidden] {
    display: none !important;
}
.product-feature-modal-classification .pf-class-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    margin-bottom: 0.35rem;
}
.product-feature-modal-classification .pf-class-row:last-child {
    margin-bottom: 0;
}
.product-feature-modal-classification .pf-class-k {
    font-weight: 700;
    color: #495057;
    min-width: 5.5rem;
}
.product-feature-modal-classification .pf-class-muted {
    color: #868e96;
    font-size: 0.78rem;
}

.product-feature-modal-admin {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 1rem;
    background: #fffbeb;
}
.product-feature-modal-admin-title {
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: #212529;
}
.product-feature-modal-admin-help {
    font-size: 0.78rem;
    color: #6c757d;
    margin: 0 0 0.65rem;
    line-height: 1.45;
}
.pf-admin-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin-bottom: 0.55rem;
}
.pf-admin-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #495057;
}
.pf-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
}
.pf-admin-save-status {
    font-size: 0.78rem;
    color: #495057;
}

.product-feature-modal-detail {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #212529;
}
.product-feature-modal-detail p {
    margin: 0 0 0.75rem;
}
.product-feature-modal-detail p:last-child {
    margin-bottom: 0;
}
.pf-modal-section {
    margin-bottom: 1rem;
}
.pf-modal-h4 {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #868e96;
    margin: 0 0 0.45rem;
}
.pf-modal-tech {
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}
