
    /* When logged out (login screen up), hide the entire app shell + widgets so
       the sign-in page is the only thing visible. */
    body.tricky-locked .sidebar,
    body.tricky-locked #mainContent,
    body.tricky-locked #rbacFab,
    body.tricky-locked #trickyAuditFab { display: none !important; }
    /* Timesheet company picker (if used) always on top. */
    #timesheetPickerModal { z-index: 9700 !important; }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'DM Sans', sans-serif; background: #FAFAFA; color: #1C1C1C; font-size: 14px; overflow-x: hidden; }
    .app { display: flex; min-height: 100vh; overflow-x: hidden; }
    
    /* GLOBAL ELEGANT SCROLLBARS */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #D0D0D0; border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: #452E5A; }
    * { scrollbar-width: thin; scrollbar-color: #D0D0D0 transparent; }

    /* SIDEBAR */
    .sidebar {
      width: 201px;
      background: #FFFFFF;
      border-right: 1px solid #ECECEF;
      height: 100vh;
      position: fixed;
      left: 0;
      top: 0;
      padding: 8px;
      display: flex;
      flex-direction: column;
      transition: width 0.3s ease;
    }
    .sidebar.collapsed {
      width: 60px;
    }
    .sidebar-logo {
      display: flex;
      align-items: center;
      padding: 10px 16px;
      gap: 10px;
    }
    .sidebar-logo-icon {
      width: 28px;
      height: 28px;
      background: #452E5A;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 700;
      font-size: 14px;
      flex-shrink: 0;
    }
    .sidebar-logo span { 
      color: #1C1C1C; 
      font-weight: 700; 
      font-size: 14px; 
      letter-spacing: 1px;
      white-space: nowrap;
      overflow: hidden;
      transition: opacity 0.2s;
    }
    .sidebar.collapsed .sidebar-logo span {
      opacity: 0;
      width: 0;
    }
    .sidebar-toggle {
      width: 24px;
      height: 24px;
      background: #fff;
      border: 1px solid #E2E2E6;
      border-radius: 50%;
      margin-left: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.3s, background 0.15s;
      flex-shrink: 0;
    }
    .sidebar-toggle:hover { background: #F5F5F7; }
    .sidebar-toggle svg {
      width: 14px;
      height: 14px;
      color: #888;
      transition: transform 0.3s;
    }
    .sidebar.collapsed .sidebar-toggle {
      margin-left: 0;
    }
    .sidebar.collapsed .sidebar-toggle svg {
      transform: rotate(180deg);
    }
    /* Collapsed-state: hide the [T] tile, center the toggle button alone */
    .sidebar.collapsed .sidebar-logo { justify-content: center; padding: 12px 0; }
    .sidebar.collapsed .sidebar-logo-icon { display: none; }
    .sidebar-nav { flex: 1; padding-top: 8px; overflow: hidden; }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 8px;
      color: #1C1C1C;
      font-weight: 500;
      cursor: pointer;
      margin-bottom: 2px;
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      transition: background 0.15s, color 0.15s;
    }
    .nav-item:hover { background: rgba(69,46,90,0.08); color: #452E5A; }
    .nav-item.active { background: #452E5A; color: #fff; }
    .nav-item.active svg { opacity: 1; }
    .nav-item svg { width: 18px; height: 18px; opacity: 1; flex-shrink: 0; }
    .nav-item .arrow { margin-left: auto; font-size: 10px; opacity: 0.5; }
    .nav-item-text {
      transition: opacity 0.2s;
    }
    .sidebar.collapsed .nav-item-text,
    .sidebar.collapsed .nav-item .arrow {
      opacity: 0;
      width: 0;
    }
    .sidebar-bottom { 
      padding: 16px 0; 
      border-top: 1px solid #ECECEF;
      overflow: hidden;
    }

    /* MAIN */
    .main { 
      margin-left: 201px; 
      flex: 1; 
      padding: 18px 24px;
      transition: margin-left 0.3s ease;
      overflow-x: hidden;
      max-width: calc(100vw - 201px);
      background: #F4F5F7;
    }
    .main.sidebar-collapsed {
      margin-left: 60px;
      max-width: calc(100vw - 60px);
    }

    /* HEADER */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .header-left {
      display: flex;
      align-items: center;
    }
    .header-center {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1;
    }
    .tabs {
      background: transparent;
      border-radius: 4px;
      display: flex;
      gap: 4px;
      padding: 6px 11px;
      height: 38px;
      align-items: center;
    }
    .tab {
      padding: 7px 12px;
      border-radius: 4px;
      font-size: 14px;
      cursor: pointer;
      border: none;
      background: transparent;
      font-family: 'DM Sans', sans-serif;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .tab.active {
      background: #452E5A;
      color: #fff;
      font-weight: 700;
    }
    .header-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .search-box {
      background: #fff;
      border: 1px solid #E2E2E6;
      border-radius: 8px;
      display: flex;
      align-items: center;
      padding: 0 15px;
      height: 38px;
      width: 307px;
      gap: 8px;
    }
    .search-box svg { width: 18px; height: 18px; opacity: 0.4; }
    .search-box input {
      border: none;
      outline: none;
      flex: 1;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      background: transparent;
    }
    .icon-btn {
      width: 38px;
      height: 38px;
      background: transparent;
      border: none;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .icon-btn:hover { background: rgba(0,0,0,0.05); }
    .icon-btn svg { width: 18px; height: 18px; color: #1C1C1C; }
    .avatar {
      width: 44px;
      height: 44px;
      border-radius: 10px;
      background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }
    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* TABLE */
    .table-container { background: #fff; border-radius: 12px; overflow: hidden; width: 100%; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
    .table { width: 100%; border-collapse: collapse; }
    .table th {
      background: transparent;
      padding: 16px 20px;
      text-align: left;
      font-size: 11px;
      font-weight: 600;
      color: #452E5A;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 1px solid #F0F0F0;
    }
    .table td {
      padding: 14px 20px;
      font-size: 14px;
      color: #1C1C1C;
      border-bottom: 1px solid #F5F5F5;
      vertical-align: middle;
    }
    .table tr:last-child td { border-bottom: none; }
    .table tbody tr:hover { background: rgba(69,46,90,0.03); }
    .table td.start-date-cell { white-space: nowrap; color: #555; }

    .name-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    /* ============================================
       GLOBAL ENTITY CELL STRUCTURE
       Use for: Profiles, Contractors, Employees, 
       Candidates, Prospects, Companies, etc.
       ============================================ */
    .entity-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .entity-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
      position: relative;
      overflow: hidden;
    }
    .entity-icon::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
      pointer-events: none;
    }
    .entity-icon.sm { width: 32px; height: 32px; border-radius: 8px; font-size: 11px; }
    .entity-icon.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
    .entity-icon.xl { width: 72px; height: 72px; border-radius: 16px; font-size: 24px; }
    
    /* Entity Icon Colors */
    .entity-icon.profile { background: linear-gradient(135deg, #D4A574 0%, #C49B6A 40%, #A67C52 100%); }
    .entity-icon.red { background: linear-gradient(135deg, #EE0000 0%, #CC0000 100%); }
    .entity-icon.blue { background: linear-gradient(135deg, #0066CC 0%, #004C99 100%); }
    .entity-icon.teal { background: linear-gradient(135deg, #00BFA5 0%, #009688 100%); }
    .entity-icon.dark { background: linear-gradient(135deg, #2D2D2D 0%, #1a1a1a 100%); }
    .entity-icon.navy { background: linear-gradient(135deg, #00529B 0%, #003d75 100%); }
    .entity-icon.purple { background: linear-gradient(135deg, #452E5A 0%, #36234A 100%); }
    .entity-icon.green { background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%); }
    .entity-icon.orange { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); }
    
    .entity-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .entity-name {
      font-size: 13px;
      font-weight: 500;
      color: #1C1C1C;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .entity-name.clickable {
      cursor: pointer;
    }
    .entity-name.clickable:hover {
      color: #452E5A;
      text-decoration: underline;
    }
    .entity-id {
      font-size: 11px;
      color: #8B8B8B;
    }
    .entity-rating {
      display: flex;
      gap: 2px;
    }
    .entity-rating .star {
      color: #FFB800;
      font-size: 10px;
    }
    .entity-rating .star.empty {
      color: #E0E0E0;
    }
    /* ============================================ */
    
    .avatar-small {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }
    .avatar-small img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .avatar-small img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 3; }
    .name-info { display: flex; flex-direction: column; gap: 2px; }
    .name-text { 
      font-size: 14px; 
      font-weight: 400; 
      cursor: pointer;
      color: #1C1C1C;
    }
    .name-text:hover {
      color: #452E5A;
      text-decoration: underline;
    }
    .star-rating { display: flex; gap: 2px; }
    .star { color: #FFB800; font-size: 10px; }
    .star.empty { color: #E0E0E0; }

    .action-cell { display: flex; gap: 4px; align-items: center; }
    .action-btn {
      width: 24px;
      height: 24px;
      border: none;
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
    }
    .action-btn:hover { background: rgba(69,46,90,0.1); }
    .action-btn svg { width: 15px; height: 15px; color: #452E5A; }

    /* CONTEXT MENU */
    .context-menu {
      position: fixed;
      background: #FFFFFF;
      border: 1px solid #EFEFF2;
      border-radius: 10px;
      padding: 6px;
      display: none;
      flex-direction: column;
      gap: 0;
      z-index: 99999;
      box-shadow: 0 10px 30px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
      min-width: 170px;
      font-family: 'DM Sans', sans-serif;
    }
    .context-menu.show { display: flex; }
    .context-menu-item {
      font-size: 13px;
      color: #1C1C1C;
      cursor: pointer;
      background: transparent;
      border: none;
      text-align: left;
      padding: 9px 12px;
      border-radius: 7px;
      font-family: 'DM Sans', sans-serif;
      font-weight: 500;
      transition: background 0.12s, color 0.12s;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .context-menu-item:hover {
      background: #F5F0FA;
      color: #452E5A;
    }
    .context-menu-item:last-child:hover {
      background: #FEF2F2;
      color: #C53030;
    }
    .context-menu.show { display: flex; }
    /* PAGINATION */
    .pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 16px;
      border-top: 1px solid rgba(0,0,0,0.06);
    }
    .pagination-left { display: flex; align-items: center; gap: 4px; }
    .page-btn {
      width: 28px;
      height: 28px;
      border: none;
      background: transparent;
      cursor: pointer;
      border-radius: 4px;
      font-size: 14px;
      color: #484848;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'DM Sans', sans-serif;
    }
    .page-btn:hover { background: rgba(69,46,90,0.1); }
    .page-btn.active { background: #452E5A; color: #fff; }
    .page-select {
      margin-left: 8px;
      padding: 4px 24px 4px 10px;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 4px;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      background: #fff;
      cursor: pointer;
    }
    .pagination-right { font-size: 14px; color: #484848; }
  
    /* ============================================
       EQUIPMENT SECTION STYLES
       ============================================ */

    /* DASHBOARD STYLES */
    .dashboard-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
      margin-bottom: 24px;
    }
    .stat-card {
      background: #F5F5F5;
      border-radius: 12px;
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 16px;
      cursor: pointer;
      transition: all 0.2s ease;
      border: 2px solid transparent;
    }
    .stat-card:hover {
      background: #EFEFEF;
      border-color: #452E5A;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(69,46,90,0.15);
    }
    .stat-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .stat-icon svg { width: 24px; height: 24px; }
    .stat-info { display: flex; flex-direction: column; }
    .stat-value { font-size: 28px; font-weight: 700; color: #1C1C1C; line-height: 1; }
    .stat-label { font-size: 13px; color: #8B8B8B; margin-top: 4px; }

    .dashboard-charts {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      margin-bottom: 24px;
    }
    .chart-card, .activity-card, .upcoming-card {
      background: #F5F5F5;
      border-radius: 12px;
      padding: 24px;
    }
    .chart-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    .chart-header h3 { font-size: 16px; font-weight: 600; color: #1C1C1C; margin: 0; }
    .view-all { font-size: 13px; color: #452E5A; cursor: pointer; font-weight: 500; }
    .view-all:hover { text-decoration: underline; }
    .chart-body { }

    /* Category Bar Chart */
    .category-list { display: flex; flex-direction: column; gap: 14px; }
    .category-item { display: flex; align-items: center; gap: 12px; }
    .category-info { display: flex; align-items: center; gap: 8px; min-width: 100px; }
    .category-dot { width: 10px; height: 10px; border-radius: 50%; }
    .category-info span { font-size: 13px; color: #484848; }
    .category-bar-wrap { flex: 1; height: 8px; background: #E8E8E8; border-radius: 4px; overflow: hidden; }
    .category-bar { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
    .category-count { font-size: 14px; font-weight: 600; color: #1C1C1C; min-width: 24px; text-align: right; }

    /* Donut Chart */
    .donut-chart { display: flex; align-items: center; gap: 32px; }
    .donut { width: 140px; height: 140px; transform: rotate(-90deg); }
    .donut-center {
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .donut-chart { position: relative; }
    .donut-center {
      position: absolute;
      left: 0;
      top: 0;
      width: 140px;
      height: 140px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .donut-value { font-size: 32px; font-weight: 700; color: #1C1C1C; line-height: 1; }
    .donut-label { font-size: 12px; color: #8B8B8B; }
    .donut-legend { display: flex; flex-direction: column; gap: 10px; }
    .legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #484848; }
    .legend-item strong { margin-left: auto; color: #1C1C1C; }
    .legend-dot { width: 10px; height: 10px; border-radius: 50%; }

    /* Dashboard Bottom */
    .dashboard-bottom {
      display: grid;
      grid-template-columns: 1.5fr 1fr;
      gap: 20px;
    }

    /* Activity List */
    .activity-list { display: flex; flex-direction: column; gap: 16px; }
    .activity-item { display: flex; align-items: flex-start; gap: 14px; }
    .activity-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .activity-icon svg { width: 18px; height: 18px; }
    .activity-content { display: flex; flex-direction: column; gap: 2px; }
    .activity-text { font-size: 14px; color: #484848; }
    .activity-text strong { color: #1C1C1C; font-weight: 500; }
    .activity-time { font-size: 12px; color: #8B8B8B; }

    /* Upcoming List */
    .upcoming-list { display: flex; flex-direction: column; gap: 20px; }
    .upcoming-section { }
    .upcoming-section-title { font-size: 11px; font-weight: 600; color: #8B8B8B; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
    .upcoming-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #E8E8E8; }
    .upcoming-item:last-child { border-bottom: none; }
    .upcoming-info { display: flex; flex-direction: column; gap: 2px; }
    .upcoming-name { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .upcoming-person { font-size: 12px; color: #8B8B8B; }
    .upcoming-date { font-size: 13px; font-weight: 600; color: #1C1C1C; padding: 4px 10px; background: #E8E8E8; border-radius: 6px; }
    .upcoming-date.warn { background: rgba(237,137,54,0.15); color: #ED8936; }
    .upcoming-date.critical { background: rgba(245,101,101,0.15); color: #F56565; }

    /* Activity Log Action Badges */
    .action-badge {
      display: inline-block;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
    }
    .action-badge.view { background: rgba(69,46,90,0.15); color: #452E5A; }
    .action-badge.edit { background: rgba(66,153,225,0.15); color: #4299E1; }
    .action-badge.checkout { background: rgba(72,187,120,0.15); color: #48BB78; }
    .action-badge.return { background: rgba(72,187,120,0.15); color: #48BB78; }
    .action-badge.reassign { background: rgba(159,122,234,0.15); color: #9F7AEA; }
    .action-badge.service { background: rgba(66,153,225,0.15); color: #4299E1; }
    .action-badge.maintenance { background: rgba(56,178,172,0.15); color: #38B2AC; }
    .action-badge.damaged { background: rgba(237,137,54,0.15); color: #ED8936; }
    .action-badge.dispose { background: rgba(245,101,101,0.15); color: #F56565; }
    .action-badge.add { background: rgba(72,187,120,0.15); color: #48BB78; }

    /* SETTINGS STYLES - SIMPLIFIED */
    .settings-simple { 
      display: grid; 
      grid-template-columns: repeat(2, 1fr); 
      gap: 20px; 
      max-width: 900px; 
    }
    .settings-card {
      background: #F5F5F5;
      border-radius: 12px;
      overflow: hidden;
    }
    .settings-card.disabled { opacity: 0.5; pointer-events: none; }
    .settings-card-header {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 20px;
      border-bottom: 1px solid #E8E8E8;
    }
    .settings-card-icon {
      width: 44px; height: 44px;
      background: rgba(69,46,90,0.12);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      color: #452E5A;
    }
    .settings-card-icon svg { width: 22px; height: 22px; }
    .settings-card-header h3 { font-size: 16px; font-weight: 600; color: #1C1C1C; margin: 0 0 4px 0; }
    .settings-card-header p { font-size: 13px; color: #8B8B8B; margin: 0; }
    .settings-card-body { padding: 8px 20px; }
    .settings-toggle-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 0;
      border-bottom: 1px solid #E8E8E8;
    }
    .settings-toggle-row:last-child { border-bottom: none; }
    .settings-toggle-info { display: flex; flex-direction: column; gap: 2px; }
    .settings-toggle-title { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .settings-toggle-desc { font-size: 12px; color: #8B8B8B; }
    
    /* Toggle Switch */
    .switch { position: relative; display: inline-block; width: 44px; height: 24px; }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider {
      position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
      background-color: #ccc; transition: .3s; border-radius: 24px;
    }
    .slider:before {
      position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
      background-color: white; transition: .3s; border-radius: 50%;
    }
    input:checked + .slider { background-color: #452E5A; }
    input:checked + .slider:before { transform: translateX(20px); }

    /* NOTIFICATION STYLES */
    .notification-wrapper { position: relative; }
    .notification-badge {
      position: absolute; top: -4px; right: -4px;
      background: #F56565; color: #fff;
      font-size: 11px; font-weight: 700;
      min-width: 18px; height: 18px;
      border-radius: 9px; display: flex;
      align-items: center; justify-content: center;
      padding: 0 5px;
    }
    .notification-panel {
      display: flex; flex-direction: column;
      position: fixed; top: 0; right: 0; height: 100vh;
      width: min(40vw, 600px); min-width: 380px; max-width: 94vw;
      background: #F5F5F5;
      box-shadow: -8px 0 30px rgba(0,0,0,0.16);
      z-index: 100001; overflow: hidden;
      transform: translateX(100%);
      transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
    }
    .notification-panel.show { transform: translateX(0); }
    .notification-panel .notif-list { max-height: none; }
    .notif-scrim {
      position: fixed; inset: 0; background: rgba(20,12,28,0.35);
      z-index: 100000; opacity: 0; pointer-events: none; transition: opacity 0.25s;
    }
    .notif-scrim.show { opacity: 1; pointer-events: auto; }
    .notif-close {
      width: 30px; height: 30px; border: none; background: #fff; border-radius: 8px;
      cursor: pointer; font-size: 18px; line-height: 1; color: #6B6B6B;
      display: flex; align-items: center; justify-content: center; margin-left: 8px;
    }
    .notif-close:hover { background: #EBEBEB; color: #1C1C1C; }
    .notif-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 16px 20px; border-bottom: 1px solid #E8E8E8;
    }
    .notif-header h3 { font-size: 16px; font-weight: 600; color: #1C1C1C; margin: 0; }
    .mark-read-btn {
      font-size: 13px; color: #452E5A; background: none; border: none;
      cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500;
    }
    .mark-read-btn:hover { text-decoration: underline; }
    .notif-tabs {
      display: flex; gap: 4px; padding: 12px 20px;
      border-bottom: 1px solid #E8E8E8; background: #FAFAFA;
    }
    .notif-tab {
      padding: 6px 14px; border-radius: 6px; font-size: 13px;
      border: none; background: transparent; color: #8B8B8B;
      cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500;
    }
    .notif-tab:hover { background: #EBEBEB; }
    .notif-tab.active { background: #452E5A; color: #fff; }
    .notif-list { flex: 1; overflow-y: auto; max-height: 340px; }
    .notif-item {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 14px 20px; border-bottom: 1px solid #E8E8E8;
      background: #F5F5F5; transition: background 0.2s;
    }
    .notif-item:hover { background: #EBEBEB; }
    .notif-item.unread { background: #fff; }
    .notif-item.unread::before {
      content: ''; position: absolute; left: 8px; top: 50%;
      transform: translateY(-50%); width: 6px; height: 6px;
      background: #452E5A; border-radius: 50%;
    }
    .notif-item { position: relative; padding-left: 26px; }
    .notif-icon {
      width: 36px; height: 36px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .notif-icon svg { width: 18px; height: 18px; }
    .notif-icon.high { background: rgba(245,101,101,0.12); color: #F56565; }
    .notif-icon.reminder { background: rgba(237,137,54,0.12); color: #ED8936; }
    .notif-icon.service { background: rgba(66,153,225,0.12); color: #4299E1; }
    .notif-icon.checkout { background: rgba(72,187,120,0.12); color: #48BB78; }
    .notif-icon.returned { background: rgba(72,187,120,0.12); color: #48BB78; }
    .notif-icon.warranty { background: rgba(69,46,90,0.12); color: #452E5A; }
    .notif-content { flex: 1; display: flex; flex-direction: column; gap: 2px; }
    .notif-title { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .notif-desc { font-size: 13px; color: #8B8B8B; line-height: 1.4; }
    .notif-time { font-size: 12px; color: #A8A8A8; margin-top: 4px; }
    .notif-dismiss {
      width: 24px; height: 24px; border: none; background: transparent;
      color: #A8A8A8; font-size: 18px; cursor: pointer; border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
    }
    .notif-dismiss:hover { background: rgba(0,0,0,0.05); color: #666; }
    .notif-footer {
      padding: 12px 20px; border-top: 1px solid #E8E8E8;
      text-align: center;
    }
    .notif-footer button {
      background: none; border: none; color: #452E5A;
      font-size: 14px; font-weight: 500; cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .notif-footer button:hover { text-decoration: underline; }

    /* EXPORT MENU */
    .export-wrapper { position: relative; }
    .export-menu {
      display: none; position: fixed; top: 60px; right: 120px;
      width: 220px; background: #F5F5F5; border-radius: 12px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.18); z-index: 4000;
      padding: 8px 0; overflow: hidden;
    }
    .export-menu.show { display: block; }
    .export-menu-header {
      padding: 12px 16px; font-size: 13px; font-weight: 600;
      color: #8B8B8B; text-transform: uppercase; letter-spacing: 0.5px;
      border-bottom: 1px solid #E8E8E8;
    }
    .export-menu button {
      display: flex; align-items: center; gap: 12px;
      width: 100%; padding: 12px 16px; border: none;
      background: transparent; font-size: 14px; color: #1C1C1C;
      cursor: pointer; font-family: 'DM Sans', sans-serif; text-align: left;
      transition: background 0.2s;
    }
    .export-menu button:hover { background: rgba(69,46,90,0.1); }
    .export-menu button svg { width: 18px; height: 18px; color: #452E5A; }
    .export-menu-divider { height: 1px; background: #E8E8E8; margin: 8px 0; }

    /* Document Upload Dropzone */
    .doc-upload-dropzone {
      border: 2px dashed #E0E0E0;
      border-radius: 10px;
      padding: 28px 20px;
      text-align: center;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
    }
    .doc-upload-dropzone:hover { border-color: #452E5A; background: rgba(69,46,90,0.03); }
    .doc-upload-dropzone span { font-size: 13px; color: #8B8B8B; }

    /* COMPANY SECTION */
    .company-tab { padding:7px 16px;border-radius:4px;font-size:13px;cursor:pointer;border:none;background:transparent;font-family:'DM Sans',sans-serif;color:#484848;font-weight:500; }
    .company-tab:hover { background:rgba(69,46,90,0.1); }
    .company-tab.active { background:#452E5A;color:#fff;font-weight:600; }
    .company-table { width:100%;border-collapse:collapse; }
    .company-table thead { background:rgba(69,46,90,0.08); }
    .company-table th { padding:10px 14px;font-size:10px;font-weight:700;color:#452E5A;text-align:left;text-transform:uppercase;letter-spacing:0.3px;white-space:nowrap; }
    .company-table td { padding:12px 14px;font-size:13px;color:#1C1C1C;border-bottom:1px solid #F5F5F5;vertical-align:middle; }
    #timesheetTable td { padding-top:19px;padding-bottom:19px; }
    #timesheetTable th { padding-top:14px;padding-bottom:14px; }
    .company-table tbody tr:hover td { background:rgba(69,46,90,0.03); }
    .company-table td.company-start-date { white-space:nowrap; color:#555; }
    .co-act { width:30px;height:30px;background:transparent;border:none;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#8B8B8B; }
    .co-act:hover { background:rgba(69,46,90,0.1);color:#452E5A; }
    .cp-tab { padding:0 18px;height:46px;border:none;background:transparent;font-size:12px;font-weight:700;color:#8B8B8B;cursor:pointer;font-family:'DM Sans',sans-serif;text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color 0.2s; }
    .cp-tab:hover { color:#452E5A; }
    .cp-tab.active { color:#452E5A;border-bottom:2px solid #452E5A; }
    .cp-form-item { padding:10px 20px;font-size:13px;color:#484848;cursor:pointer;border-left:3px solid transparent;font-family:'DM Sans',sans-serif; }
    .cp-form-item:hover { background:rgba(69,46,90,0.04);color:#452E5A; }
    .cp-form-item.active { color:#452E5A;font-weight:600;background:rgba(69,46,90,0.06);border-left-color:#452E5A; }
    .cep-tab { padding:0 14px;height:36px;border:none;background:transparent;font-size:12px;font-weight:600;color:#484848;cursor:pointer;font-family:'DM Sans',sans-serif;text-transform:uppercase;letter-spacing:0.3px; }
    .cep-tab:hover { color:#452E5A; }
    .cep-tab.active { color:#452E5A;border-bottom:2px solid #452E5A; }
    
    /* Pagination buttons for Crew Profile */
    .cep-pg-btn { min-width:28px;height:28px;padding:0 8px;border:1px solid #E0E0E0;background:#fff;border-radius:4px;font-size:12px;font-weight:500;color:#484848;cursor:pointer;font-family:'DM Sans',sans-serif;display:inline-flex;align-items:center;justify-content:center; }
    .cep-pg-btn:hover { border-color:#452E5A;color:#452E5A; }
    .cep-pg-btn.active { background:#452E5A;color:#fff;border-color:#452E5A; }
    
    /* Collapse chevron hover */
    #cepCollapseBtn:hover { background:#F5F5F5; }
    
    /* PROJECT DETAILS */
    .pd-view-btn { width:34px;height:34px;background:#fff;border:1px solid #E8E8E8;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#8B8B8B; }
    .pd-view-btn:hover { background:rgba(69,46,90,0.08);color:#452E5A; }
    .pd-view-btn.active { background:#452E5A;color:#fff;border-color:#452E5A; }
    .pd-profit { display:inline-block;padding:6px 16px;background:#4CAF50;color:#fff;border-radius:20px;font-size:12px;font-weight:600; }
    .pd-loss { display:inline-block;padding:6px 16px;background:#FFE5E5;color:#E53935;border-radius:20px;font-size:12px;font-weight:600; }
    .pd-workers { display:flex;align-items:center; }
    .pd-workers span { width:28px;height:28px;border-radius:7px;background:#452E5A;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff;border:2px solid #fff;margin-left:-8px; }
    .pd-workers span:first-child { margin-left:0; }
    .pd-workers .pd-more { background:#F0F0F0;color:#484848; }
    
    /* Stat Cards */
    .pd-stat-card { background:#fff;border-radius:10px;padding:14px 16px;border:1px solid #F0F0F0; }
    .pd-stat-label { font-size:10px;font-weight:600;color:#8B8B8B;text-transform:uppercase;letter-spacing:0.5px;margin-bottom:6px; }
    .pd-stat-value { font-size:20px;font-weight:700;color:#1C1C1C;line-height:1.2; }
    .pd-stat-delta { font-size:11px;margin-top:4px;font-weight:500; }
    .pd-stat-up { color:#4CAF50; }
    .pd-stat-down { color:#E53935; }
    
    /* Bar Chart v2 */
    .pd-bar-row-v2 { display:grid;grid-template-columns:160px 1fr 200px;gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid #F8F8F8; }
    .pd-bar-row-v2:last-child { border-bottom:none; }
    .pd-bar-category { display:flex;align-items:center;gap:10px;font-size:13px;color:#1C1C1C;font-weight:500; }
    .pd-bar-dot { width:10px;height:10px;border-radius:3px;flex-shrink:0; }
    .pd-bar-track-v2 { position:relative;height:28px;background:#FAFAFA;border-radius:6px; }
    .pd-bar-ghost-v2 { position:absolute;top:50%;transform:translateY(-50%);height:8px;background:#E0DEF7;border-radius:4px;left:0; }
    .pd-bar-fill-v2 { position:absolute;top:0;left:0;height:100%;border-radius:6px;box-shadow:0 1px 3px rgba(69,46,90,0.3); }
    .pd-bar-meta { text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px; }
    .pd-bar-amount-v2 { font-size:13px;font-weight:700;color:#1C1C1C; }
    .pd-bar-rate { font-size:11px;font-weight:500;color:#8B8B8B;margin-left:6px; }
    .pd-bar-workers { display:flex;align-items:center; }
    .pd-bar-workers span { width:22px;height:22px;border-radius:50%;background:#452E5A;color:#fff;font-size:9px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;border:1.5px solid #fff;margin-left:-6px; }
    .pd-bar-workers span:first-child { margin-left:0; }
    .pd-bar-workers .pd-bar-plus { background:#F0F0F0;color:#484848; }
    .pd-bar-row-v2 { transition:background 0.15s; border-radius:6px; }
    .pd-bar-row-v2:hover { background:#FAFAFA; }
    
    /* Pie Chart Legend */
    .pd-pie-row { display:grid;grid-template-columns:24px 1fr auto auto auto;gap:16px;padding:10px 12px;align-items:center;border-radius:6px;transition:background 0.15s;cursor:pointer; }
    .pd-pie-row:hover { background:#FAFAFA; }
    .pd-pie-swatch { width:14px;height:14px;border-radius:3px; }
    .pd-pie-workers { display:flex;align-items:center; }
    .pd-pie-workers span { width:22px;height:22px;border-radius:50%;background:#452E5A;color:#fff;font-size:9px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;border:1.5px solid #fff;margin-left:-6px; }
    .pd-pie-workers span:first-child { margin-left:0; }
    .pd-pie-workers .pd-pie-plus { background:#F0F0F0;color:#484848; }
    /* Category Detail Modal */
    .pd-cat-modal-overlay { display:none;position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:5000;align-items:center;justify-content:center;padding:20px;animation:fadeIn 0.2s ease; }
    .pd-cat-modal-overlay.show { display:flex; }
    .pd-cat-modal-card { background:#fff;border-radius:12px;width:640px;max-width:100%;max-height:85vh;overflow-y:auto;font-family:'DM Sans',sans-serif; }
    .pd-cat-modal-header { padding:24px 28px 18px;border-bottom:1px solid #F0F0F0;display:flex;align-items:flex-start;gap:14px; }
    .pd-cat-modal-swatch { width:42px;height:42px;border-radius:8px;flex-shrink:0; }
    .pd-cat-modal-title { font-size:20px;font-weight:700;color:#1C1C1C;margin:0;line-height:1.2; }
    .pd-cat-modal-sub { font-size:12px;color:#8B8B8B;margin-top:4px; }
    .pd-cat-modal-stats { display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:16px 28px;border-bottom:1px solid #F0F0F0;background:#FAFAFA; }
    .pd-cat-modal-stat { padding:0 12px;border-left:1px solid #E8E8E8; }
    .pd-cat-modal-stat:first-child { border-left:none;padding-left:0; }
    .pd-cat-modal-stat-label { font-size:10px;font-weight:600;color:#8B8B8B;text-transform:uppercase;letter-spacing:0.4px; }
    .pd-cat-modal-stat-value { font-size:17px;font-weight:700;color:#1C1C1C;margin-top:4px; }
    .pd-cat-modal-body { padding:18px 28px 24px; }
    .pd-cat-worker-row { display:grid;grid-template-columns:36px 1fr auto auto;gap:14px;padding:12px 8px;align-items:center;border-bottom:1px solid #F4F4F4; }
    .pd-cat-worker-row:last-child { border-bottom:none; }
    .pd-cat-worker-avatar { width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff; }
    .pd-cat-worker-info { font-size:13px;font-weight:600;color:#1C1C1C; }
    .pd-cat-worker-meta { font-size:11px;color:#8B8B8B;margin-top:2px; }
    .pd-cat-worker-hours { font-size:13px;color:#484848;text-align:right;min-width:80px; }
    .pd-cat-worker-cost { font-size:13px;font-weight:700;color:#1C1C1C;text-align:right;min-width:90px; }
    .pd-cat-modal-footer { padding:16px 28px;border-top:2px solid #F0F0F0;display:flex;justify-content:space-between;align-items:center;background:#FAFAFA; }
    .pd-cat-modal-total-label { font-size:13px;font-weight:600;color:#484848; }
    .pd-cat-modal-total-value { font-size:18px;font-weight:700;color:#1C1C1C; }
    /* Make pie chart segments hoverable / clickable */
    #pdPieView svg circle { transition:opacity 0.15s,stroke-width 0.15s;cursor:pointer; }
    #pdPieView svg circle:hover { opacity:0.85;stroke-width:42; }
    .pd-pie-name { font-size:13px;color:#1C1C1C;font-weight:500; }
    .pd-pie-amt { font-size:13px;color:#484848;font-weight:500;text-align:right; }
    .pd-pie-pct { font-size:13px;color:#1C1C1C;font-weight:600;text-align:right;width:60px; }
    
    /* Invoice filters */
    .inv-filter-btn { padding:6px 12px;border:1px solid #E8E8E8;background:#fff;border-radius:6px;font-size:12px;font-weight:500;color:#484848;cursor:pointer;font-family:'DM Sans',sans-serif;display:inline-flex;align-items:center;gap:6px; }
    .inv-filter-btn:hover { background:#FAFAFA;border-color:#452E5A;color:#452E5A; }
    .inv-filter-btn.active { background:#452E5A;color:#fff;border-color:#452E5A; }
    .inv-filter-btn.active .inv-count { background:rgba(255,255,255,0.25);color:#fff; }
    .inv-count { background:#F0F0F0;color:#484848;font-size:10px;font-weight:700;padding:1px 7px;border-radius:10px; }
    
    /* Reminder template buttons */
    .reminder-tmpl { padding:6px 14px;border:1px solid #E8E8E8;background:#fff;border-radius:6px;font-size:12px;font-weight:500;color:#484848;cursor:pointer;font-family:'DM Sans',sans-serif; }
    .reminder-tmpl:hover { border-color:#452E5A;color:#452E5A; }
    .reminder-tmpl.active { background:#452E5A;color:#fff;border-color:#452E5A; }

    /* Recording Items */
    .recording-item {
      display: flex; align-items: center; gap: 14px;
      padding: 14px 24px; border-bottom: 1px solid #F0F0F0;
      cursor: pointer; transition: background 0.15s;
    }
    .recording-item:hover { background: #FAFAFA; }
    .recording-icon {
      width: 36px; height: 36px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .recording-icon.phone-rec { background: rgba(76,175,80,0.1); color: #4CAF50; }
    .recording-icon.video-rec { background: rgba(69,46,90,0.1); color: #452E5A; }
    .recording-info { flex: 1; }
    .recording-title { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .recording-meta { font-size: 12px; color: #8B8B8B; margin-top: 2px; }
    .recording-badge {
      font-size: 10px; font-weight: 600; color: #fff; background: #452E5A;
      padding: 2px 8px; border-radius: 10px;
    }

    /* Recording Tabs */
    .rec-tab {
      padding: 12px 24px; border: none; background: transparent;
      font-size: 14px; font-weight: 500; color: #8B8B8B; cursor: pointer;
      font-family: 'DM Sans', sans-serif; border-bottom: 2px solid transparent;
    }
    .rec-tab:hover { color: #484848; }
    .rec-tab.active { color: #1C1C1C; border-bottom-color: #452E5A; }

    /* Call Record Button & Indicator */
    .call-btn.record { color: #E53935; }
    .call-btn.record.active { background: rgba(229,57,53,0.15); color: #E53935; }
    .call-record-indicator {
      display: flex; align-items: center; gap: 6px; justify-content: center;
      font-size: 12px; color: #E53935; font-weight: 500; margin-top: 8px;
    }
    .record-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #E53935;
      animation: recordPulse 1.2s ease-in-out infinite;
    }
    @keyframes recordPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

    /* Invoice View Button */
    .invoice-view-btn {
      padding: 6px 14px;
      background: #452E5A;
      border: 1px solid #452E5A;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      color: #fff;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .invoice-view-btn:hover { background: #5B3D76; border-color: #5B3D76; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(69,46,90,0.3); }

    /* Invoice Receipt */
    .invoice-receipt {
      background: #fff;
      border-radius: 12px;
      padding: 28px 24px;
      width: 100%;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }
    .invoice-receipt-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 4px;
    }
    .invoice-company-logo {
      width: 44px; height: 44px; border-radius: 10px;
      background: rgba(69,46,90,0.1);
      display: flex; align-items: center; justify-content: center;
    }
    .invoice-company-name { font-size: 16px; font-weight: 700; color: #1C1C1C; }
    .invoice-company-sub { font-size: 11px; color: #8B8B8B; }
    .invoice-date { margin-left: auto; font-size: 13px; color: #8B8B8B; }
    .invoice-divider {
      height: 1px;
      background: repeating-linear-gradient(90deg, #E0E0E0 0px, #E0E0E0 6px, transparent 6px, transparent 10px);
      margin: 16px 0;
    }
    .invoice-meta { display: flex; flex-direction: column; gap: 10px; }
    .invoice-meta-row {
      display: flex; justify-content: space-between;
      font-size: 13px; color: #484848;
    }
    .invoice-meta-row span:first-child { color: #8B8B8B; }
    .invoice-meta-row span:last-child { font-weight: 500; }
    .invoice-table { margin-bottom: 4px; }
    .invoice-table-header {
      display: flex; justify-content: space-between;
      font-size: 10px; font-weight: 600; color: #8B8B8B;
      text-transform: uppercase; letter-spacing: 0.5px;
      padding-bottom: 10px; border-bottom: 1px solid #F0F0F0;
      margin-bottom: 10px;
    }
    .invoice-line-item {
      display: flex; justify-content: space-between;
      font-size: 13px; color: #484848; padding: 6px 0;
    }
    .invoice-line-item span:last-child { font-weight: 500; color: #1C1C1C; }
    .invoice-total {
      display: flex; justify-content: space-between;
      font-size: 15px; font-weight: 600; color: #1C1C1C;
      padding: 12px 0 8px;
    }
    .invoice-total span:last-child { color: #4CAF50; font-size: 18px; }
    .invoice-balance {
      display: flex; justify-content: space-between;
      font-size: 12px; color: #8B8B8B; padding-bottom: 16px;
    }
    .invoice-balance span:last-child { color: #E53935; font-weight: 500; }
    .invoice-barcode {
      display: flex; justify-content: center; padding-top: 12px;
    }
    .invoice-barcode-lines {
      width: 180px; height: 40px;
      background: repeating-linear-gradient(90deg, #1C1C1C 0px, #1C1C1C 2px, transparent 2px, transparent 4px, #1C1C1C 4px, #1C1C1C 5px, transparent 5px, transparent 8px);
      border-radius: 2px;
    }

    /* HEADER */
    #equipmentSection .header {
      display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
      position: sticky; top: 0; z-index: 100;
      background: #F0F0F0; padding: 20px 0; margin: 0 0 20px 0;
    }
    #equipmentSection .page-title { font-size: 24px; font-weight: 600; color: #1C1C1C; }
    #equipmentSection .header-spacer { flex: 1; }
    #equipmentSection .tabs { display: flex; align-items: center; gap: 4px; }
    #equipmentSection .tab {
      padding: 7px 12px; border-radius: 4px; font-size: 14px; cursor: pointer;
      border: none; background: transparent; font-family: 'DM Sans', sans-serif;
      color: #484848; font-weight: 500; height: 28px; display: flex; align-items: center; justify-content: center;
    }
    #equipmentSection .tab:hover { background: rgba(69,46,90,0.1); }
    #equipmentSection .tab.active { background: #452E5A; color: #fff; font-weight: 700; }
    #equipmentSection .header-spacer { flex: 1; }
    #equipmentSection .search-box {
      background: #F5F5F5; border: 1px solid #E8E8E8; border-radius: 8px;
      display: flex; align-items: center; padding: 0 14px; height: 40px; min-width: 320px; gap: 10px;
    }
    #equipmentSection .search-box svg { width: 18px; height: 18px; color: #999; }
    #equipmentSection .search-box input {
      border: none; outline: none; flex: 1; font-size: 14px;
      font-family: 'DM Sans', sans-serif; background: transparent; color: #1C1C1C;
    }
    #equipmentSection .search-box input::placeholder { color: #999; }
    #equipmentSection .header-actions { display: flex; align-items: center; gap: 8px; }
    #equipmentSection .icon-btn {
      width: 40px; height: 40px; background: transparent; border: none;
      border-radius: 8px; display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: #484848;
    }
    #equipmentSection .icon-btn:hover { background: rgba(69,46,90,0.1); }
    #equipmentSection .icon-btn svg { width: 20px; height: 20px; }
    #equipmentSection .avatar {
      width: 40px; height: 40px; border-radius: 10px;
      background: linear-gradient(135deg, #452E5A 0%, #36234A 100%);
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; font-weight: 700; color: #fff; margin-left: 4px;
    }

    /* TABLE */
    #equipmentSection .table-container { background: #F5F5F5; border-radius: 8px; overflow: hidden; flex: 1; display: flex; flex-direction: column; }
    #equipmentSection .table-scroll { overflow-x: auto; overflow-y: auto; flex: 1; }
    #equipmentSection .table { width: 100%; border-collapse: collapse; }
    #equipmentSection .table thead { position: sticky; top: 0; z-index: 10; }
    #equipmentSection .table th {
      background: rgba(69,46,90,0.12); padding: 16px 20px;
      text-align: left; font-size: 12px; font-weight: 600;
      color: #452E5A; text-transform: uppercase; letter-spacing: 0.5px;
      border-bottom: 2px solid #E0E0E0;
      backdrop-filter: blur(8px);
    }
    #equipmentSection .table td {
      padding: 16px 20px; font-size: 14px; color: #1C1C1C;
      border-bottom: 1px solid #E0E0E0; vertical-align: middle;
      background: #F5F5F5;
    }
    #equipmentSection .table tbody tr:last-child td { border-bottom: none; }
    #equipmentSection .table tbody tr:hover td { background: rgba(69,46,90,0.05); }

    /* NAME CELL */
    #equipmentSection .name-cell { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; transition: background 0.2s; }
    #equipmentSection .name-cell:hover { background: rgba(69,46,90,0.08); }
    #equipmentSection .name-cell:hover .name-text { color: #452E5A; }
    #equipmentSection .avatar-small {
      width: 40px; height: 40px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    #equipmentSection .name-info { display: flex; flex-direction: column; gap: 3px; }
    #equipmentSection .name-text { font-size: 14px; font-weight: 500; color: #1C1C1C; cursor: pointer; }
    #equipmentSection .name-text:hover { color: #452E5A; }
    #equipmentSection .star-rating { display: flex; gap: 1px; }
    .star { color: #FFB800; font-size: 10px; }
    .star.empty { color: #E0E0E0; }

    /* EQUIPMENT CELL */
    #equipmentSection .equip-cell { display: flex; align-items: center; gap: 12px; }
    #equipmentSection .equip-icon {
      width: 40px; height: 40px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    #equipmentSection .equip-icon svg { width: 20px; height: 20px; }
    #equipmentSection .equip-icon.laptop { background: rgba(69,46,90,0.12); color: #452E5A; }
    #equipmentSection .equip-icon.tool { background: rgba(237, 137, 54, 0.12); color: #ED8936; }
    #equipmentSection .equip-icon.machinery { background: rgba(72, 187, 120, 0.12); color: #48BB78; }
    #equipmentSection .equip-icon.safety { background: rgba(56, 178, 172, 0.12); color: #38B2AC; }
    #equipmentSection .equip-icon.office { background: rgba(245, 101, 101, 0.12); color: #F56565; }
    #equipmentSection .equip-icon.vehicle { background: rgba(66, 153, 225, 0.12); color: #4299E1; }
    #equipmentSection .equip-info { display: flex; flex-direction: column; gap: 2px; }
    #equipmentSection .equip-name { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    #equipmentSection .equip-model { font-size: 12px; color: #8B8B8B; }

    /* ACTION BUTTONS */
    #equipmentSection .action-cell { display: flex; gap: 8px; align-items: center; }
    #equipmentSection .action-btn {
      width: 28px; height: 28px; border: none; background: transparent;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      border-radius: 6px; color: #452E5A;
    }
    #equipmentSection .action-btn:hover { background: rgba(69,46,90,0.1); }
    #equipmentSection .action-btn svg { width: 18px; height: 18px; }

    /* PAGINATION */
    #equipmentSection .pagination {
      display: flex; justify-content: space-between; align-items: center;
      padding: 16px 20px; border-top: 1px solid #F0F0F0;
    }
    #equipmentSection .pagination-left { display: flex; align-items: center; gap: 4px; }
    #equipmentSection .page-btn {
      min-width: 32px; height: 32px; border: none; background: transparent;
      cursor: pointer; border-radius: 8px; font-size: 14px; color: #484848;
      display: flex; align-items: center; justify-content: center;
      font-family: 'DM Sans', sans-serif;
    }
    #equipmentSection .page-btn:hover { background: rgba(69,46,90,0.1); }
    #equipmentSection .page-btn.active { background: #452E5A; color: #fff; }
    #equipmentSection .page-select {
      margin-left: 12px; padding: 6px 28px 6px 12px;
      border: 1px solid #E8E8E8; border-radius: 6px; font-size: 14px;
      font-family: 'DM Sans', sans-serif; background: #F5F5F5; cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 8px center;
    }
    #equipmentSection .pagination-right { font-size: 14px; color: #484848; }

    /* AVATAR COLORS */
    #equipmentSection .avatar-red { background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%); }
    #equipmentSection .avatar-teal { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); }
    #equipmentSection .avatar-purple { background: linear-gradient(135deg, #452E5A 0%, #36234A 100%); }
    #equipmentSection .avatar-blue { background: linear-gradient(135deg, #45B7D1 0%, #2E9ABF 100%); }
    #equipmentSection .avatar-green { background: linear-gradient(135deg, #96CEB4 0%, #7AB89A 100%); }
    #equipmentSection .avatar-gold { background: linear-gradient(135deg, #F8B500 0%, #E09F00 100%); }
    #equipmentSection .avatar-pink { background: linear-gradient(135deg, #FF8C94 0%, #FF6B7A 100%); }
    #equipmentSection .avatar-available { background: linear-gradient(135deg, #48BB78 0%, #38A169 100%); }
    #equipmentSection .available-cell { display: flex; align-items: center; gap: 12px; }
    #equipmentSection .available-icon {
      width: 40px; height: 40px; border-radius: 10px;
      background: rgba(72, 187, 120, 0.12); 
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    #equipmentSection .available-icon svg { width: 20px; height: 20px; color: #48BB78; }
    #equipmentSection .available-text { font-size: 14px; font-weight: 500; color: #48BB78; }
    #equipmentSection .avatar-indigo { background: linear-gradient(135deg, #6C5CE7 0%, #5541D7 100%); }
    #equipmentSection .avatar-orange { background: linear-gradient(135deg, #ED8936 0%, #DD6B20 100%); }
    #equipmentSection .avatar-cyan { background: linear-gradient(135deg, #38B2AC 0%, #2C8A85 100%); }
    #equipmentSection .avatar-rose { background: linear-gradient(135deg, #F687B3 0%, #ED64A6 100%); }
    #equipmentSection .avatar-gray { background: #E8E8E8; color: #999 !important; }

    /* PROFILE OVERLAY */
    .profile-overlay {
      position: fixed; top: 0; left: 220px; right: 0; bottom: 0;
      background: #F0F0F0; z-index: 200; display: none;
      flex-direction: column; overflow-y: auto; transition: left 0.3s ease;
    }
    .profile-overlay.show { display: flex; }
    .sidebar.collapsed ~ .main .profile-overlay,
    .profile-overlay.sidebar-collapsed { left: 60px; }
    /* All profile overlays follow sidebar collapse uniformly */
    .sidebar.collapsed ~ .main #companyProfileOverlay,
    .sidebar.collapsed ~ .main #companyEmployeeProfilePage,
    .sidebar.collapsed ~ .main #recruiterProfilePage,
    .sidebar.collapsed ~ .main #timesheetOverlay,
    .sidebar.collapsed ~ .main #subProfileOverlay { left: 60px !important; }
    /* #timesheetOverlay is relocated to <body> (sibling of .sidebar), so it
       needs a sibling-combinator rule; 60px matches the collapsed rail width. */
    .sidebar.collapsed ~ #timesheetOverlay { left: 60px !important; }
    .profile-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 20px 28px; background: #F5F5F5; border-bottom: 1px solid #E8E8E8;
    }
    .profile-header-left { display: flex; align-items: center; gap: 16px; }
    #equipmentSection .back-btn {
      width: 40px; height: 40px; border: none; background: transparent;
      cursor: pointer; display: flex;
      align-items: center; justify-content: center;
    }
    #equipmentSection .back-btn:hover { background: transparent; }
    #equipmentSection .back-btn svg { width: 20px; height: 20px; color: #484848; }
    #equipmentSection .back-btn:hover svg { color: #452E5A; }
    .profile-title h1 { font-size: 20px; font-weight: 600; color: #1C1C1C; margin: 0; }
    .profile-title .subtitle { font-size: 13px; color: #8B8B8B; margin-top: 2px; }
    .profile-header-right { display: flex; gap: 10px; }
    .profile-btn {
      display: flex; align-items: center; gap: 6px; padding: 10px 16px;
      border: 1px solid #E8E8E8; background: #F5F5F5; border-radius: 8px;
      font-size: 13px; font-weight: 600; color: #484848;
      cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .profile-btn:hover { border-color: #452E5A; color: #452E5A; }
    .profile-btn svg { width: 16px; height: 16px; }
    .profile-btn.primary { background: #452E5A; border-color: #452E5A; color: #fff; }
    .profile-btn.primary:hover { background: #5B3D76; }
    .profile-tabs {
      display: flex; background: #F5F5F5; padding: 0 28px; border-bottom: 1px solid #E8E8E8;
    }
    .profile-tab {
      padding: 16px 20px; border: none; background: transparent;
      font-size: 13px; font-weight: 600; color: #8B8B8B;
      cursor: pointer; font-family: 'DM Sans', sans-serif; position: relative;
    }
    .profile-tab:hover { color: #1C1C1C; }
    .profile-tab.active { color: #452E5A; }
    .rec-subtab { padding: 9px 18px; border: 1px solid transparent; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 600; color: #7A7A7A; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .15s; }
    .rec-subtab:hover { color: #452E5A; }
    .rec-subtab.active { background: #452E5A; color: #fff; border-color: #452E5A; }
    .profile-tab.active::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0;
      height: 3px; background: #452E5A; border-radius: 3px 3px 0 0;
    }
    .profile-content { flex: 1; padding: 0; overflow-y: auto; }
    .profile-grid { display: flex; flex-direction: column; gap: 20px; }
    .profile-hero {
      display: flex; gap: 24px; padding: 24px;
      background: #F5F5F5; border-radius: 16px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .profile-hero-image {
      width: 120px; height: 120px;
      background: linear-gradient(145deg, rgba(69,46,90,0.15) 0%, rgba(69,46,90,0.05) 100%);
      border-radius: 16px; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .profile-hero-image svg { width: 48px; height: 48px; color: #452E5A; }
    .profile-hero-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
    .profile-hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
    .profile-hero-meta { display: flex; gap: 32px; flex-wrap: wrap; }
    .profile-hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
    .profile-hero-meta-item label { font-size: 11px; color: #8B8B8B; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
    .profile-hero-meta-item span { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .profile-cards-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .profile-card { 
      background: #F5F5F5; border-radius: 16px; padding: 24px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .profile-card.full-width { grid-column: 1 / -1; }
    .profile-card + .profile-card { margin-top: 0; }
    .profile-card-title {
      font-size: 15px; font-weight: 600; color: #1C1C1C; margin-bottom: 20px;
      display: flex; align-items: center; gap: 10px;
    }
    .profile-card-title::before {
      content: ''; width: 4px; height: 18px; background: #452E5A; border-radius: 2px;
    }
    .detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .detail-item { display: flex; flex-direction: column; gap: 6px; }
    .detail-item label { 
      font-size: 11px; color: #8B8B8B; text-transform: uppercase; 
      letter-spacing: 0.5px; font-weight: 500;
    }
    .detail-item span { font-size: 15px; color: #1C1C1C; font-weight: 500; }
    .detail-item span.highlight { color: #452E5A; font-weight: 600; }
    .detail-item span.price { color: #48BB78; font-weight: 600; }
    .detail-item span.price-warn { color: #ED8936; font-weight: 600; }
    .status-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    }
    .status-badge .dot { width: 8px; height: 8px; border-radius: 50%; }
    .status-badge.in-use { background: rgba(66, 153, 225, 0.12); color: #2B6CB0; }
    .status-badge.in-use .dot { background: #4299E1; }
    .status-badge.available { background: rgba(72, 187, 120, 0.12); color: #2F855A; }
    .status-badge.available .dot { background: #48BB78; }
    .condition-badge {
      display: inline-block; padding: 6px 12px; border-radius: 8px;
      font-size: 13px; font-weight: 600;
    }
    .condition-badge.excellent { background: rgba(72, 187, 120, 0.12); color: #2F855A; }
    .condition-badge.good { background: rgba(66, 153, 225, 0.12); color: #2B6CB0; }
    .condition-badge.fair { background: rgba(237, 137, 54, 0.12); color: #C05621; }
    .condition-badge.poor { background: rgba(245, 101, 101, 0.12); color: #C53030; }
    .user-cell { display: flex; align-items: center; gap: 12px; }
    .user-cell.clickable { cursor: pointer; padding: 6px 10px; margin: -6px -10px; border-radius: 8px; transition: background 0.2s; }
    .user-cell.clickable:hover { background: rgba(69,46,90,0.1); }
    .user-cell.clickable .user-name { color: #452E5A; }
    .user-avatar {
      width: 40px; height: 40px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff;
    }
    .user-info { display: flex; flex-direction: column; }
    .user-name { font-size: 14px; font-weight: 600; color: #1C1C1C; }
    .user-role { font-size: 12px; color: #8B8B8B; }

    /* ── Responsive: tablet/mobile sidebar + tables + modals ── */
    /* Mobile menu button (only visible at mobile widths) */
    #mobileMenuBtn {
      position: fixed; top: 12px; left: 12px; z-index: 250;
      width: 38px; height: 38px; padding: 0;
      background: #fff; border: 1px solid #ECECEF; border-radius: 8px;
      display: none; align-items: center; justify-content: center;
      cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    #mobileMenuBtn:hover { background: #F5F5F7; }
    #mobileMenuBtn svg { width: 18px; height: 18px; color: #1C1C1C; }
    #mobileBackdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.42);
      z-index: 199; display: none;
      animation: backdropFade 0.2s ease;
    }
    #mobileBackdrop.show { display: block; }
    @keyframes backdropFade { from { opacity: 0; } to { opacity: 1; } }

    /* Tablet — auto-collapse main sidebar to icons */
    @media (max-width: 1024px) {
      .sidebar:not(.mobile-open) { width: 60px; }
      .sidebar:not(.mobile-open) .sidebar-logo span,
      .sidebar:not(.mobile-open) .nav-item-text,
      .sidebar:not(.mobile-open) .nav-item .arrow { opacity: 0; width: 0; }
      .sidebar:not(.mobile-open) .sidebar-toggle { margin-left: 0; }
      .sidebar:not(.mobile-open) .sidebar-toggle svg { transform: rotate(180deg); }
      .main { margin-left: 60px !important; max-width: calc(100vw - 60px) !important; }
      /* Header tightening */
      .header { padding: 12px 16px; }
      /* Cards grid already responsive via auto-fit */
    }

    /* Mobile — sidebar becomes slide-out drawer */
    @media (max-width: 768px) {
      #mobileMenuBtn { display: flex; }
      .sidebar {
        width: 240px !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
        box-shadow: none;
      }
      .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
      }
      /* When drawer is open on mobile, always show full labels */
      .sidebar.mobile-open .sidebar-logo span,
      .sidebar.mobile-open .nav-item-text,
      .sidebar.mobile-open .nav-item .arrow { opacity: 1 !important; width: auto !important; }
      .main { margin-left: 0 !important; max-width: 100vw !important; padding: 60px 14px 16px !important; }
      /* Search bar / header items wrap */
      .header { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
      .search-box { width: 100%; order: 10; }
      /* Tables — horizontal scroll instead of squish */
      .table-container, .company-table-wrap,
      .profile-content table, .table { display: block; }
      .table-container, .company-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      table.table, table.company-table { min-width: 720px; }
      /* Modals — fit small screens, allow scroll inside */
      .modal-overlay > .credit-modal,
      .modal-overlay > .share-modal,
      .modal-overlay > div[class*="modal"] { max-width: 96vw !important; max-height: 92vh; }
      /* Profile-view-screen sidebar also becomes drawer */
      .profile-sidebar {
        position: absolute; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
      }
      .profile-sidebar.mobile-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.18); }
      .profile-main-content { width: 100% !important; }
      .profile-view-screen { position: fixed; }
      /* Modal footers stack on narrow screens */
      .share-modal-footer { flex-wrap: wrap; }
      /* Profile-overlay full width */
      .profile-overlay, #companyProfileOverlay, #companyEmployeeProfilePage,
      #recruiterProfilePage, #timesheetOverlay, #subProfileOverlay { left: 0 !important; }
    }

    /* Small mobile */
    @media (max-width: 480px) {
      .main { padding: 56px 10px 12px !important; }
      .share-methods { grid-template-columns: 1fr 1fr; }
      .share-modal-header h3 { font-size: 14px; }
      .share-modal-body { padding: 12px 16px; }
      .share-modal-footer { padding: 12px 16px; }
      .share-history-row { flex-wrap: wrap; }
      /* Hide secondary header chrome where helpful */
      .notification-btn, .icon-btn { padding: 6px; }
      /* Tabs scroll horizontally */
      .tabs, .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
      .tab, .profile-tab { white-space: nowrap; flex-shrink: 0; }
    }

    /* MOBILE RESPONSIVE */
    @media (max-width: 1024px) {
      .profile-cards-row { grid-template-columns: 1fr; }
      .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    }
    @media (max-width: 768px) {
      .profile-overlay { left: 0 !important; }
      .profile-header { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
      .profile-header-left { flex: 1; min-width: 200px; }
      .profile-header-right { width: 100%; display: flex; gap: 10px; }
      .profile-header-right .profile-btn { flex: 1; justify-content: center; }
      .profile-tabs { padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
      .profile-tab { white-space: nowrap; padding: 14px 16px; font-size: 13px; }
      .profile-content { padding: 0; }
      .profile-hero { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
      .profile-hero-image { width: 100px; height: 100px; }
      .profile-hero-badges { justify-content: center; }
      .profile-hero-meta { justify-content: center; gap: 24px; }
      .profile-card { padding: 20px; }
      .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
      .detail-item span { font-size: 14px; }
    }
    @media (max-width: 480px) {
      .profile-title h1 { font-size: 18px; }
      .profile-title .subtitle { font-size: 12px; }
      .profile-tabs { gap: 0; }
      .profile-tab { padding: 12px 14px; font-size: 12px; }
      .profile-hero-meta { flex-direction: column; gap: 12px; }
      .detail-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
      .detail-item label { font-size: 10px; }
      .detail-item span { font-size: 13px; }
      .history-table { font-size: 12px; }
      .history-table th, .history-table td { padding: 10px 12px; }
    }
    .history-table { width: 100%; border-collapse: collapse; }
    .history-table th {
      background: rgba(69,46,90,0.06); padding: 12px 16px;
      text-align: left; font-size: 11px; font-weight: 600;
      color: #452E5A; text-transform: uppercase;
    }
    .history-table td {
      padding: 14px 16px; font-size: 13px; color: #1C1C1C;
      border-bottom: 1px solid #F5F5F5;
    }
    .history-table tr:last-child td { border-bottom: none; }
    .files-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .file-card {
      background: #F8F8F8; border-radius: 12px; padding: 20px;
      text-align: center; cursor: pointer; border: 1px solid transparent; transition: all 0.2s;
    }
    .file-card:hover { background: #F5F5F5; border-color: #452E5A; }
    .file-icon {
      width: 48px; height: 48px; background: rgba(69,46,90,0.1);
      border-radius: 12px; display: flex; align-items: center; justify-content: center;
      margin: 0 auto 12px;
    }
    .file-icon svg { width: 24px; height: 24px; color: #452E5A; }
    .file-name { font-size: 13px; font-weight: 500; color: #1C1C1C; margin-bottom: 4px; }
    .file-meta { font-size: 11px; color: #8B8B8B; }
    #equipmentSection .tab-content { display: none; }
    #equipmentSection .tab-content.active { display: block; }
    /* Equipment Profile Overlay nests inside #equipmentSection — make its tab content win */
    #profileOverlay .tab-content { display: none !important; }
    #profileOverlay .tab-content.active { display: block !important; }

    /* MODAL */
    .modal-overlay {
      position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.5); display: none;
      align-items: center; justify-content: center; z-index: 2000;
    }
    .modal-overlay.show { display: flex; }
    /* Modals opened from within the Personnel Profile (z-index:3000) must sit above it */
    #recordingsModal, #recordingDetailModal { z-index: 3500; }
    /* The Ongoing Call modal must sit above EVERY profile overlay (z-index up to 3000) */
    #callModal { z-index: 6000; }
    /* The global "Are you sure?" dialog must sit above EVERY other modal */
    #confirmDialog { z-index: 7000; }
    /* Focused per-card section edit modals — above the profile-view layer */
    #editCompensationModal, #editBankingModal, #editContactModal { z-index: 4000; }
    
    /* ===== COMBINED CALL + RECORDING SIDE-BY-SIDE LAYOUT ===== */
    .call-combined-wrap {
      display:flex;
      gap:0;
      align-items:stretch;
      max-width:96%;
      background:#fff;
      border-radius:16px;
      box-shadow:0 24px 60px rgba(20,15,30,0.25);
      overflow:hidden;
      animation:tsPickerIn 0.25s cubic-bezier(0.16,1,0.3,1);
    }
    /* Override existing .call-modal so it merges seamlessly into the combined wrap */
    .call-combined-wrap .call-modal {
      background:#FCFCFC;
      border-radius:0;
      box-shadow:none;
      width:420px;
      height:auto;
      min-height:680px;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:flex-start;
      padding:28px 24px 24px;
      border-right:1px solid #F0F0F2;
      flex-shrink:0;
      overflow-y:auto;
      max-height:90vh;
    }
    /* Avatar smaller now that the panel has more content */
    .call-combined-wrap .call-avatar {
      width: 92px;
      height: 92px;
      border-radius: 18px;
      font-size: 28px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }
    .call-combined-wrap .call-name { margin-top: 14px; font-size: 16px; font-weight: 600; }
    .call-combined-wrap .call-status { margin-top: 3px; font-size: 12px; color: #6B6B6B; }
    /* Give the action buttons a bit more breathing room (margin-top auto → fixed gap) */
    .call-combined-wrap .call-actions {
      margin-top:36px;
      gap:10px;
    }
    /* Make sure the icon buttons have proper inner padding so borders don't touch icons */
    .call-combined-wrap .call-btn:not(.end) {
      width:48px;
      height:48px;
      border-radius:10px;
      background:#fff;
      border:1px solid #E8E8E8;
      box-shadow:0 2px 6px rgba(0,0,0,0.04);
      padding:0;
    }
    .call-combined-wrap .call-btn:not(.end) svg {
      width:18px;
      height:18px;
    }
    .call-combined-wrap .call-btn:not(.end):hover {
      background:#FAFAFA;
      border-color:#D8D8D8;
    }
    .call-combined-wrap .call-btn.end {
      height:48px;
      padding:0 22px;
      border-radius:10px;
      box-shadow:0 4px 12px rgba(204,38,38,0.25);
    }
    
    /* RIGHT: Recording Panel — no individual border/shadow (parent handles it now) */
    .call-recording-panel {
      background:#fff;
      border-radius:0;
      box-shadow:none;
      width:600px;
      max-width:52vw;
      min-height:520px;
      display:flex;
      flex-direction:column;
      overflow:hidden;
      font-family:'DM Sans',sans-serif;
    }
    .crp-head {
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:18px 22px 14px;
      border-bottom:1px solid #F2F2F4;
      flex-shrink:0;
    }
    .crp-head h3 {
      margin:0;
      font-size:16px;
      font-weight:700;
      color:#1C1C1C;
      letter-spacing:-0.2px;
    }
    .crp-back {
      width:30px;
      height:30px;
      border:none;
      background:#F5F5F7;
      border-radius:7px;
      cursor:pointer;
      color:#484848;
      display:flex;
      align-items:center;
      justify-content:center;
      transition:all 0.15s;
    }
    .crp-back:hover { background:#E8E8EC; color:#1C1C1C; }
    .crp-close {
      width:30px;
      height:30px;
      border:none;
      background:#F5F5F7;
      color:#484848;
      border-radius:7px;
      cursor:pointer;
      display:flex;
      align-items:center;
      justify-content:center;
      transition:all 0.15s;
    }
    .crp-close:hover { background:#1C1C1C; color:#fff; transform:rotate(90deg); }
    .crp-meta {
      display:flex;
      align-items:center;
      gap:18px;
      padding:12px 22px;
      border-bottom:1px solid #F2F2F4;
      flex-shrink:0;
      flex-wrap:wrap;
    }
    .crp-meta-item {
      display:flex;
      align-items:center;
      gap:6px;
      font-size:12.5px;
      color:#484848;
    }
    .crp-tabs {
      display:flex;
      align-items:center;
      border-bottom:1px solid #F2F2F4;
      flex-shrink:0;
      padding:0 22px;
    }
    .crp-tab {
      padding:12px 4px;
      margin-right:22px;
      background:transparent;
      border:none;
      border-bottom:2px solid transparent;
      font-size:13px;
      font-weight:600;
      color:#8B8B8B;
      cursor:pointer;
      font-family:'DM Sans',sans-serif;
      transition:all 0.15s;
    }
    .crp-tab:hover { color:#1C1C1C; }
    .crp-tab.active { color:#452E5A; border-bottom-color:#452E5A; }
    /* Boxy quick-toggle buttons next to the tabs */
    .crp-tab-actions {
      margin-left:auto;
      display:flex;
      gap:6px;
      padding:6px 0;
    }
    .crp-quick-btn {
      width:34px;
      height:34px;
      background:#fff;
      border:1px solid #E0E0E5;
      border-radius:8px;
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      color:#484848;
      transition:all 0.15s;
      box-shadow:0 1px 3px rgba(0,0,0,0.04);
    }
    .crp-quick-btn:hover {
      background:#FAFAFB;
      border-color:#C8C8CC;
      color:#1C1C1C;
    }
    .crp-quick-btn.active {
      background:#4CAF50;
      border-color:#4CAF50;
      color:#fff;
      box-shadow:0 2px 8px rgba(76,175,80,0.25);
    }
    .crp-quick-btn.muted {
      background:#F56565;
      border-color:#F56565;
      color:#fff;
    }
    .crp-body {
      padding:20px 22px;
      overflow-y:auto;
      flex:1;
    }
    .crp-section {
      margin-bottom:22px;
    }
    .crp-section:last-child { margin-bottom:0; }
    .crp-section-head {
      display:flex;
      align-items:center;
      gap:8px;
      font-size:14px;
      font-weight:700;
      color:#1C1C1C;
      margin-bottom:10px;
    }
    .crp-section-text {
      font-size:13px;
      color:#484848;
      line-height:1.65;
    }
    .crp-actions-list {
      display:flex;
      flex-direction:column;
      gap:10px;
    }
    .crp-action {
      display:flex;
      align-items:flex-start;
      gap:10px;
      font-size:13px;
      color:#484848;
      line-height:1.5;
      cursor:pointer;
      padding:6px 0;
    }
    .crp-action input[type="checkbox"] {
      margin-top:3px;
      accent-color:#452E5A;
      cursor:pointer;
      flex-shrink:0;
    }
    .crp-action input[type="checkbox"]:checked + span {
      text-decoration:line-through;
      color:#8B8B8B;
    }
    /* Transcript styling */
    .crp-transcript-line {
      display:flex;
      gap:10px;
    }
    .crp-transcript-speaker {
      flex-shrink:0;
      width:30px;
      height:30px;
      border-radius:50%;
      display:flex;
      align-items:center;
      justify-content:center;
      color:#fff;
      font-size:10px;
      font-weight:700;
    }
    .crp-transcript-body {
      flex:1;
      font-size:13px;
      color:#1C1C1C;
      line-height:1.55;
    }
    .crp-transcript-meta {
      font-size:10px;
      color:#8B8B8B;
      margin-bottom:3px;
      font-weight:600;
    }

    /* ── Transcript toolbar (search + export) ── */
    .crp-transcript-toolbar {
      display:flex; align-items:center; gap:8px;
      padding:10px 22px; border-bottom:1px solid #F2F2F4;
      flex-shrink:0; background:#FAFAFA;
    }
    .crp-ts-search {
      flex:1; position:relative; display:flex; align-items:center;
    }
    .crp-ts-search svg { position:absolute; left:9px; width:13px; height:13px; color:#ABABAB; }
    .crp-ts-search input {
      width:100%; padding:7px 10px 7px 28px;
      border:1px solid #E8E8EC; border-radius:7px;
      font-size:12px; font-family:'DM Sans',sans-serif;
      background:#fff; outline:none;
    }
    .crp-ts-search input:focus { border-color:#452E5A; }
    .crp-ts-btn {
      width:30px; height:30px; border:1px solid #E8E8EC;
      background:#fff; border-radius:7px; cursor:pointer;
      display:flex; align-items:center; justify-content:center;
      color:#484848; transition:all .12s; flex-shrink:0;
    }
    .crp-ts-btn:hover { background:#EFE8F6; border-color:#452E5A; color:#452E5A; }
    .crp-ts-btn svg { width:13px; height:13px; }
    .crp-ts-export-menu {
      position:relative;
    }
    .crp-ts-dropdown {
      position:absolute; top:34px; right:0;
      background:#fff; border:1px solid #E8E8EC; border-radius:8px;
      box-shadow:0 6px 18px rgba(0,0,0,0.1); min-width:140px;
      display:none; z-index:100; padding:4px;
    }
    .crp-ts-dropdown.open { display:block; }
    .crp-ts-dropdown-item {
      display:flex; align-items:center; gap:8px;
      padding:8px 10px; border-radius:6px; cursor:pointer;
      font-size:12px; color:#484848; transition:background .1s;
    }
    .crp-ts-dropdown-item:hover { background:#EFE8F6; color:#452E5A; }
    .crp-ts-dropdown-item svg { width:12px; height:12px; flex-shrink:0; }

    /* ── Language / AI status bar ── */
    .crp-ai-bar {
      display:flex; align-items:center; gap:8px; flex-wrap:wrap;
      padding:8px 22px; border-bottom:1px solid #F2F2F4;
      flex-shrink:0; background:#F8F5FC;
    }
    .crp-ai-badge {
      display:inline-flex; align-items:center; gap:5px;
      padding:3px 9px; border-radius:20px; font-size:11px; font-weight:600;
    }
    .crp-ai-badge.lang { background:#EFE8F6; color:#452E5A; }
    .crp-ai-badge.accent { background:#E6F7EE; color:#2F7A4D; }
    .crp-ai-badge.live { background:#FFF3E6; color:#C07828; }
    .crp-ai-badge svg { width:10px; height:10px; }
    .crp-translate-btn {
      margin-left:auto; display:flex; align-items:center; gap:5px;
      padding:4px 10px; background:#452E5A; color:#fff;
      border:none; border-radius:6px; font-size:11px; font-weight:700;
      cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .12s;
    }
    .crp-translate-btn:hover { background:#5B3D76; }
    .crp-translate-btn svg { width:11px; height:11px; }

    /* ── Keyword highlight in transcript ── */
    .crp-keyword {
      background:#FFF176; border-radius:3px; padding:0 2px;
      font-weight:600; color:#7B5900;
    }
    .crp-action-item-tag {
      display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase;
      padding:1px 5px; border-radius:3px; margin-left:4px; letter-spacing:.4px;
    }
    .crp-action-item-tag.action { background:#EFE8F6; color:#452E5A; }
    .crp-action-item-tag.followup { background:#E6F7EE; color:#2F7A4D; }

    /* ── AI Notes tab ── */
    .crp-notes-toolbar {
      display:flex; align-items:center; gap:6px;
      padding:10px 22px 8px; border-bottom:1px solid #F2F2F4;
      flex-shrink:0; flex-wrap:wrap;
    }
    .crp-notes-chip {
      display:inline-flex; align-items:center; gap:4px;
      padding:4px 10px; border-radius:20px;
      font-size:11px; font-weight:600; cursor:pointer;
      border:1.5px solid transparent; transition:all .12s;
    }
    .crp-notes-chip.active { background:#452E5A; color:#fff; border-color:#452E5A; }
    .crp-notes-chip:not(.active) { background:#F5F5F7; color:#484848; border-color:#EBEBEB; }
    .crp-notes-chip:not(.active):hover { background:#EFE8F6; border-color:#452E5A; color:#452E5A; }

    /* Sentiment gauge */
    .crp-sentiment-row {
      display:flex; align-items:center; gap:12px;
      padding:12px 14px; background:#FAFAFA;
      border:1px solid #EBEBEB; border-radius:10px; margin-bottom:10px;
    }
    .crp-sentiment-icon { font-size:24px; flex-shrink:0; }
    .crp-sentiment-info { flex:1; min-width:0; }
    .crp-sentiment-label { font-size:12px; font-weight:700; color:#1C1C1C; margin-bottom:4px; }
    .crp-sentiment-bar-wrap { height:6px; background:#EBEBEB; border-radius:3px; }
    .crp-sentiment-bar { height:6px; border-radius:3px; transition:width .5s; }
    .crp-sentiment-bar.positive { background:linear-gradient(90deg,#48BB78,#38A169); }
    .crp-sentiment-bar.neutral { background:linear-gradient(90deg,#ECC94B,#D69E2E); }
    .crp-sentiment-bar.negative { background:linear-gradient(90deg,#FC8181,#E53E3E); }
    .crp-sentiment-pct { font-size:11px; font-weight:700; color:#484848; margin-top:3px; }

    /* Action items in AI Notes */
    .crp-note-item {
      display:flex; align-items:flex-start; gap:10px;
      padding:10px 12px; background:#fff; border:1px solid #EBEBEB;
      border-radius:8px; margin-bottom:6px;
    }
    .crp-note-item input[type="checkbox"] { margin-top:2px; accent-color:#452E5A; flex-shrink:0; }
    .crp-note-item-body { flex:1; }
    .crp-note-item-text { font-size:13px; color:#1C1C1C; line-height:1.5; }
    .crp-note-item-meta { font-size:10px; color:#ABABAB; margin-top:2px; }
    .crp-note-item-tag {
      display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase;
      padding:1px 5px; border-radius:3px; letter-spacing:.4px;
    }
    .crp-note-item-tag.task { background:#EFE8F6; color:#452E5A; }
    .crp-note-item-tag.followup { background:#E6F7EE; color:#2F7A4D; }
    .crp-note-item-tag.important { background:#FFF3E6; color:#C07828; }
    .crp-note-item-tag.todo { background:#EFF6FF; color:#2563EB; }

    /* Custom notes textarea */
    .crp-custom-notes {
      width:100%; padding:10px 12px;
      border:1px solid #EBEBEB; border-radius:8px;
      font-size:13px; font-family:'DM Sans',sans-serif;
      resize:none; min-height:80px; background:#FAFAFA;
      transition:border-color .15s; line-height:1.6;
    }
    .crp-custom-notes:focus { outline:none; border-color:#452E5A; background:#fff; }
    .crp-voice-note-btn {
      display:flex; align-items:center; gap:6px;
      padding:7px 14px; border:1.5px dashed #DDDDE0;
      background:#FAFAFA; border-radius:8px;
      font-size:12px; font-weight:600; color:#484848;
      cursor:pointer; font-family:'DM Sans',sans-serif;
      width:100%; justify-content:center; transition:all .15s;
      margin-top:6px;
    }
    .crp-voice-note-btn:hover { border-color:#452E5A; color:#452E5A; background:#EFE8F6; }
    .crp-voice-note-btn svg { width:14px; height:14px; }

    /* ── Storage / Share action bar ── */
    .crp-storage-bar {
      display:flex; align-items:center; gap:6px; flex-wrap:wrap;
      padding:10px 22px; border-top:1px solid #F2F2F4;
      flex-shrink:0; background:#FAFAFA;
    }
    .crp-storage-bar-label { font-size:11px; font-weight:700; color:#ABABAB; text-transform:uppercase; letter-spacing:.4px; margin-right:2px; }
    .crp-storage-btn {
      display:inline-flex; align-items:center; gap:5px;
      padding:5px 11px; border:1px solid #DDDDE0; background:#fff;
      border-radius:6px; font-size:11px; font-weight:600; color:#484848;
      cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .12s;
    }
    .crp-storage-btn svg { width:11px; height:11px; }
    .crp-storage-btn:hover { background:#EFE8F6; border-color:#452E5A; color:#452E5A; }
    .crp-storage-btn.primary { background:#452E5A; color:#fff; border-color:#452E5A; }
    .crp-storage-btn.primary:hover { background:#5B3D76; }
    
    @media (max-width: 920px) {
      .call-combined-wrap {
        flex-direction:column;
        align-items:stretch;
        max-height:90vh;
        overflow-y:auto;
        max-width:96vw;
      }
      .call-combined-wrap .call-modal {
        width:auto;
        min-height:auto;
        padding:32px 24px;
        border-right:none;
        border-bottom:1px solid #F0F0F2;
      }
      .call-recording-panel {
        max-width:none;
        width:auto;
        min-height:auto;
      }
    }
    .modal { background: #F5F5F5; border-radius: 16px; width: 680px; max-height: 90vh; overflow-y: auto; }
    .modal-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 24px; border-bottom: 1px solid #F0F0F0;
      position: sticky; top: 0; background: #F5F5F5; z-index: 1;
    }
    .modal-header h2 { font-size: 20px; font-weight: 600; color: #1C1C1C; margin: 0; }
    .modal-close {
      width: 32px; height: 32px; border: none; background: #F5F5F5;
      border-radius: 8px; cursor: pointer; font-size: 18px; color: #666;
      display: flex; align-items: center; justify-content: center;
    }
    .modal-close:hover { background: #E8E8E8; }
    .modal-body { padding: 24px; }
    .form-section { margin-bottom: 28px; }
    .form-section:last-child { margin-bottom: 0; }
    .form-section-title {
      font-size: 14px; font-weight: 600; color: #1C1C1C; margin-bottom: 16px;
      padding-bottom: 8px; border-bottom: 1px solid #F0F0F0;
    }
    .form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
    .form-row:last-child { margin-bottom: 0; }
    .form-group { display: flex; flex-direction: column; gap: 6px; }
    .form-group.full { grid-column: span 2; }
    .form-group label { font-size: 13px; font-weight: 600; color: #484848; }
    .form-group input, .form-group select, .form-group textarea {
      padding: 10px 14px; border: 1px solid #E8E8E8; border-radius: 8px;
      font-size: 14px; font-family: 'DM Sans', sans-serif; color: #1C1C1C; background: #FAFAFA;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #452E5A; }
    .form-group select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
    }
    .form-group textarea { resize: vertical; min-height: 80px; }
    .modal-footer {
      display: flex; justify-content: flex-end; gap: 12px;
      padding: 20px 24px; border-top: 1px solid #F0F0F0; background: #F5F5F5;
    }
    .btn-cancel {
      padding: 12px 24px; border: 1px solid #E8E8E8; background: #F5F5F5;
      border-radius: 8px; font-size: 14px; font-weight: 600; color: #484848;
      cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .btn-cancel:hover { background: #F5F5F5; }
    .btn-save {
      padding: 12px 24px; border: none; background: #452E5A;
      border-radius: 8px; font-size: 14px; font-weight: 600; color: #fff;
      cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .btn-save:hover { background: #5B3D76; }

    /* CALL TYPE MODAL */
    .call-type-modal { background: #F5F5F5; border-radius: 8px; width: 400px; overflow: hidden; }
    .call-type-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .call-type-header h2 { margin: 0; font-size: 18px; font-weight: 600; color: #1C1C1C; }
    .call-type-close { width: 28px; height: 28px; border: none; background: none; cursor: pointer; font-size: 18px; color: #484848; }
    .call-type-recipient { display: flex; align-items: center; gap: 12px; padding: 20px 24px; background: #F8F8F8; }
    .call-type-avatar { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    .call-type-info { display: flex; flex-direction: column; gap: 2px; }
    .call-type-name { font-size: 16px; font-weight: 600; color: #1C1C1C; }
    .call-type-phone { font-size: 14px; color: #484848; }
    .call-type-options { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
    .call-type-option { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #E0E0E0; border-radius: 8px; background: #FAFAFA; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; text-align: left; }
    .call-type-option:hover { border-color: #452E5A; background: rgba(69,46,90,0.05); }
    .call-type-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
    .call-type-icon.phone-icon { background: rgba(76, 175, 80, 0.1); }
    .call-type-icon.phone-icon svg { width: 24px; height: 24px; color: #4CAF50; }
    .call-type-icon.video-icon { background: rgba(69,46,90,0.1); }
    .call-type-icon.video-icon svg { width: 24px; height: 24px; color: #452E5A; }
    .call-type-label { display: flex; flex-direction: column; gap: 2px; }
    .call-type-title { font-size: 15px; font-weight: 600; color: #1C1C1C; }
    .call-type-desc { font-size: 13px; color: #484848; }

    /* CALL MODAL */
    .call-modal { background: #FCFCFC; border-radius: 8px; width: 382px; height: 383px; display: flex; flex-direction: column; align-items: center; padding: 54px 20px 40px; }
    .call-avatar { width: 134px; height: 134px; border-radius: 24px; background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%); display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 700; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
    .call-name { margin-top: 12px; font-size: 17px; font-weight: 500; color: #1C1C1C; }
    .call-status { margin-top: 4px; font-size: 12px; color: #484848; }
    .call-actions { margin-top: auto; display: flex; gap: 8px; align-items: center; }
    .call-btn { width: 50px; height: 50px; border: none; border-radius: 8px; cursor: pointer; background: #F5F5F5; box-shadow: 0 7px 23px rgba(30,74,174,0.13); display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
    .call-btn svg { width: 22px; height: 22px; color: #484848; }
    .call-btn:hover { background: #F0F0F0; }
    .call-btn.active { background: #452E5A; }
    .call-btn.active svg { color: #fff; }
    .call-btn.video.active { background: #4CAF50; }
    .call-btn.video.active svg { color: #fff; }
    .call-btn.record.active { background: #4CAF50; }
    .call-btn.record.active svg { color: #fff; }
    .call-btn.end { width: 140px; background: #CC2626; color: #fff; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; }
    .call-btn.end:hover { background: #B01E1E; }

    /* ===== VIDEO DISPLAY AREA (video call mode) ===== */
    .call-video-area { width: 100%; margin-bottom: 12px; position: relative; }
    .call-video-remote {
      width: 100%;
      aspect-ratio: 16 / 10;
      background: #0F0F12;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .call-video-remote video { width: 100%; height: 100%; object-fit: cover; }
    .call-video-local {
      position: absolute;
      bottom: 10px;
      right: 10px;
      width: 78px;
      aspect-ratio: 4 / 3;
      background: #1C1C1C;
      border-radius: 8px;
      overflow: hidden;
      border: 2px solid #fff;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .call-video-local video { width: 100%; height: 100%; object-fit: cover; }
    .call-video-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      color: rgba(255,255,255,0.55);
      font-size: 11px;
      font-weight: 500;
      text-align: center;
      padding: 8px;
    }
    .call-video-placeholder.small { gap: 3px; font-size: 9px; }
    .call-video-placeholder.small svg { opacity: 0.6; }

    /* ===== SPEECH LISTENING INDICATOR ===== */
    .call-speech-indicator {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 7px 12px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      margin-top: 12px;
      font-size: 11.5px;
      color: #484848;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .speech-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #4CAF50;
      animation: speechPulse 1.4s ease-in-out infinite;
      flex-shrink: 0;
    }
    .call-speech-indicator.idle .speech-dot { background: #C8C8C8; animation: none; }
    .call-speech-indicator.error .speech-dot { background: #F56565; animation: none; }
    .speech-label { font-weight: 500; }
    .speech-caret { color: #8B8B8B; flex-shrink: 0; }
    @keyframes speechPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(0.8); }
    }

    /* ===== PERMISSION DENIED WARNING ===== */
    .call-permission-warning {
      display: none;
      width: 100%;
      padding: 11px 14px;
      background: rgba(245,101,101,0.08);
      border: 1px solid rgba(245,101,101,0.2);
      border-radius: 6px;
      margin-top: 12px;
      font-size: 12px;
      color: #C53030;
      line-height: 1.45;
      box-sizing: border-box;
    }
    .call-permission-warning.show { display: block; }

    /* ===== MOOD / EMOTION REVIEW ===== */
    .call-mood {
      width: 100%;
      margin-top: 12px;
      padding: 10px 14px;
      background: #FAFAFB;
      border: 1px solid #EFEFF2;
      border-radius: 8px;
      box-sizing: border-box;
    }
    .mood-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 9px;
    }
    .mood-label {
      font-size: 10px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .mood-custom-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      background: #fff;
      border: 1px solid #E0E0E5;
      color: #484848;
      font-size: 10.5px;
      font-weight: 600;
      border-radius: 5px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .mood-custom-btn:hover {
      background: #452E5A;
      color: #fff;
      border-color: #452E5A;
    }
    .mood-buttons {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 5px;
    }
    .mood-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 7px 4px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .mood-btn:hover {
      background: rgba(69,46,90,0.04);
      border-color: #452E5A;
      transform: translateY(-1px);
      box-shadow: 0 2px 6px rgba(69,46,90,0.08);
    }
    .mood-btn.just-logged {
      background: rgba(76,175,80,0.1);
      border-color: #4CAF50;
      animation: moodPulse 0.5s ease;
    }
    .mood-emoji {
      font-size: 18px;
      line-height: 1;
    }
    .mood-name {
      font-size: 9px;
      font-weight: 600;
      color: #484848;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    @keyframes moodPulse {
      0% { transform: scale(1); }
      40% { transform: scale(1.15); }
      100% { transform: scale(1); }
    }
    .mood-history {
      margin-top: 9px;
      padding-top: 9px;
      border-top: 1px dashed #E0E0E5;
    }
    .mood-history-label {
      font-size: 9px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      margin-bottom: 5px;
    }
    .mood-history-list {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }
    .mood-history-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 7px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 4px;
      font-size: 10.5px;
      font-weight: 500;
      color: #484848;
    }
    .mood-history-chip .mhc-time {
      color: #8B8B8B;
      font-size: 9.5px;
      font-weight: 500;
    }
    .mood-history-chip .mhc-remove {
      width: 13px;
      height: 13px;
      border: none;
      background: transparent;
      cursor: pointer;
      color: #8B8B8B;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 3px;
      margin-left: 1px;
    }
    .mood-history-chip .mhc-remove:hover {
      background: #F56565;
      color: #fff;
    }

    /* ===== SCHEDULE FOLLOW-UP SECTION ===== */
    .call-followup {
      width: 100%;
      margin-top: 14px;
    }
    .call-followup-collapsed {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      background: #FAFAFB;
      border: 1px dashed #E0E0E5;
      border-radius: 10px;
    }
    .followup-label {
      font-size: 10px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .followup-toggle {
      background: transparent;
      border: none;
      color: #452E5A;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      padding: 2px 6px;
      border-radius: 5px;
      transition: background 0.15s;
    }
    .followup-toggle:hover { background: rgba(69,46,90,0.08); }
    .followup-toggle.subtle { color: #8B8B8B; }
    .followup-toggle.subtle:hover { color: #1C1C1C; background: #F0F0F0; }
    .call-followup-expanded {
      padding: 14px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .followup-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .followup-type-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }
    .followup-type {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      background: #FAFAFB;
      border: 1px solid #EAEAEC;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 600;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .followup-type:hover { background: #F0F0F2; border-color: #D8D8DC; }
    .followup-type.active {
      background: #452E5A;
      border-color: #452E5A;
      color: #fff;
    }
    .followup-type svg { flex-shrink: 0; }
    .followup-input, .followup-datetime {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid #E8E8E8;
      border-radius: 8px;
      font-size: 12.5px;
      font-family: 'DM Sans', sans-serif;
      box-sizing: border-box;
      outline: none;
      margin-bottom: 10px;
      background: #fff;
      color: #1C1C1C;
    }
    .followup-input:focus, .followup-datetime:focus {
      border-color: #452E5A;
      box-shadow: 0 0 0 3px rgba(69,46,90,0.08);
    }
    .followup-chips {
      display: flex;
      gap: 6px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }
    .followup-chip {
      padding: 5px 11px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 500;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.12s;
    }
    .followup-chip:hover {
      background: rgba(69,46,90,0.06);
      border-color: #452E5A;
      color: #452E5A;
    }
    .followup-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .followup-remind {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 12px;
      color: #484848;
      cursor: pointer;
    }
    .followup-remind input[type="checkbox"] {
      accent-color: #452E5A;
      cursor: pointer;
      width: 14px;
      height: 14px;
    }
    .followup-done {
      padding: 7px 18px;
      background: linear-gradient(135deg, #452E5A, #36234A);
      color: #fff;
      border: none;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 2px 6px rgba(69,46,90,0.25);
      transition: all 0.15s;
    }
    .followup-done:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(69,46,90,0.3); }
    .followup-footer {
      margin-top: 10px;
      font-size: 10.5px;
      color: #8B8B8B;
      text-align: center;
      font-style: italic;
    }
    .followup-saved {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 10px;
      padding: 6px 12px;
      background: rgba(76,175,80,0.1);
      color: #2F855A;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 600;
    }

    /* ===== PARTICIPANTS SECTION ===== */
    .call-participants {
      width: 100%;
      margin-top: 12px;
      padding: 10px 14px;
      background: #FAFAFB;
      border: 1px solid #EFEFF2;
      border-radius: 10px;
      box-sizing: border-box;
    }
    .participants-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    .participants-label {
      font-size: 10px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .participants-add-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(69,46,90,0.08);
      border: 1px solid rgba(69,46,90,0.15);
      color: #452E5A;
      font-size: 11px;
      font-weight: 600;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .participants-add-btn:hover {
      background: #452E5A;
      color: #fff;
      border-color: #452E5A;
    }
    .participants-list {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .participant-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 8px 4px 4px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 500;
      color: #1C1C1C;
      max-width: 100%;
    }
    .participant-chip .pchip-avatar {
      width: 22px;
      height: 22px;
      border-radius: 5px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .participant-chip .pchip-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100px;
    }
    .participant-chip .pchip-role {
      color: #8B8B8B;
      font-size: 9.5px;
      font-weight: 500;
    }
    .participant-chip .pchip-remove {
      width: 16px;
      height: 16px;
      border: none;
      background: transparent;
      cursor: pointer;
      color: #8B8B8B;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      margin-left: 2px;
      transition: all 0.15s;
    }
    .participant-chip .pchip-remove:hover {
      background: #F56565;
      color: #fff;
    }
    .participant-chip.host { border-color: rgba(69,46,90,0.25); background: rgba(69,46,90,0.04); }
    .participant-chip.host .pchip-name::after {
      content: ' · You';
      color: #452E5A;
      font-weight: 600;
    }
    .participant-chip.recipient { border-color: rgba(38,166,154,0.25); background: rgba(38,166,154,0.05); }
    .participant-chip.recipient .pchip-tag {
      font-size: 8.5px;
      font-weight: 700;
      color: #26A69A;
      background: rgba(38,166,154,0.12);
      padding: 1px 5px;
      border-radius: 4px;
      margin-left: 2px;
      letter-spacing: 0.3px;
    }

    /* ===== TRANSFER CALL SECTION (matches boxy participants style) ===== */
    .call-transfer {
      width: 100%;
      margin-top: 10px;
      padding: 10px 14px;
      background: #FAFAFB;
      border: 1px solid #EFEFF2;
      border-radius: 10px;
      box-sizing: border-box;
    }
    .call-transfer-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .transfer-label {
      font-size: 10px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .transfer-toggle-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      background: rgba(69,46,90,0.08);
      border: 1px solid rgba(69,46,90,0.15);
      color: #452E5A;
      font-size: 11px;
      font-weight: 600;
      border-radius: 6px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .transfer-toggle-btn:hover {
      background: #452E5A;
      color: #fff;
      border-color: #452E5A;
    }
    .call-transfer-active {
      display: none;
      align-items: center;
      gap: 7px;
      margin-top: 8px;
      padding: 7px 11px;
      background: rgba(66,153,225,0.1);
      border: 1px solid rgba(66,153,225,0.2);
      border-radius: 8px;
      color: #2B6CB0;
      font-size: 11.5px;
      font-weight: 600;
    }
    .call-transfer-active.show { display: flex; }

    /* Transfer choice mode buttons inside picker */
    .pp-mode-tabs {
      display: flex;
      gap: 6px;
      padding: 10px 22px 0;
    }
    .pp-mode-tab {
      flex: 1;
      padding: 9px 12px;
      background: #FAFAFB;
      border: 1px solid #E8E8E8;
      border-radius: 8px;
      font-size: 11.5px;
      font-weight: 600;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
      text-align: left;
      line-height: 1.4;
    }
    .pp-mode-tab .pp-mode-title {
      display: block;
      font-size: 12px;
      color: #1C1C1C;
      margin-bottom: 2px;
    }
    .pp-mode-tab .pp-mode-desc {
      display: block;
      font-size: 10.5px;
      color: #8B8B8B;
      font-weight: 500;
    }
    .pp-mode-tab:hover { background: #F2F2F5; border-color: #D8D8DC; }
    .pp-mode-tab.active {
      background: rgba(69,46,90,0.06);
      border-color: #452E5A;
    }
    .pp-mode-tab.active .pp-mode-title { color: #452E5A; }
    .pp-mode-tab.active .pp-mode-desc { color: #6B4582; }

    /* ===== POST-CALL REVIEW MODAL ===== */
    .pcr-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(20,15,30,0.55);
      backdrop-filter: blur(4px);
      z-index: 6700;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.18s ease;
    }
    .pcr-overlay.show { display: flex; }
    .pcr-modal {
      background: #fff;
      border-radius: 8px;
      width: 440px;
      max-width: 100%;
      box-shadow: 0 24px 60px rgba(20,15,30,0.25);
      font-family: 'DM Sans', sans-serif;
      animation: tsPickerIn 0.22s cubic-bezier(0.16,1,0.3,1);
      overflow: hidden;
    }
    .pcr-head {
      padding: 22px 24px 16px;
      border-bottom: 1px solid #F2F2F4;
      position: relative;
    }
    .pcr-skip-x {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 28px;
      height: 28px;
      border: none;
      background: #F5F5F7;
      color: #484848;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .pcr-skip-x:hover { background: #1C1C1C; color: #fff; transform: rotate(90deg); }
    .pcr-contact {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }
    .pcr-avatar {
      width: 42px;
      height: 42px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .pcr-contact-info { flex: 1; min-width: 0; }
    .pcr-contact-name {
      font-size: 14px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .pcr-contact-meta {
      font-size: 11.5px;
      color: #8B8B8B;
      margin-top: 2px;
    }
    .pcr-title {
      font-size: 17px;
      font-weight: 700;
      color: #1C1C1C;
      margin: 0;
      letter-spacing: -0.2px;
    }
    .pcr-sub {
      font-size: 12.5px;
      color: #6B6B6B;
      margin-top: 4px;
      line-height: 1.45;
    }
    .pcr-optional-tag {
      display: inline-block;
      padding: 2px 8px;
      background: rgba(76,175,80,0.1);
      color: #2F855A;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      margin-left: 6px;
      vertical-align: middle;
    }
    .pcr-body { padding: 20px 24px; }
    .pcr-section { margin-bottom: 16px; }
    .pcr-section:last-child { margin-bottom: 0; }
    .pcr-section-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      color: #484848;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-bottom: 9px;
    }
    .pcr-stars {
      display: flex;
      gap: 6px;
      justify-content: center;
      padding: 8px 0;
    }
    .pcr-star {
      width: 42px;
      height: 42px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      color: #D0D0D5;
      transition: all 0.12s;
      font-family: serif;
    }
    .pcr-star:hover {
      background: #FFFCEC;
      border-color: #FFA726;
      transform: translateY(-1px);
    }
    .pcr-star.filled {
      background: #FFFCEC;
      border-color: #FFA726;
      color: #FFA726;
    }
    .pcr-rating-label {
      text-align: center;
      font-size: 12px;
      color: #6B6B6B;
      margin-top: 8px;
      font-weight: 500;
      min-height: 16px;
    }
    .pcr-rating-label.rated { color: #1C1C1C; font-weight: 600; }
    .pcr-quick-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }
    .pcr-quick-tag {
      padding: 5px 10px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 500;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .pcr-quick-tag:hover {
      background: rgba(69,46,90,0.04);
      border-color: #452E5A;
      color: #452E5A;
    }
    .pcr-quick-tag.selected {
      background: rgba(69,46,90,0.08);
      border-color: #452E5A;
      color: #452E5A;
      font-weight: 600;
    }
    .pcr-comment {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #E0E0E5;
      border-radius: 6px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      outline: none;
      box-sizing: border-box;
      resize: vertical;
      min-height: 76px;
      background: #fff;
      color: #1C1C1C;
      transition: all 0.15s;
    }
    .pcr-comment:focus {
      border-color: #452E5A;
      box-shadow: 0 0 0 3px rgba(69,46,90,0.08);
    }
    .pcr-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 24px;
      border-top: 1px solid #F2F2F4;
      background: #FAFAFB;
    }
    .pcr-skip-link {
      background: transparent;
      border: none;
      color: #8B8B8B;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      padding: 8px 4px;
      border-radius: 5px;
      transition: color 0.15s;
    }
    .pcr-skip-link:hover { color: #1C1C1C; }
    .pcr-foot-actions { display: flex; gap: 8px; }
    .pcr-btn-primary {
      padding: 9px 18px;
      background: linear-gradient(135deg, #452E5A, #36234A);
      color: #fff;
      border: none;
      border-radius: 6px;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 2px 6px rgba(69,46,90,0.2);
      transition: all 0.15s;
    }
    .pcr-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(69,46,90,0.3); }
    .pcr-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

    /* ===== PARTICIPANT PICKER MODAL ===== */
    .pp-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(20,15,30,0.55);
      backdrop-filter: blur(4px);
      z-index: 6500;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.18s ease;
    }
    .pp-overlay.show { display: flex; }
    .pp-modal {
      background: #fff;
      border-radius: 14px;
      width: 460px;
      max-width: 100%;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 60px rgba(20,15,30,0.25);
      font-family: 'DM Sans', sans-serif;
      animation: tsPickerIn 0.22s cubic-bezier(0.16,1,0.3,1);
      overflow: hidden;
    }
    .pp-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 20px 22px 16px;
      border-bottom: 1px solid #F2F2F4;
      gap: 12px;
    }
    .pp-head-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: linear-gradient(135deg, #452E5A, #36234A);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 4px 10px rgba(69,46,90,0.25);
    }
    .pp-title {
      font-size: 16px;
      font-weight: 700;
      color: #1C1C1C;
      margin: 0;
    }
    .pp-sub {
      font-size: 12px;
      color: #6B6B6B;
      margin-top: 3px;
      line-height: 1.4;
    }
    .pp-close {
      width: 30px;
      height: 30px;
      border: none;
      background: #F5F5F7;
      color: #484848;
      border-radius: 7px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
      flex-shrink: 0;
    }
    .pp-close:hover { background: #1C1C1C; color: #fff; transform: rotate(90deg); }
    .pp-search-row {
      padding: 12px 22px;
      border-bottom: 1px solid #F2F2F4;
    }
    .pp-search {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: #FAFAFB;
      border: 1px solid #E8E8E8;
      border-radius: 8px;
      transition: all 0.15s;
    }
    .pp-search:focus-within {
      border-color: #452E5A;
      box-shadow: 0 0 0 3px rgba(69,46,90,0.08);
      background: #fff;
    }
    .pp-search input {
      flex: 1;
      border: none;
      background: transparent;
      outline: none;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      color: #1C1C1C;
    }
    .pp-list {
      flex: 1;
      overflow-y: auto;
      padding: 8px 12px 12px;
    }
    .pp-section-label {
      font-size: 10px;
      font-weight: 600;
      color: #8B8B8B;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 10px 10px 6px;
    }
    .pp-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.12s;
    }
    .pp-row:hover { background: #FAFAFB; }
    .pp-row.selected {
      background: rgba(69,46,90,0.06);
    }
    .pp-row.disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .pp-avatar {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .pp-info { flex: 1; min-width: 0; }
    .pp-name {
      font-size: 13px;
      font-weight: 600;
      color: #1C1C1C;
      line-height: 1.2;
    }
    .pp-role {
      font-size: 11px;
      color: #8B8B8B;
      margin-top: 2px;
    }
    .pp-check {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1.5px solid #D0D0D5;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .pp-row.selected .pp-check {
      background: #452E5A;
      border-color: #452E5A;
      color: #fff;
    }
    .pp-row.disabled .pp-check {
      background: #4CAF50;
      border-color: #4CAF50;
      color: #fff;
    }
    .pp-row.disabled .pp-tag {
      font-size: 10px;
      color: #4CAF50;
      font-weight: 600;
      margin-left: 6px;
    }
    .pp-empty {
      padding: 30px 20px;
      text-align: center;
      color: #8B8B8B;
      font-size: 12.5px;
    }
    .pp-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 22px;
      border-top: 1px solid #F2F2F4;
      background: #FAFAFB;
      gap: 10px;
    }
    .pp-foot-info {
      font-size: 11.5px;
      color: #6B6B6B;
    }
    .pp-foot-actions { display: flex; gap: 8px; }
    .pp-btn-ghost {
      padding: 8px 14px;
      background: #fff;
      color: #484848;
      border: 1px solid #E0E0E5;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.12s;
    }
    .pp-btn-ghost:hover { background: #F5F5F7; }
    .pp-btn-primary {
      padding: 8px 16px;
      background: linear-gradient(135deg, #452E5A, #36234A);
      color: #fff;
      border: none;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 2px 6px rgba(69,46,90,0.25);
      transition: all 0.15s;
    }
    .pp-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(69,46,90,0.3); }
    .pp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

    /* ═══════════════════════════════════════════════════════
       MODERN COMMUNICATION CENTER MODAL
       ═══════════════════════════════════════════════════════ */

    /* Wrapper */
    .sms-modal-enhanced {
      background: #fff;
      border-radius: 14px;
      width: 1080px;
      max-width: 97vw;
      max-height: 96vh;
      height: 88vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    }

    /* ── Header ── */
    .sms-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 0;
      background: #fff;
      flex-shrink: 0;
    }
    .sms-modal-header-left { display: flex; align-items: center; gap: 10px; }
    .sms-hub-icon {
      width: 34px; height: 34px; border-radius: 8px;
      background: linear-gradient(135deg,#452E5A,#6B4D8A);
      display: flex; align-items: center; justify-content: center;
    }
    .sms-hub-icon svg { width:16px;height:16px;color:#fff; }
    .sms-modal-header h2 { margin:0; font-size:16px; font-weight:700; color:#1C1C1C; }
    .sms-modal-header-right { display:flex; align-items:center; gap:6px; }
    .sms-draft-badge {
      display: none; font-size:11px; color:#8B8B8B; font-weight:500;
      background:#F5F5F7; padding:3px 8px; border-radius:20px; gap:4px;
      align-items: center;
    }
    .sms-draft-badge.show { display:flex; }
    .sms-close {
      width:30px;height:30px;border:none;background:transparent;cursor:pointer;
      border-radius:6px;display:flex;align-items:center;justify-content:center;
      color:#8B8B8B; transition:all .15s;
    }
    .sms-close:hover { background:#F5F5F7; color:#1C1C1C; }
    .sms-close svg { width:14px;height:14px; }

    /* ── Channel Tabs (SMS / Email / Internal) ── */
    .sms-channel-tabs {
      display: flex;
      gap: 4px;
      padding: 14px 20px 0;
      flex-shrink: 0;
    }
    .sms-channel-tab {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 14px; border-radius: 8px;
      border: 1.5px solid transparent;
      font-size: 13px; font-weight: 600; cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      color: #8B8B8B; background: #F5F5F7;
      transition: all .15s;
    }
    .sms-channel-tab svg { width:14px;height:14px; }
    .sms-channel-tab:hover { color:#452E5A; background:#EFE8F6; }
    .sms-channel-tab.active {
      color:#452E5A; background:#EFE8F6;
      border-color: #452E5A;
    }

    /* ── Body layout (compose + sidebar) ── */
    .sms-body {
      display: flex;
      flex: 1;
      overflow: hidden;
      border-top: 1px solid #F0F0F2;
      margin-top: 14px;
    }

    /* ── Compose panel ── */
    .sms-compose {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      padding: 16px 20px;
      gap: 12px;
      min-width: 0;
    }

    /* Mode toggle: Single / Bulk */
    .sms-mode-toggle {
      display: flex;
      background: #F5F5F7;
      border-radius: 8px;
      padding: 3px;
      width: fit-content;
      gap: 2px;
    }
    .sms-mode-btn {
      padding: 6px 16px; border-radius: 6px;
      border: none; font-size: 12px; font-weight: 600;
      cursor: pointer; font-family: 'DM Sans', sans-serif;
      color: #8B8B8B; background: transparent;
      transition: all .15s;
    }
    .sms-mode-btn.active { background:#fff; color:#452E5A; box-shadow:0 1px 3px rgba(0,0,0,0.1); }

    /* Recipient card */
    .sms-recipient-single {
      display: flex; align-items: center; gap: 12px;
      padding: 10px 14px; background: #FAFAFA;
      border: 1px solid #EBEBEB; border-radius: 10px;
    }
    .recipient-avatar {
      width: 40px; height: 40px; border-radius: 10px;
      background: linear-gradient(135deg, #D4A574, #C49B6A);
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; font-weight: 700; color: #fff;
      flex-shrink:0;
    }
    .recipient-info { display:flex; flex-direction:column; gap:2px; flex:1; }
    .recipient-name { font-size:14px; font-weight:600; color:#1C1C1C; }
    .recipient-phone { font-size:12px; color:#8B8B8B; }
    .recipient-badges { display:flex; gap:4px; margin-top:3px; }
    .recipient-badge {
      font-size:10px; font-weight:600; padding:2px 7px; border-radius:10px;
      background:#EFE8F6; color:#452E5A;
    }
    .recipient-badge.green { background:#E6F7EE; color:#2F7A4D; }

    /* Bulk recipients */
    .bulk-recipients-section { display:flex; flex-direction:column; gap:8px; }
    .bulk-header { display:flex; justify-content:space-between; align-items:center; }
    .bulk-header label { font-size:12px; font-weight:700; color:#484848; text-transform:uppercase; letter-spacing:.4px; }
    .bulk-actions { display:flex; gap:6px; }
    .select-all-btn, .clear-all-btn {
      padding:4px 10px; border:1px solid #DDDDE0; background:#fff;
      border-radius:5px; font-size:11px; font-weight:600; color:#484848;
      cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .12s;
    }
    .select-all-btn:hover { background:#EFE8F6; border-color:#452E5A; color:#452E5A; }
    .clear-all-btn:hover { background:#FEF2F2; border-color:#F56565; color:#C53030; }
    .bulk-search { position:relative; display:flex; align-items:center; }
    .bulk-search svg { position:absolute; left:10px; width:14px; height:14px; color:#8B8B8B; }
    .bulk-search input {
      width:100%; padding:8px 10px 8px 32px;
      border:1px solid #DDDDE0; border-radius:7px;
      font-size:13px; font-family:'DM Sans',sans-serif;
      background:#FAFAFA;
    }
    .bulk-search input:focus { outline:none; border-color:#452E5A; background:#fff; }
    .bulk-recipients-list { max-height:220px; overflow-y:auto; border:1px solid #EBEBEB; border-radius:8px; background:#fff; }
    .bulk-recipient-item {
      display:flex; align-items:center; gap:10px;
      padding:9px 12px; cursor:pointer;
      border-bottom:1px solid rgba(0,0,0,0.04);
      transition:background .1s;
    }
    .bulk-recipient-item:last-child { border-bottom:none; }
    .bulk-recipient-item:hover { background:#F8F5FC; }
    .bulk-recipient-item.selected { background:rgba(69,46,90,0.06); }
    .bulk-recipient-item input[type="checkbox"] { width:15px;height:15px;accent-color:#452E5A;flex-shrink:0; }
    .bulk-recipient-avatar {
      width:30px; height:30px; border-radius:7px;
      background:linear-gradient(135deg,#D4A574,#C49B6A);
      display:flex;align-items:center;justify-content:center;
      font-size:10px;font-weight:700;color:#fff;flex-shrink:0;
    }
    .bulk-recipient-info { flex:1;display:flex;flex-direction:column;gap:1px; }
    .bulk-recipient-name { font-size:13px;font-weight:500;color:#1C1C1C; }
    .bulk-recipient-phone { font-size:11px;color:#8B8B8B; }
    .selected-count { font-size:12px; color:#452E5A; font-weight:600; }

    /* Email fields */
    .email-fields { display:flex; flex-direction:column; gap:8px; }
    .email-field-row {
      display:flex; align-items:center; gap:8px;
      padding:8px 12px;
      border:1px solid #EBEBEB; border-radius:8px;
      background:#FAFAFA;
    }
    .email-field-row label { font-size:12px; font-weight:700; color:#8B8B8B; min-width:32px; }
    .email-field-row input {
      flex:1; border:none; background:transparent;
      font-size:13px; font-family:'DM Sans',sans-serif; outline:none; color:#1C1C1C;
    }

    /* Rich Text Toolbar */
    .rte-toolbar {
      display:flex; align-items:center; gap:2px;
      padding:6px 10px;
      background:#F8F8FA; border:1px solid #EBEBEB;
      border-radius:8px 8px 0 0; flex-wrap:wrap;
    }
    .rte-btn {
      width:28px;height:28px;border:none;background:transparent;cursor:pointer;
      border-radius:5px;display:flex;align-items:center;justify-content:center;
      color:#484848;font-size:12px;font-weight:700;transition:all .12s;
      font-family:'DM Sans',sans-serif;
    }
    .rte-btn:hover { background:#EFE8F6; color:#452E5A; }
    .rte-btn.active { background:#452E5A; color:#fff; }
    .rte-sep { width:1px;height:18px;background:#DDDDE0;margin:0 4px;flex-shrink:0; }
    .rte-select {
      height:26px;padding:0 6px;border:1px solid #DDDDE0;border-radius:5px;
      font-size:11px;font-family:'DM Sans',sans-serif;background:#fff;
      color:#484848;cursor:pointer;outline:none;
    }

    /* Message editor area */
    .sms-message-area { display:flex; flex-direction:column; gap:0; }
    .sms-message-area label { font-size:12px; font-weight:700; color:#484848; margin-bottom:5px; }
    .sms-message-area textarea {
      width:100%; padding:12px;
      border:1px solid #EBEBEB; border-radius:8px;
      font-size:14px; font-family:'DM Sans',sans-serif;
      resize:none; min-height:220px; background:#FAFAFA;
      transition:border-color .15s;
    }
    .sms-message-area textarea:focus { outline:none; border-color:#452E5A; background:#fff; }
    .rte-editor {
      min-height:220px; padding:12px;
      border:1px solid #EBEBEB; border-radius:0 0 8px 8px;
      border-top:none; font-size:14px; font-family:'DM Sans',sans-serif;
      outline:none; background:#FAFAFA; overflow-y:auto;
      transition:border-color .15s; line-height:1.6;
    }
    .rte-editor:focus { border-color:#452E5A; background:#fff; }
    .rte-editor:empty:before { content:attr(data-placeholder); color:#ABABAB; }

    /* Message footer bar */
    .msg-footer-bar {
      display:flex; align-items:center; justify-content:space-between;
      padding:6px 2px; margin-top:2px;
    }
    .msg-footer-left { display:flex; gap:6px; align-items:center; }
    .msg-attach-btn {
      display:flex;align-items:center;gap:4px;
      padding:5px 10px;border:1px solid #DDDDE0;background:#fff;
      border-radius:6px;font-size:11px;font-weight:600;color:#484848;
      cursor:pointer;font-family:'DM Sans',sans-serif;transition:all .12s;
    }
    .msg-attach-btn svg { width:12px;height:12px; }
    .msg-attach-btn:hover { background:#EFE8F6;border-color:#452E5A;color:#452E5A; }
    .emoji-btn {
      width:28px;height:28px;border:1px solid #DDDDE0;background:#fff;
      border-radius:6px;display:flex;align-items:center;justify-content:center;
      cursor:pointer;font-size:14px;transition:all .12s;
    }
    .emoji-btn:hover { background:#EFE8F6;border-color:#452E5A; }
    .char-count { font-size:11px;color:#ABABAB; }
    .char-count.warn { color:#ED8936; }
    .char-count.over { color:#E53E3E;font-weight:700; }

    /* Schedule section */
    .schedule-section {
      border:1px solid #EBEBEB; border-radius:10px;
      background:#FAFAFA; overflow:hidden;
    }
    .schedule-toggle-row {
      display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;
    }
    .schedule-toggle-row:hover { background:#F5F0FA; }
    /* Custom toggle switch */
    .cms-switch { position:relative;width:34px;height:18px;flex-shrink:0; }
    .cms-switch input { opacity:0;width:0;height:0; }
    .cms-slider {
      position:absolute;inset:0;background:#D0D0D8;border-radius:9px;
      transition:background .2s;cursor:pointer;
    }
    .cms-slider:before {
      content:'';position:absolute;width:12px;height:12px;
      background:#fff;border-radius:50%;left:3px;top:3px;
      transition:transform .2s;
    }
    .cms-switch input:checked + .cms-slider { background:#452E5A; }
    .cms-switch input:checked + .cms-slider:before { transform:translateX(16px); }
    .schedule-toggle-label { font-size:13px;font-weight:600;color:#1C1C1C; }
    .schedule-toggle-sub { font-size:11px;color:#8B8B8B;margin-left:auto; }
    .schedule-expanded {
      padding:12px 14px;border-top:1px solid #EBEBEB;
      display:none;flex-direction:column;gap:10px;
    }
    .schedule-expanded.open { display:flex; }
    .schedule-row { display:flex;gap:10px; }
    .schedule-field { flex:1;display:flex;flex-direction:column;gap:5px; }
    .schedule-field label { font-size:11px;font-weight:700;color:#8B8B8B;text-transform:uppercase;letter-spacing:.4px; }
    .schedule-field input, .schedule-field select {
      padding:8px 10px;border:1px solid #DDDDE0;border-radius:7px;
      font-size:13px;font-family:'DM Sans',sans-serif;background:#fff;
      transition:border-color .15s;
    }
    .schedule-field input:focus, .schedule-field select:focus { outline:none;border-color:#452E5A; }
    .smart-send-tip {
      display:flex;align-items:center;gap:6px;
      padding:8px 10px;background:#EFE8F6;border-radius:7px;
      font-size:11px;color:#452E5A;font-weight:500;
    }
    .smart-send-tip svg { width:13px;height:13px;flex-shrink:0; }

    /* Footer actions */
    .sms-actions {
      display:flex;justify-content:space-between;align-items:center;
      padding:12px 20px; border-top:1px solid #F0F0F2; background:#fff;
      flex-shrink:0;
    }
    .sms-actions-left { display:flex;gap:6px;align-items:center; }
    .sms-actions-right { display:flex;gap:8px;align-items:center; }
    .sms-cancel-btn {
      padding:8px 16px; border:1px solid #DDDDE0; background:#fff;
      border-radius:7px; font-size:13px; font-weight:600; color:#484848;
      cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .12s;
    }
    .sms-cancel-btn:hover { background:#F5F5F7; }
    .sms-draft-btn {
      padding:8px 14px; border:1px solid #DDDDE0; background:#fff;
      border-radius:7px; font-size:13px; font-weight:600; color:#484848;
      cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .12s;
      display:flex;align-items:center;gap:5px;
    }
    .sms-draft-btn svg { width:13px;height:13px; }
    .sms-draft-btn:hover { background:#F5F5F7; }
    .sms-send-btn {
      display:flex; align-items:center; gap:8px;
      padding:9px 20px; border:none; background:#452E5A;
      border-radius:7px; font-size:13px; font-weight:700;
      color:#fff; cursor:pointer; font-family:'DM Sans',sans-serif;
      box-shadow:0 2px 8px rgba(69,46,90,0.3); transition:all .15s;
    }
    .sms-send-btn:hover { background:#5B3D76; transform:translateY(-1px); box-shadow:0 4px 12px rgba(69,46,90,0.35); }
    .sms-send-btn svg { width:14px;height:14px; }
    .sms-schedule-send-btn {
      display:flex; align-items:center; gap:8px;
      padding:9px 16px; border:none; background:linear-gradient(135deg,#452E5A,#6B4D8A);
      border-radius:7px; font-size:13px; font-weight:700;
      color:#fff; cursor:pointer; font-family:'DM Sans',sans-serif;
      box-shadow:0 2px 8px rgba(69,46,90,0.3); transition:all .15s;
    }
    .sms-schedule-send-btn:hover { transform:translateY(-1px); }
    .sms-schedule-send-btn svg { width:14px;height:14px; }

    /* ── Right Sidebar ── */
    .sms-sidebar {
      width: 290px;
      flex-shrink: 0;
      border-left: 1px solid #F0F0F2;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #FAFAFA;
    }
    .sms-sidebar-tabs {
      display: flex;
      border-bottom: 1px solid #EBEBEB;
      background: #fff;
      flex-shrink: 0;
    }
    .sms-sidebar-tab {
      flex: 1; padding: 10px 6px;
      border: none; background: transparent; cursor: pointer;
      font-size: 11px; font-weight: 700; color: #8B8B8B;
      font-family: 'DM Sans', sans-serif;
      transition: all .15s; position: relative;
    }
    .sms-sidebar-tab.active { color: #452E5A; }
    .sms-sidebar-tab.active::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0;
      height: 2px; background: #452E5A;
    }
    .sms-sidebar-panel { flex:1; overflow-y:auto; display:none; padding:10px; }
    .sms-sidebar-panel.active { display:block; }

    /* Templates */
    .tmpl-section-title {
      font-size:10px;font-weight:700;color:#ABABAB;text-transform:uppercase;
      letter-spacing:.5px;margin:10px 0 6px;
    }
    .tmpl-item {
      padding:8px 10px;background:#fff;border:1px solid #EBEBEB;
      border-radius:7px;margin-bottom:5px;cursor:pointer;transition:all .15s;
    }
    .tmpl-item:hover { background:#EFE8F6;border-color:#452E5A; }
    .tmpl-item-title { font-size:12px;font-weight:600;color:#1C1C1C;margin-bottom:2px; }
    .tmpl-item-preview { font-size:11px;color:#8B8B8B;line-height:1.4;
      white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
    .tmpl-fav-btn {
      display:flex;align-items:center;gap:5px;color:#452E5A;
      font-size:10px;font-weight:600;margin-top:4px;
    }
    .tmpl-search {
      position:relative;margin-bottom:8px;
    }
    .tmpl-search svg { position:absolute;left:8px;top:50%;transform:translateY(-50%);width:13px;height:13px;color:#ABABAB; }
    .tmpl-search input {
      width:100%;padding:7px 8px 7px 26px;border:1px solid #EBEBEB;border-radius:7px;
      font-size:12px;font-family:'DM Sans',sans-serif;background:#fff;outline:none;
    }
    .tmpl-search input:focus { border-color:#452E5A; }
    .sig-item {
      padding:8px 10px;background:#fff;border:1px solid #EBEBEB;
      border-radius:7px;margin-bottom:5px;cursor:pointer;transition:all .15s;
    }
    .sig-item:hover { background:#EFE8F6;border-color:#452E5A; }
    .sig-name { font-size:11px;font-weight:700;color:#452E5A;margin-bottom:2px; }
    .sig-preview { font-size:10px;color:#8B8B8B;line-height:1.4; }

    /* History panel */
    .hist-entry {
      display:flex;gap:8px;margin-bottom:10px;position:relative;
      padding-bottom:10px;border-bottom:1px solid #F0F0F2;
    }
    .hist-entry:last-child { border-bottom:none; }
    .hist-icon {
      width:26px;height:26px;border-radius:7px;flex-shrink:0;
      display:flex;align-items:center;justify-content:center;
    }
    .hist-icon.sms-icon { background:#EFE8F6; color:#452E5A; }
    .hist-icon.email-icon { background:#E6F7EE; color:#2F7A4D; }
    .hist-icon.call-icon { background:#FFF3E6; color:#C07828; }
    .hist-icon svg { width:12px;height:12px; }
    .hist-body { flex:1;min-width:0; }
    .hist-meta { display:flex;justify-content:space-between;align-items:center;margin-bottom:3px; }
    .hist-type { font-size:11px;font-weight:700;color:#1C1C1C; }
    .hist-time { font-size:10px;color:#ABABAB; }
    .hist-msg { font-size:11px;color:#484848;line-height:1.4;
      white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
    .hist-status {
      display:inline-flex;align-items:center;gap:3px;
      font-size:10px;font-weight:600;padding:2px 6px;border-radius:10px;margin-top:3px;
    }
    .hist-status.delivered { background:#E6F7EE;color:#2F7A4D; }
    .hist-status.read { background:#EFE8F6;color:#452E5A; }
    .hist-status.sent { background:#EFF6FF;color:#2563EB; }

    /* Tracking panel */
    .track-stat {
      background:#fff;border:1px solid #EBEBEB;border-radius:8px;
      padding:10px;margin-bottom:8px;
    }
    .track-stat-label { font-size:10px;font-weight:700;color:#ABABAB;text-transform:uppercase;letter-spacing:.4px;margin-bottom:6px; }
    .track-stat-row { display:flex;justify-content:space-between;align-items:center;margin-bottom:5px; }
    .track-stat-name { font-size:12px;color:#484848; }
    .track-stat-val { font-size:13px;font-weight:700;color:#1C1C1C; }
    .track-bar-wrap { height:4px;background:#EBEBEB;border-radius:2px;margin-top:2px; }
    .track-bar { height:4px;background:#452E5A;border-radius:2px;transition:width .4s; }

    /* GLOBAL MOBILE RESPONSIVE */

    /* SUBSCRIPTION STYLES */
    .sub-company { display: flex; align-items: center; gap: 12px; }
    .sub-icon {
      width: 36px; height: 36px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
    }
    .sub-icon svg { width: 18px; height: 18px; }
    .sub-icon.adobe { background: rgba(255,0,0,0.1); color: #FF0000; }
    .sub-icon.canva { background: rgba(0,196,204,0.1); color: #00C4CC; }
    .sub-icon.timedoctor { background: rgba(52,152,219,0.1); color: #3498DB; }
    .sub-icon.natural { background: rgba(155,89,182,0.1); color: #9B59B6; }
    .sub-icon.salesmate { background: rgba(46,204,113,0.1); color: #2ECC71; }
    .sub-icon.ringcentral { background: rgba(255,121,63,0.1); color: #FF793F; }
    .sub-icon.wix { background: rgba(0,0,0,0.08); color: #000; }
    .sub-icon.quickbooks { background: rgba(44,160,28,0.1); color: #2CA01C; }
    .sub-icon.chatgpt { background: rgba(16,163,127,0.1); color: #10A37F; }
    .sub-icon.figma { background: rgba(162,89,255,0.1); color: #A259FF; }
    .sub-name { font-weight: 500; color: #1C1C1C; }
    .sub-cost { font-weight: 600; color: #1C1C1C; }
    .freq-badge {
      display: inline-block; padding: 4px 10px; border-radius: 6px;
      font-size: 12px; font-weight: 500;
    }
    .freq-badge.monthly { background: rgba(66,153,225,0.1); color: #2B6CB0; }
    .freq-badge.yearly { background: rgba(72,187,120,0.1); color: #2F855A; }
    .payment-method { color: #666; font-size: 13px; }
    .card-digits { font-family: 'SF Mono', monospace; color: #666; font-size: 13px; }
    .renewal-date { color: #1C1C1C; }
    .renewal-date.highlight { color: #ED8936; font-weight: 600; }
    .renewal-date.critical { color: #E53E3E; font-weight: 600; }

    /* RESPONSIVE */
    @media (max-width: 1024px) {
      .dashboard-stats { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 768px) {
      #equipmentSection .header { padding: 16px; flex-wrap: wrap; gap: 12px; }
      #equipmentSection .page-title { font-size: 20px; }
      #equipmentSection .search-box { width: 100%; order: 3; max-width: none; }
      #equipmentSection .tabs { width: 100%; overflow-x: auto; order: 2; padding-bottom: 8px; }
      #equipmentSection .tab { white-space: nowrap; padding: 8px 14px; font-size: 13px; }
      #equipmentSection .header-spacer { display: none; }
      #equipmentSection .header-actions { order: 1; margin-left: auto; }
      #equipmentSection .table-container { border-radius: 0; margin: 0 -16px; }
      #equipmentSection .table th, #equipmentSection .table td { padding: 12px 14px; font-size: 13px; }
      .dashboard-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
      .stat-card { padding: 16px; }
      .modal { width: 95%; max-width: 600px; margin: 20px; max-height: calc(100vh - 40px); }
      .notification-panel { width: calc(100% - 32px); right: 16px; left: 16px; top: 70px; }
    }
    @media (max-width: 480px) {
      .dashboard-stats { grid-template-columns: 1fr 1fr; }
      .stat-card { flex-direction: column; text-align: center; gap: 10px; }




  #invoiceReviewSection{font-family:'DM Sans',sans-serif;color:#1C1C1C;}
  .ir-wrap{padding:8px 0 60px;width:100%;}
  .ir-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:6px;}
  .ir-title{font-size:22px;font-weight:700;margin:0;}
  .ir-subtitle{font-size:13px;color:#8B8B8B;margin:4px 0 0;}
  .ir-crumbs{display:flex;align-items:center;gap:7px;font-size:13px;color:#8B8B8B;margin:14px 0 18px;flex-wrap:wrap;}
  .ir-crumbs a{color:#452E5A;font-weight:600;cursor:pointer;text-decoration:none;}
  .ir-crumbs a:hover{text-decoration:underline;}
  .ir-crumbs .sep{color:#C9C4D1;}
  .ir-crumbs .cur{color:#1C1C1C;font-weight:600;}

  /* Filter bar */
  .ir-filters{background:#fff;border:1px solid #ECEAF1;border-radius:14px;padding:14px 16px;margin-bottom:20px;}
  .ir-filters-head{display:flex;align-items:center;justify-content:space-between;cursor:pointer;}
  .ir-filters-head h4{margin:0;font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#6B6676;display:flex;align-items:center;gap:8px;}
  .ir-filters-head .chev{transition:transform .2s;color:#9A93A6;}
  .ir-filters.collapsed .chev{transform:rotate(-90deg);}
  .ir-filters.collapsed .ir-filters-body{display:none;}
  .ir-active-count{background:#452E5A;color:#fff;font-size:10.5px;font-weight:700;padding:1px 8px;border-radius:20px;}
  .ir-filters-body{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px;}
  .ir-fld{display:flex;flex-direction:column;gap:5px;}
  .ir-fld label{font-size:11px;font-weight:600;color:#8B8B8B;letter-spacing:.3px;}
  .ir-fld input,.ir-fld select{border:1px solid #E2E2E6;border-radius:9px;padding:8px 11px;font-size:13px;font-family:inherit;color:#1C1C1C;outline:none;background:#fff;transition:border-color .15s,box-shadow .15s;}
  .ir-fld input:focus,.ir-fld select:focus{border-color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.12);}
  .ir-filters-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;}

  /* Buttons */
  .ir-btn{border:1px solid #E1DEE8;background:#fff;color:#3A3743;font-size:12.5px;font-weight:600;padding:8px 15px;border-radius:9px;cursor:pointer;font-family:inherit;transition:all .12s;display:inline-flex;align-items:center;gap:6px;}
  .ir-btn:hover{background:#F6F4FA;border-color:#D3CCE0;}
  .ir-btn.primary{background:#452E5A;border-color:#452E5A;color:#fff;}
  .ir-btn.primary:hover{background:#5B3D76;}
  .ir-btn.good{background:#1E8E4E;border-color:#1E8E4E;color:#fff;}
  .ir-btn.good:hover{background:#1a7d45;}
  .ir-btn.danger{background:#D14343;border-color:#D14343;color:#fff;}
  .ir-btn.danger:hover{background:#bd3a3a;}
  .ir-btn.warn{background:#D97316;border-color:#D97316;color:#fff;}
  .ir-btn.warn:hover{background:#c4660f;}
  .ir-btn svg{width:14px;height:14px;}

  /* Company grid */
  .ir-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:16px;}
  .ir-co-card{background:#fff;border:1px solid #ECEAF1;border-radius:14px;padding:18px;cursor:pointer;transition:box-shadow .15s,border-color .15s,transform .1s;}
  .ir-co-card:hover{box-shadow:0 8px 24px rgba(69,46,90,.1);border-color:#D9D2E5;transform:translateY(-1px);}
  .ir-co-head{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
  .ir-avatar{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:15px;flex-shrink:0;}
  .ir-co-name{font-size:15.5px;font-weight:700;}
  .ir-co-sector{font-size:12px;color:#9A93A6;margin-top:1px;}
  .ir-co-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;}
  .ir-stat{background:#FBFAFC;border:1px solid #F1EFF5;border-radius:9px;padding:9px 10px;text-align:center;}
  .ir-stat .num{font-size:17px;font-weight:700;line-height:1.1;}
  .ir-stat .lbl{font-size:10.5px;color:#8B8B8B;margin-top:3px;letter-spacing:.2px;}
  .ir-stat.pending .num{color:#B7791F;}
  .ir-stat.approved .num{color:#1E8E4E;}
  .ir-stat.rejected .num{color:#D14343;}
  .ir-stat.changes .num{color:#D97316;}
  .ir-co-attn{margin-top:13px;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#D97316;background:#FFF6EC;border:1px solid #FBE3C7;padding:5px 11px;border-radius:8px;}

  /* Project / invoice rows */
  .ir-rows{display:flex;flex-direction:column;gap:12px;}
  .ir-row{background:#fff;border:1px solid #ECEAF1;border-radius:13px;padding:16px 18px;cursor:pointer;transition:box-shadow .15s,border-color .15s;}
  .ir-row:hover{box-shadow:0 6px 18px rgba(69,46,90,.08);border-color:#D9D2E5;}
  .ir-row-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
  .ir-row-name{font-size:15px;font-weight:700;display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
  .ir-row-meta{font-size:12.5px;color:#9A93A6;margin-top:7px;display:flex;gap:18px;flex-wrap:wrap;}
  .ir-row-meta b{color:#5C5867;font-weight:600;}
  .ir-mini{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px;}
  .ir-mini .chip{font-size:11px;font-weight:600;padding:3px 9px;border-radius:20px;display:inline-flex;align-items:center;gap:5px;}
  .ir-chev{color:#C9C4D1;flex-shrink:0;}

  .ir-badge{font-size:10.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;padding:4px 11px;border-radius:20px;white-space:nowrap;}

  .ir-empty{background:#fff;border:1px dashed #DCD7E4;border-radius:13px;padding:46px 24px;text-align:center;color:#9A93A6;font-size:13.5px;}

  /* Detail */
  .ir-detail-head{background:#fff;border:1px solid #ECEAF1;border-radius:14px;padding:20px 22px;margin-bottom:18px;}
  .ir-detail-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
  .ir-detail-title h2{margin:0;font-size:19px;font-weight:700;}
  .ir-detail-sub{font-size:13px;color:#8B8B8B;margin-top:6px;}
  .ir-statusline{font-size:13px;color:#5C5867;margin-top:12px;padding:10px 13px;border-radius:9px;background:#FBFAFC;border:1px solid #F1EFF5;}
  .ir-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px;}
  .ir-cols{display:grid;grid-template-columns:1fr 340px;gap:18px;align-items:start;}
  @media (max-width:1000px){.ir-cols{grid-template-columns:1fr;}.ir-filters-body{grid-template-columns:repeat(2,1fr);}}
  .ir-card{background:#fff;border:1px solid #ECEAF1;border-radius:14px;padding:18px 20px;margin-bottom:18px;}
  .ir-card h3{font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#9A93A6;margin:0 0 14px;}
  .ir-kv{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px;}
  .ir-kv .k{font-size:11px;color:#9A93A6;letter-spacing:.2px;}
  .ir-kv .v{font-size:14px;font-weight:600;color:#1C1C1C;margin-top:2px;}
  .ir-kv .item{}
  .ir-kv .item.full{grid-column:1 / -1;}
  .ir-totals{border-top:1px solid #F1EFF5;margin-top:16px;padding-top:14px;}
  .ir-totline{display:flex;justify-content:space-between;font-size:13.5px;padding:5px 0;color:#5C5867;}
  .ir-totline.grand{font-weight:700;color:#1C1C1C;font-size:15px;border-top:1px solid #F1EFF5;margin-top:6px;padding-top:11px;}
  .ir-attach{display:flex;align-items:center;gap:10px;border:1px solid #F0EDF4;border-radius:9px;padding:10px 12px;margin-bottom:8px;}
  .ir-attach .nm{font-size:13px;font-weight:600;}
  .ir-attach .sz{font-size:11.5px;color:#9A93A6;margin-left:auto;}
  .ir-attach .vw{color:#452E5A;font-weight:600;font-size:12px;cursor:pointer;}
  .ir-attach .vw:hover{text-decoration:underline;}

  /* Activity timeline */
  .ir-tl{position:relative;padding-left:22px;}
  .ir-tl::before{content:"";position:absolute;left:6px;top:4px;bottom:4px;width:2px;background:#EFEDF2;}
  .ir-tl-item{position:relative;padding:0 0 16px;}
  .ir-tl-item:last-child{padding-bottom:0;}
  .ir-tl-dot{position:absolute;left:-22px;top:2px;width:13px;height:13px;border-radius:50%;background:#fff;border:2px solid #452E5A;}
  .ir-tl-dot.good{border-color:#1E8E4E;}.ir-tl-dot.danger{border-color:#D14343;}.ir-tl-dot.warn{border-color:#D97316;}.ir-tl-dot.muted{border-color:#C9C4D1;}
  .ir-tl-label{font-size:13px;font-weight:600;color:#1C1C1C;}
  .ir-tl-meta{font-size:11.5px;color:#9A93A6;margin-top:1px;}
  .ir-tl-detail{font-size:12.5px;color:#5C5867;margin-top:4px;background:#FBFAFC;border:1px solid #F1EFF5;border-radius:7px;padding:7px 10px;font-style:italic;}

  /* Comments */
  .ir-comment{border:1px solid #F0EDF4;border-radius:10px;padding:11px 13px;margin-bottom:10px;}
  .ir-comment .who{font-size:12.5px;font-weight:700;}
  .ir-comment .kind{font-size:11px;font-weight:600;margin-left:6px;}
  .ir-comment .when{font-size:11px;color:#9A93A6;margin-left:6px;}
  .ir-comment .txt{font-size:13px;color:#3A3743;margin-top:5px;line-height:1.5;}

  /* Diff (compare changes) */
  .ir-diff{border:1px solid #EDE7F7;border-radius:10px;padding:12px 14px;margin-bottom:10px;background:#FBFAFE;}
  .ir-diff .field{font-size:12.5px;font-weight:700;color:#452E5A;margin-bottom:7px;}
  .ir-diff .vals{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
  .ir-diff .old{background:#FDECEC;color:#9b3a3a;text-decoration:line-through;padding:3px 9px;border-radius:7px;font-size:12.5px;}
  .ir-diff .new{background:#E4F6EC;color:#1a7d45;padding:3px 9px;border-radius:7px;font-size:12.5px;font-weight:600;}
  .ir-diff .arrow{color:#9A93A6;}
  .ir-diff .who{font-size:11.5px;color:#9A93A6;margin-top:7px;}

  /* Dialog */
  .ir-overlay{position:fixed;inset:0;background:rgba(28,20,40,.5);z-index:100090;display:none;align-items:center;justify-content:center;padding:20px;}
  .ir-overlay.show{display:flex;}
  .ir-dialog{background:#fff;border-radius:15px;width:520px;max-width:96vw;max-height:88vh;overflow:auto;box-shadow:0 24px 70px rgba(0,0,0,.28);}
  .ir-dlg-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #EFEDF2;}
  .ir-dlg-head h3{margin:0;font-size:16px;font-weight:700;}
  .ir-dlg-x{width:30px;height:30px;border:none;background:transparent;color:#9A93A6;border-radius:8px;cursor:pointer;font-size:18px;}
  .ir-dlg-x:hover{background:#F4F2F7;}
  .ir-dlg-body{padding:20px 22px;}
  .ir-dlg-body label{font-size:12px;font-weight:600;color:#6B6676;display:block;margin-bottom:6px;}
  .ir-dlg-body textarea,.ir-dlg-body input{width:100%;border:1px solid #E2E2E6;border-radius:10px;padding:10px 13px;font-size:13.5px;font-family:inherit;color:#1C1C1C;outline:none;box-sizing:border-box;}
  .ir-dlg-body textarea:focus,.ir-dlg-body input:focus{border-color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.12);}
  .ir-dlg-body textarea{resize:vertical;min-height:84px;}
  .ir-dlg-foot{display:flex;gap:10px;justify-content:flex-end;padding:0 22px 20px;}
  .ir-doc{border:1px solid #F0EDF4;border-radius:10px;padding:18px;background:#FBFAFC;font-size:13px;color:#3A3743;line-height:1.6;}
  .ir-doc table{width:100%;border-collapse:collapse;font-size:12.5px;margin-top:8px;}
  .ir-doc th,.ir-doc td{text-align:left;padding:6px 8px;border-bottom:1px solid #EFEDF2;}
  .ir-doc th{color:#9A93A6;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.3px;}



            /* Timesheet edit-mode styles */
            #timesheetTable input.ts-edit { width:100%; padding:6px 8px; border:1px solid #E0E0E0; border-radius:5px; font-size:12px; font-family:'DM Sans',sans-serif; background:#fff; color:#1C1C1C; outline:none; box-sizing:border-box; }
            #timesheetTable input.ts-edit:focus { border-color:#452E5A; box-shadow:0 0 0 2px rgba(69,46,90,0.1); }
            #timesheetTable input.ts-edit-narrow { text-align:center; padding:6px 4px; }
            #timesheetTable select.ts-edit { width:100%; padding:6px 8px; border:1px solid #E0E0E0; border-radius:5px; font-size:12px; font-family:'DM Sans',sans-serif; background:#fff; color:#1C1C1C; cursor:pointer; }
            #timesheetTable .ts-edit-delete { display:none; }
            #timesheetTable.edit-mode .ts-edit-delete { display:inline-flex; }
            #timesheetTable.edit-mode tbody tr:hover { background:#FAFAFA; }
            #timesheetAddRow { display:none; }
            #timesheetTable.edit-mode ~ #timesheetAddRow,
            .timesheet-wrapper.edit-mode #timesheetAddRow { display:flex; }
            .ts-edit-mode-banner { display:none; background:rgba(69,46,90,0.08); border:1px solid rgba(69,46,90,0.2); border-radius:6px; padding:8px 14px; font-size:12px; font-weight:500; color:#452E5A; align-items:center; gap:8px; }
            .timesheet-wrapper.edit-mode .ts-edit-mode-banner { display:inline-flex; }
            /* Day-cell with leave picker */
            .ts-day-cell { position:relative; display:flex; gap:2px; align-items:center; }
            .ts-day-cell input.ts-edit { flex:1; min-width:0; padding-right:4px; }
            .ts-leave-btn { width:18px; height:26px; border:1px solid #E0E0E0; background:#FAFAFA; color:#8B8B8B; border-radius:4px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; flex-shrink:0; }
            .ts-leave-btn:hover { background:#452E5A; color:#fff; border-color:#452E5A; }
            .ts-leave-menu { position:absolute; top:100%; right:0; margin-top:4px; background:#fff; border:1px solid #E0E0E0; border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,0.12); z-index:600; min-width:170px; padding:4px; display:none; }
            .ts-leave-menu.show { display:block; }
            .ts-leave-menu button { display:flex; align-items:center; gap:8px; width:100%; padding:8px 10px; border:none; background:transparent; cursor:pointer; font-size:12px; color:#1C1C1C; font-family:'DM Sans',sans-serif; text-align:left; border-radius:5px; }
            .ts-leave-menu button:hover { background:#F8F8F8; }
            .ts-leave-menu .ts-leave-tag { display:inline-block; width:22px; height:22px; border-radius:5px; text-align:center; line-height:22px; font-size:10px; font-weight:700; color:#fff; flex-shrink:0; }
            /* Day cell coloring based on leave type */
            .ts-day-cell.ts-leave-V input.ts-edit { background:rgba(66,153,225,0.08); border-color:rgba(66,153,225,0.3); color:#3182CE; font-weight:600; }
            .ts-day-cell.ts-leave-S input.ts-edit { background:rgba(245,101,101,0.08); border-color:rgba(245,101,101,0.3); color:#E53935; font-weight:600; }
            .ts-day-cell.ts-leave-H input.ts-edit { background:rgba(76,175,80,0.08); border-color:rgba(76,175,80,0.3); color:#4CAF50; font-weight:600; }
            .ts-day-cell.ts-leave-P input.ts-edit { background:rgba(255,167,38,0.08); border-color:rgba(255,167,38,0.3); color:#FFA726; font-weight:600; }
            .ts-day-cell.ts-leave-U input.ts-edit { background:rgba(113,128,150,0.08); border-color:rgba(113,128,150,0.3); color:#718096; font-weight:600; }
            /* Benefits cell */
            .ts-benefits-btn { padding:6px 10px; background:#FAFAFA; border:1px dashed #C8C8C8; border-radius:5px; cursor:pointer; font-size:11px; font-weight:500; color:#484848; font-family:'DM Sans',sans-serif; display:inline-flex; align-items:center; gap:5px; transition:all 0.15s; }
            .ts-benefits-btn:hover { background:rgba(69,46,90,0.08); border-color:#452E5A; color:#452E5A; }
            .ts-benefits-btn.has-benefits { background:rgba(76,175,80,0.1); border:1px solid rgba(76,175,80,0.3); color:#4CAF50; font-weight:600; }
            /* Benefits modal */
            .ts-benefits-modal { display:none; position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,0.5); z-index:5000; align-items:center; justify-content:center; }
            .ts-benefits-modal.show { display:flex; }
            .ts-benefits-modal-card { background:#fff; border-radius:12px; padding:24px; width:480px; max-width:90vw; max-height:85vh; overflow-y:auto; font-family:'DM Sans',sans-serif; }
            .ts-benefit-row { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #F0F0F0; }
            .ts-benefit-row:last-child { border-bottom:none; }
            .ts-benefit-row input[type="checkbox"] { width:18px; height:18px; accent-color:#452E5A; cursor:pointer; }
            .ts-benefit-row label { flex:1; font-size:13px; color:#1C1C1C; cursor:pointer; }
            .ts-benefit-row input[type="number"] { width:110px; padding:7px 10px; border:1px solid #E0E0E0; border-radius:6px; font-size:13px; font-family:'DM Sans',sans-serif; outline:none; text-align:right; }
            .ts-benefit-row input[type="number"]:focus { border-color:#452E5A; }
            /* Legend for color codes */
            .ts-leave-legend { display:none; }
            .timesheet-wrapper.edit-mode .ts-leave-legend { display:flex; }
            
            /* ===== READ-ONLY MODE (opened from Company kebab → View Timesheet) ===== */
            /* No edit affordances: hide delete icons, hide Add Employee bar, neutralize Benefits buttons */
            .timesheet-wrapper.view-only .ts-edit-delete { display:none !important; }
            .timesheet-wrapper.view-only #timesheetAddRow { display:none !important; }
            /* Empty Benefits cell → show "—" instead of "+ Add" button */
            .timesheet-wrapper.view-only .ts-benefits-btn { pointer-events:none; cursor:default; border:none; background:transparent; padding:0; color:#8B8B8B; font-weight:400; }
            .timesheet-wrapper.view-only .ts-benefits-btn:not(.has-benefits) { font-size:13px; }
            .timesheet-wrapper.view-only .ts-benefits-btn:not(.has-benefits)::before { content:'—'; }
            .timesheet-wrapper.view-only .ts-benefits-btn:not(.has-benefits) > * { display:none; }
            /* Configured benefits keep their green styling but lose the click affordance */
            .timesheet-wrapper.view-only .ts-benefits-btn.has-benefits { background:rgba(76,175,80,0.1); border:1px solid rgba(76,175,80,0.3); color:#4CAF50; font-weight:600; padding:6px 10px; }
            
            /* ===== INVOICE — ALWAYS READ-ONLY (no editable inputs) ===== */
            .invoice-wrapper .inv-edit-delete { display:none !important; }
            #invoiceAddRowBar { display:none !important; }
            /* Defensive: hide any inputs/selects that might appear inside the invoice */
            .invoice-wrapper input.inv-edit, .invoice-wrapper textarea.inv-edit, .invoice-wrapper select.inv-edit { display:none !important; }
            .ts-icon-btn{width:36px;height:36px;border:none;background:transparent;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#452E5A;padding:0;transition:background .12s,color .12s;}
            .ts-icon-btn:hover{background:rgba(69,46,90,0.08);color:#2f1f40;}
            /* ===== SUBMITTED — non-editable download/share view ===== */
            .ts-submitted-only { display:none; }
            #timesheetOverlay.submitted .ts-submitted-only { display:inline-flex !important; align-items:center; }
            #timesheetOverlay.submitted #timesheetCommentsBox { display:none !important; }
            #timesheetOverlay.submitted #timesheetViewPagination { display:none !important; }
            #timesheetOverlay.submitted .ts-leave-btn,
            #timesheetOverlay.submitted .ts-emp-cv { display:none !important; }
            #timesheetOverlay.submitted #timesheetTbody input,
            #timesheetOverlay.submitted #timesheetTbody select,
            #timesheetOverlay.submitted #timesheetTbody button,
            #timesheetOverlay.submitted .ts-leave-hrs { pointer-events:none !important; cursor:default !important; }
            #timesheetOverlay.submitted #timesheetTbody input.ts-edit,
            #timesheetOverlay.submitted #timesheetTbody select { border:none !important; background:transparent !important; box-shadow:none !important; -webkit-appearance:none !important; appearance:none !important; padding:6px 4px !important; }
            #timesheetOverlay.submitted .ts-po-select,
            #timesheetOverlay.submitted #timesheetTbody input.ts-edit-narrow { text-align:center; }
            #timesheetOverlay.submitted .ts-proj-edit,
            #timesheetOverlay.submitted .ts-proj-x,
            #timesheetOverlay.submitted .ts-proj-add { display:none !important; }
            #timesheetOverlay.submitted #timesheetImportBtn,
            #timesheetOverlay.submitted #timesheetEditBtn,
            #timesheetOverlay.submitted #timesheetActionBtns > button[onclick="saveTimesheet()"],
            #timesheetOverlay.submitted #timesheetActionBtns > .credit-btn-primary:not(.ts-submitted-only) { display:none !important; }
          


    .cm-ctrl.on { background:#452E5A !important; color:#fff !important; }
    .cm-ctrl:hover { background:#E8E8EC; }
    .cm-ctrl.on:hover { background:#5B3D76 !important; }
    .mood-btn:hover { border-color:#452E5A !important; background:#F8F5FC !important; transform:translateY(-1px); }
    .mood-btn.active { background:#EFE8F6 !important; border-color:#452E5A !important; box-shadow:0 2px 8px rgba(69,46,90,0.15); }
    .cm-section summary::-webkit-details-marker { display:none; }
    .cm-section[open] .cm-chevron { transform:rotate(180deg); }
    .cm-chevron { transition:transform .2s; }
    .cm-section summary:hover { background:#FAFAFA; }
    /* Secondary call tools — one clean grouped accordion panel */
    #cmSectionsRow .cm-section { flex:0 0 auto; width:100%; box-sizing:border-box; border:none !important; border-radius:0 !important; background:transparent !important; border-bottom:1px solid #F2F2F4 !important; }
    #cmSectionsRow .cm-section:last-child { border-bottom:none !important; }
    #cmSectionsRow .cm-section:not([open]) > *:not(summary) { display:none !important; }
    #crpTranslateBtn.translating { background:#2F7A4D !important; }
    @keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.4 } }
    @keyframes callRingPulse { 0%,100% { transform:scale(1); opacity:0.4 } 50% { transform:scale(1.08); opacity:0 } }
  


      #viewCreditModal .vc-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 24px; margin-top:4px; }
      #viewCreditModal .vc-item { display:flex; flex-direction:column; gap:3px; }
      #viewCreditModal .vc-label { font-size:11px; font-weight:600; color:#9094A0; text-transform:uppercase; letter-spacing:0.3px; }
      #viewCreditModal .vc-value { font-size:14px; font-weight:600; color:#1C1C1C; }
      #viewCreditModal .vc-value.money { color:#1E8E4E; }
      #viewCreditModal .vc-detail { margin-top:18px; padding-top:16px; border-top:1px solid #F2F2F4; }
      #viewCreditModal .vc-detail p { margin:6px 0 0; font-size:14px; color:#3A3A3A; line-height:1.5; }
      #viewCreditModal .vc-approver-row { display:flex; align-items:center; gap:10px; margin-top:18px; padding:12px 14px; background:#F7F6FA; border-radius:10px; }
      #viewCreditModal .vc-approver-avatar { width:34px; height:34px; border-radius:50%; background:#452E5A; color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; }
      #viewCreditModal .vc-approver-meta { display:flex; flex-direction:column; }
      #viewCreditModal .vc-approver-meta b { font-size:13.5px; color:#1C1C1C; }
      #viewCreditModal .vc-approver-meta small { font-size:11.5px; color:#9094A0; }
    


    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2000;
    }
    .modal-overlay.show { display: flex; }
    
    /* Call Type Selection Modal */
    .call-type-modal {
      background: #fff;
      border-radius: 8px;
      width: 400px;
      padding: 0;
      overflow: hidden;
    }
    .call-type-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 24px;
      border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .call-type-header h2 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .call-type-close {
      width: 28px;
      height: 28px;
      border: none;
      background: none;
      cursor: pointer;
      font-size: 18px;
      color: #484848;
    }
    .call-type-recipient {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 20px 24px;
      background: #F8F8F8;
    }
    .call-type-avatar {
      width: 50px;
      height: 50px;
      border-radius: 12px;
      background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 700;
      color: #fff;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }
    .call-type-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .call-type-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .call-type-name {
      font-size: 16px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .call-type-phone {
      font-size: 14px;
      color: #484848;
    }
    .call-type-options {
      padding: 20px 24px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .call-type-option {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 16px;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      background: #fff;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'DM Sans', sans-serif;
    }
    .call-type-option:hover {
      border-color: #452E5A;
      background: rgba(69,46,90,0.05);
    }
    .call-type-icon {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .call-type-icon.phone-icon {
      background: rgba(76, 175, 80, 0.1);
    }
    .call-type-icon.phone-icon svg {
      width: 24px;
      height: 24px;
      color: #4CAF50;
    }
    .call-type-icon.video-icon {
      background: rgba(69,46,90,0.1);
    }
    .call-type-icon.video-icon svg {
      width: 24px;
      height: 24px;
      color: #452E5A;
    }
    .call-type-label {
      display: flex;
      flex-direction: column;
      gap: 2px;
      text-align: left;
    }
    .call-type-title {
      font-size: 15px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .call-type-desc {
      font-size: 13px;
      color: #484848;
    }
    
    /* Call Modal */
    .call-modal {
      background: #FCFCFC;
      border-radius: 8px;
      width: 382px;
      height: 383px;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 54px 20px 40px;
    }
    .call-avatar {
      width: 134px;
      height: 134px;
      border-radius: 24px;
      background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 48px;
      font-weight: 700;
      color: #fff;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }
    .call-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .call-name {
      margin-top: 12px;
      font-size: 17px;
      font-weight: 500;
      color: #1C1C1C;
    }
    .call-status {
      margin-top: 4px;
      font-size: 12px;
      color: #484848;
    }
    .call-actions {
      margin-top: auto;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .call-btn {
      width: 50px;
      height: 50px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      background: #fff;
      box-shadow: 0 7px 23px rgba(30,74,174,0.13);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }
    .call-btn svg {
      width: 22px;
      height: 22px;
      color: #484848;
    }
    .call-btn:hover {
      background: #F0F0F0;
    }
    .call-btn.active {
      background: #452E5A;
    }
    .call-btn.active svg {
      color: #fff;
    }
    .call-btn.video {
      background: #fff;
    }
    .call-btn.video.active {
      background: #4CAF50;
    }
    .call-btn.end {
      width: 140px;
      background: #CC2626;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      font-family: 'DM Sans', sans-serif;
    }
    .call-btn.end:hover {
      background: #B01E1E;
    }
    
    /* SMS Modal Enhanced */
    /* Add New Modal */
    .add-new-modal {
      background: #fff;
      border-radius: 8px;
      width: clamp(560px, 50vw, 1200px);
      max-width: 92vw;
      max-height: 90vh;
      overflow-y: auto;
      padding: 24px;
    }
    .add-new-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    .add-new-header h2 {
      font-size: 20px;
      font-weight: 600;
      color: #1C1C1C;
      margin: 0;
    }
    .add-new-close {
      width: 28px;
      height: 28px;
      border: none;
      background: none;
      cursor: pointer;
      font-size: 20px;
      color: #1C1C1C;
    }
    .add-new-form {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .form-row {
      display: flex;
      gap: 16px;
    }
    .form-row.three-col .form-group {
      flex: 1;
    }
    .form-group {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .form-group.full-width {
      flex: none;
      width: 100%;
    }
    .form-group label {
      font-size: 14px;
      font-weight: 700;
      color: #4B4B4B;
    }
    .form-group input,
    .form-group select {
      width: 100%;
      min-width: 0;
      height: 40px;
      padding: 10px 12px;
      border: 1px solid #CFCFCF;
      border-radius: 6px;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      color: #474747;
      background: #fff;
    }
    .form-group select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 32px;
    }
    .search-input {
      position: relative;
      display: flex;
      align-items: center;
    }
    .search-input svg {
      position: absolute;
      left: 12px;
      width: 16px;
      height: 16px;
      color: #8B8B8B;
    }
    .search-input input {
      width: 100%;
      padding-left: 36px;
    }
    .form-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 8px;
    }
    .add-user-btn {
      background: #452E5A;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .add-user-btn:hover {
      background: #5B3D76;
    }
    
    /* Profile View Screen */
    .profile-view-screen {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: #FAFAFA;
      z-index: 3000;
      display: none;
      flex-direction: row;
    }
    .profile-view-screen.show {
      display: flex;
    }
    .profile-sidebar {
      width: 201px;
      background: #FFFFFF;
      border-right: 1px solid #ECECEF;
      display: flex;
      flex-direction: column;
      height: 100%;
      flex-shrink: 0;
    }
    .profile-sidebar-header {
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .profile-sidebar-logo {
      color: #1C1C1C;
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 1px;
    }
    .profile-sidebar-toggle {
      width: 24px;
      height: 24px;
      background: #fff;
      border: 1px solid #E2E2E6;
      border-radius: 50%;
      color: #888;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }
    .profile-sidebar-toggle:hover { background: #F5F5F7; }
    .profile-sidebar-toggle svg { width: 14px; height: 14px; }
    .profile-sidebar-nav {
      flex: 1;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .profile-nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      color: #3A3A3A;
      text-decoration: none;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
      transition: background 0.15s, color 0.15s;
    }
    .profile-nav-item:hover {
      background: rgba(69,46,90,0.08);
      color: #452E5A;
    }
    .profile-nav-item.active {
      background: #452E5A;
      color: #fff;
    }
    .profile-nav-item svg {
      width: 20px;
      height: 20px;
    }
    .profile-sidebar-footer {
      padding: 16px;
      border-top: 1px solid #ECECEF;
    }
    .profile-logout-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      color: #3A3A3A;
      background: none;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      width: 100%;
      transition: background 0.15s, color 0.15s;
    }
    .profile-logout-btn:hover {
      background: rgba(69,46,90,0.08);
      color: #452E5A;
    }
    .profile-logout-btn svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }
    /* Collapsed state — mirror behavior of the main .sidebar */
    .profile-sidebar { transition: width 0.3s ease; }
    .profile-sidebar-logo { transition: opacity 0.2s, width 0.2s; white-space: nowrap; overflow: hidden; }
    .profile-sidebar-toggle svg { transition: transform 0.3s; }
    .profile-nav-item, .profile-logout-btn { transition: font-size 0.2s, padding 0.2s, justify-content 0.2s; }
    .profile-sidebar.collapsed { width: 60px; }
    .profile-sidebar.collapsed .profile-sidebar-logo { opacity: 0; width: 0; }
    .profile-sidebar.collapsed .profile-sidebar-toggle { margin-left: 0; }
    .profile-sidebar.collapsed .profile-sidebar-toggle svg { transform: rotate(180deg); }
    .profile-sidebar.collapsed .profile-sidebar-header { justify-content: center; }
    .profile-sidebar.collapsed .profile-nav-item,
    .profile-sidebar.collapsed .profile-logout-btn { font-size: 0; justify-content: center; padding: 12px 0; gap: 0; }
    .profile-sidebar.collapsed .profile-nav-item svg,
    .profile-sidebar.collapsed .profile-logout-btn svg { font-size: initial; }
    .profile-main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      overflow-x: hidden;
      padding-bottom: 24px;
    }
    .profile-main-content > * {
      flex-shrink: 0;
    }
    .profile-view-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 24px;
      background: #FAFAFA;
    }
    .profile-header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .profile-header-center {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1;
    }
    .back-btn {
      width: 34px;
      height: 34px;
      border: none;
      background: #fff;
      border-radius: 4px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .back-btn svg {
      width: 18px;
      height: 18px;
      color: #1C1C1C;
    }
    .profile-title {
      font-size: 18px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .profile-header-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .profile-tabs {
      display: flex;
      align-items: center;
      gap: 2px;
      background: #fff;
      border: 1px solid #ECECEF;
      border-bottom: none;
      border-radius: 12px 12px 0 0;
      margin: 0 24px 0;
      height: 46px;
      padding: 0 18px;
      overflow: hidden;
    }
    /* When the summary is collapsed, the tabs stand alone as a full card */
    .profile-tabs.solo {
      border-bottom: 1px solid #ECECEF;
      border-radius: 12px;
      margin-bottom: 16px;
    }
    .profile-tab {
      padding: 0 12px;
      height: 46px;
      border: none;
      border-bottom: 2px solid transparent;
      background: transparent;
      font-size: 11.5px;
      font-weight: 600;
      color: #9094A0;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      transition: color 0.15s ease, border-color 0.15s ease;
    }
    .profile-tab:hover {
      background: transparent;
      color: #1C1C1C;
    }
    .profile-tab.active {
      color: #452E5A;
      background: transparent;
      border-bottom-color: #452E5A;
      font-weight: 700;
    }
    .profile-tabs-spacer {
      flex: 1;
    }
    .expand-btn {
      width: 38px;
      height: 38px;
      border: none;
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .expand-btn svg {
      width: 16px;
      height: 16px;
      color: #1C1C1C;
      transition: transform 0.3s;
    }
    .expand-btn.collapsed svg {
      transform: rotate(180deg);
    }
    .profile-card {
      display: flex;
      flex-direction: column;
      background: transparent;
      margin: 0 24px;
      padding: 0;
      border-radius: 0;
      gap: 16px;
      overflow: visible;
    }
    .profile-card.collapsed {
      display: none !important;
    }
    .profile-summary {
      display: flex;
      flex-direction: column;
      gap: 16px;
      background: #fff;
      border: 1px solid #ECECEF;
      border-top: none;
      border-radius: 0 0 12px 12px;
      padding: 20px 24px;
    }
    .profile-summary.collapsed {
      display: none !important;
    }
    .profile-top-row {
      display: flex;
      align-items: center;
      gap: 32px;
    }
    .profile-main-info {
      display: flex;
      gap: 14px;
      align-items: center;
    }
    .profile-avatar-large {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      background: linear-gradient(135deg, #D4A574 0%, #C49B6A 100%);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 700;
      color: #fff;
      overflow: hidden;
    }
    .profile-avatar-large img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .profile-name-section {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .profile-title-text {
      font-size: 11px;
      color: #8B8B8B;
    }
    .profile-name {
      font-size: 16px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .profile-rating {
      display: flex;
      gap: 1px;
    }
    .profile-status-badge {
      display: inline-flex;
      padding: 3px 10px;
      background: #4CAF50;
      color: #fff;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 600;
      margin-top: 2px;
      width: fit-content;
    }
    .profile-meta {
      display: flex;
      flex: 1;
      align-items: center;
    }
    .profile-meta-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      padding: 0 16px;
      border-left: 1px solid #F0F0F0;
    }
    .profile-meta-item:first-child {
      padding-left: 0;
      border-left: none;
    }
    .profile-meta-item label {
      font-size: 10px;
      color: #8B8B8B;
      white-space: nowrap;
    }
    .profile-meta-item span {
      font-size: 13px;
      font-weight: 500;
      color: #1C1C1C;
      white-space: nowrap;
    }
    /* Profile Details Cards */
    .profile-details-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 12px;
    }
    .profile-detail-card {
      background: #FFFFFF;
      border-radius: 8px;
      padding: 16px 18px;
      border: 1px solid #F0F0F0;
    }
    .profile-detail-card.address-card {
      display: flex;
      flex-direction: column;
    }
    .profile-card-header {
      display: flex;
      align-items: center;
      margin-bottom: 14px;
    }
    .card-icon { display: none; }
    .card-title {
      font-size: 13px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .profile-card-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }
    .profile-card-item {
      display: flex;
      flex-direction: column;
      gap: 3px;
      position: relative;
      padding: 6px;
      margin: -6px;
      border-radius: 6px;
      transition: background 0.2s;
    }
    .profile-card-item.editable {
      cursor: pointer;
    }
    .profile-card-item.editable:hover {
      background: rgba(69,46,90,0.08);
    }
    .profile-card-item label {
      font-size: 10px;
      color: #8B8B8B;
    }
    .profile-card-item .value {
      font-size: 13px;
      color: #1C1C1C;
      font-weight: 500;
    }
    .profile-card-item .value.highlight {
      color: #4CAF50;
      font-weight: 600;
    }
    .profile-card-item .value.mono {
      font-family: monospace;
      letter-spacing: 1px;
    }
    .profile-card-item .edit-icon {
      position: absolute;
      top: 3px;
      right: 3px;
      width: 11px;
      height: 11px;
      color: #452E5A;
      opacity: 0;
    }
    /* Contact card inline-edit rows */
    .contact-editable { border-radius: 6px; transition: background 0.15s; }
    .contact-editable:hover { background: rgba(69,46,90,0.06); }
    .contact-editable .edit-icon {
      position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
      width: 13px; height: 13px; color: #452E5A; opacity: 0; transition: opacity 0.15s;
    }
    .contact-address-edit .edit-icon { top: 10px; transform: none; }
    .contact-editable:hover .edit-icon { opacity: 1; }
    .inline-addr-edit { padding-top: 4px; }
    .profile-card-item.editable:hover .edit-icon {
      opacity: 0.7;
    }
    /* Section-level edit pencil — always visible at top-right of each card header */
    .profile-card-header { position: relative; display: flex; justify-content: space-between; align-items: center; }
    .section-edit-btn {
      width: 24px; height: 24px;
      border: none; background: transparent;
      padding: 0; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
      color: #B0B0B5;
      border-radius: 6px;
      transition: background 0.15s, color 0.15s;
    }
    .section-edit-btn:hover { background: rgba(69,46,90,0.08); color: #452E5A; }
    .section-edit-btn svg { width: 14px; height: 14px; }
    .profile-address-content {
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding: 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }
    .profile-address-content:hover {
      background: rgba(69,46,90,0.08);
    }
    .address-main {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .address-line {
      font-size: 14px;
      color: #1C1C1C;
    }
    .profile-address-content .edit-icon {
      width: 14px;
      height: 14px;
      color: #452E5A;
      opacity: 0.6;
    }
    .profile-address-content:hover .edit-icon {
      opacity: 1;
    }
    .address-actions {
      margin-top: 16px;
      display: flex;
      justify-content: flex-end;
    }
    
    /* Payment History Header */
    .payment-history-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }
    .payment-history-header h4 {
      font-size: 15px;
      font-weight: 600;
      color: #1C1C1C;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .payment-history-header h4::before {
      content: none;
    }
    .payment-filters {
      display: flex;
      gap: 12px;
    }
    .filter-select {
      padding: 8px 12px;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      font-size: 13px;
      color: #484848;
      background: #fff;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      appearance: auto;
    }
    .filter-select:focus {
      outline: none;
      border-color: #452E5A;
    }
    
    /* Payment Table Improvements - Uses global .entity-cell structure */
    
    .method-badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 500;
    }
    .method-badge.deposit {
      background: rgba(76, 175, 80, 0.12);
      color: #2E7D32;
    }
    .method-badge.check {
      background: rgba(255, 152, 0, 0.12);
      color: #E65100;
    }
    .deduction-badge {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      padding: 3px 6px;
      background: rgba(244, 67, 54, 0.08);
      border-radius: 4px;
      font-size: 11px;
      font-weight: 500;
      color: #C62828;
    }
    .deduction-badge small {
      font-size: 9px;
      color: #999;
    }
    
    /* Payment Summary Footer */
    .payment-summary-footer {
      display: flex;
      justify-content: flex-end;
      gap: 28px;
      padding: 14px 16px;
      background: #FAFAFA;
      border-top: 1px solid #F0F0F0;
    }
    .summary-stat {
      display: flex;
      flex-direction: column;
      gap: 3px;
      text-align: right;
    }
    .summary-stat label {
      font-size: 10px;
      color: #8B8B8B;
    }
    .summary-stat span {
      font-size: 14px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .summary-stat.highlight span {
      color: #4CAF50;
      font-size: 15px;
    }

    /* Payment History controls row: title left, filters far right */
    .ph-controls-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      width: 100%;
      flex-wrap: wrap;
    }
    .ph-controls-row h4 { margin: 0; flex-shrink: 0; }
    /* MTD stats as their own full-width row below the title */
    .payment-summary-inline {
      display: flex;
      align-items: stretch;
      gap: 0;
      width: 100%;
      background: #FAFAFB;
      border: 1px solid #ECECEF;
      border-radius: 10px;
      padding: 14px 8px;
      flex-wrap: wrap;
    }
    .payment-summary-inline .summary-stat {
      flex: 1 1 0;
      min-width: 120px;
      text-align: left;
      padding: 2px 20px;
      border-left: 1px solid #E7E7EC;
      gap: 5px;
    }
    .payment-summary-inline .summary-stat:first-child {
      border-left: none;
    }
    .payment-summary-inline .summary-stat label {
      font-size: 11px;
      font-weight: 500;
      color: #8B8B8B;
      letter-spacing: 0.2px;
    }
    .payment-summary-inline .summary-stat span {
      font-size: 19px;
      font-weight: 700;
      color: #1C1C1C;
      line-height: 1.1;
    }
    .payment-summary-inline .summary-stat.highlight span {
      color: #2E9E55;
    }

    /* Payment History pagination */
    .payment-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 20px;
      border-top: 1px solid #F0F0F0;
      background: #fff;
      flex-wrap: wrap;
    }
    .payment-pagination .pg-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .payment-pagination .pg-label {
      font-size: 12px;
      color: #8B8B8B;
    }
    .payment-pagination .pg-size {
      height: 30px;
      padding: 0 26px 0 10px;
      border: 1px solid #E2E2E6;
      border-radius: 7px;
      font-size: 12.5px;
      font-weight: 600;
      color: #1C1C1C;
      background: #fff;
      font-family: 'DM Sans', sans-serif;
      cursor: pointer;
    }
    .payment-pagination .pg-info {
      font-size: 12px;
      color: #8B8B8B;
      margin-left: 4px;
    }
    .payment-pagination .pg-right {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .payment-pagination .pg-pages {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .payment-pagination .pg-num {
      min-width: 30px;
      height: 30px;
      padding: 0 8px;
      border: 1px solid transparent;
      border-radius: 7px;
      background: transparent;
      font-size: 12.5px;
      font-weight: 600;
      color: #6B6B76;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.12s;
    }
    .payment-pagination .pg-num:hover {
      background: rgba(69,46,90,0.06);
      color: #452E5A;
    }
    .payment-pagination .pg-num.active {
      background: #452E5A;
      border-color: #452E5A;
      color: #fff;
    }
    .payment-pagination .pg-arrow {
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #E2E2E6;
      border-radius: 7px;
      background: #fff;
      color: #6B6B76;
      cursor: pointer;
      transition: all 0.12s;
    }
    .payment-pagination .pg-arrow svg { width: 15px; height: 15px; }
    .payment-pagination .pg-arrow:hover:not(:disabled) {
      border-color: #452E5A;
      color: #452E5A;
    }
    .payment-pagination .pg-arrow:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
    
    /* Keep old styles for backwards compatibility */
    .profile-details-section {
      display: flex;
      gap: 60px;
    }
    .profile-details-col {
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-width: 200px;
    }
    .profile-detail-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
      position: relative;
    }
    .profile-detail-row.editable {
      cursor: pointer;
      padding: 8px;
      margin: -8px;
      border-radius: 6px;
      transition: background 0.2s;
    }
    .profile-detail-row.editable:hover {
      background: rgba(69,46,90,0.08);
    }
    .profile-detail-row.editable .edit-icon {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 14px;
      height: 14px;
      color: #452E5A;
      opacity: 1;
    }
    .profile-detail-row.editable:hover .edit-icon {
      opacity: 1;
    }
    .profile-detail-row label {
      font-size: 11px;
      color: #8B8B8B;
    }
    .profile-detail-row span {
      font-size: 14px;
      color: #1C1C1C;
      line-height: 1.4;
    }
    .profile-meta-item.editable {
      cursor: pointer;
      border-radius: 6px;
      transition: background 0.2s;
      position: relative;
    }
    .profile-meta-item.editable:hover {
      background: rgba(69,46,90,0.06);
    }
    .profile-meta-item.editable .edit-icon {
      position: absolute;
      top: 3px;
      right: 3px;
      width: 11px;
      height: 11px;
      color: #8B8B8B;
      opacity: 0.55;
      transition: opacity 0.15s, color 0.15s;
    }
    .profile-meta-item.editable:hover .edit-icon {
      opacity: 1;
      color: #452E5A;
    }
    .inline-edit-input {
      padding: 5px 8px;
      border: 1px solid #452E5A;
      border-radius: 4px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      outline: none;
      width: 100%;
      max-width: 180px;
    }
    .inline-edit-input:focus {
      box-shadow: 0 0 0 2px rgba(69,46,90,0.2);
    }
    .inline-edit-actions {
      display: flex;
      gap: 6px;
      margin-top: 6px;
    }
    .inline-save-btn {
      padding: 4px 12px;
      background: #452E5A;
      color: #fff;
      border: none;
      border-radius: 4px;
      font-size: 12px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .inline-cancel-btn {
      padding: 4px 12px;
      background: #fff;
      color: #484848;
      border: 1px solid #CFCFCF;
      border-radius: 4px;
      font-size: 12px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .profile-edit-section {
      margin-left: auto;
      align-self: flex-end;
    }
    .edit-profile-btn {
      padding: 10px 20px;
      background: #452E5A;
      color: #fff;
      border: 1px solid #452E5A;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .edit-profile-btn:hover {
      background: #5B3D76;
    }
    
    /* Profile Table Updates */
    .profile-content {
      flex: 1;
      margin: 0;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 12px;
      overflow: hidden;
    }
    .profile-table {
      width: 100%;
      border-collapse: collapse;
    }
    .profile-table thead {
      background: rgba(69,46,90,0.08);
    }
    .profile-table th {
      padding: 10px 12px;
      font-size: 10px;
      font-weight: 700;
      color: #452E5A;
      text-align: left;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      white-space: nowrap;
    }
    .profile-table td {
      padding: 10px 12px;
      font-size: 13px;
      color: #1C1C1C;
      border-bottom: 1px solid #F5F5F5;
      vertical-align: middle;
    }
    /* Legacy company styles removed - now using global .entity-cell structure */
    .total-paid {
      font-weight: 600;
      color: #1C1C1C;
    }
    
    /* Tab Content */
    .tab-content {
      display: block;
    }
    .tab-content[style*="display: none"] {
      display: none !important;
    }
    
    /* Status Badges */
    .status-approved {
      display: inline-block;
      padding: 4px 12px;
      background: #4CAF50;
      color: #fff;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }
    .status-pending {
      color: #452E5A;
      font-size: 14px;
    }
    .status-rejected {
      display: inline-block;
      padding: 4px 12px;
      background: #FDECEC;
      color: #E53935;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }
    
    /* ── Rules-driven credit/benefit status pills (clickable) ── */
    .credit-status-toggle {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 4px 10px; border: none; border-radius: 999px;
      font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1;
      font-family: inherit; transition: filter .12s ease, box-shadow .12s ease;
    }
    .credit-status-toggle:hover { filter: brightness(0.96); }
    .credit-status-toggle .cs-caret { width: 11px; height: 11px; transition: transform .15s ease; }
    .credit-status-toggle.open .cs-caret { transform: rotate(180deg); }
    .credit-status-toggle.open { box-shadow: 0 0 0 2px rgba(69,46,90,.15); }
    .cs-approved { background:#4CAF50; color:#fff; }
    .cs-active   { background:#00897B; color:#fff; }
    .cs-eligible { background:#452E5A; color:#fff; }
    .cs-upcoming { background:#FFF1DD; color:#B26A00; }
    .cs-pending  { background:#F0EEF4; color:#6B5B7B; }
    .cs-expired  { background:#F1F1F3; color:#9A9AA5; text-decoration: line-through; }

    /* Eligibility / Effective Date column */
    .credit-eff { display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:600; color:#1C1C1C; }
    .credit-eff svg { color:#9A9AA5; flex:0 0 auto; }
    .credit-eff-sub { font-size:11px; font-weight:600; margin-top:3px; }
    .credit-eff-sub.eff-now   { color:#2E7D32; }
    .credit-eff-sub.eff-soon  { color:#B26A00; }
    .credit-eff-sub.eff-ended { color:#9A9AA5; }

    /* Expandable eligibility detail row */
    .credit-detail-row > td { padding: 0 !important; background: #FAF9FC; border-bottom: 1px solid #ECEAF1 !important; }
    .credit-detail-wrap { padding: 18px 22px; animation: cdSlide .18s ease; }
    @keyframes cdSlide { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform:none; } }
    .credit-detail-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
    .credit-detail-head .cdh-title { font-size:14px; font-weight:700; color:#1C1C1C; }
    .credit-detail-head .cdh-src { font-size:11px; color:#9A9AA5; margin-left:auto; display:flex; align-items:center; gap:5px; }
    .credit-detail-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:12px 18px; margin-bottom:16px; }
    .cd-cell { background:#fff; border:1px solid #ECEAF1; border-radius:8px; padding:10px 12px; }
    .cd-cell .cd-label { font-size:10px; letter-spacing:.04em; text-transform:uppercase; color:#9A9AA5; margin-bottom:4px; }
    .cd-cell .cd-value { font-size:13px; font-weight:600; color:#1C1C1C; }
    .cd-cell .cd-value.cd-warn { color:#B26A00; }
    .cd-cell .cd-value.cd-good { color:#2E7D32; }
    .credit-detail-desc { font-size:12.5px; color:#5B5B66; line-height:1.5; margin-bottom:14px; }
    .credit-reqs { display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
    @media (max-width: 720px){ .credit-reqs { grid-template-columns:1fr; } }
    .credit-reqs h5 { font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#9A9AA5; margin:0 0 8px; }
    .credit-reqs ul { list-style:none; margin:0; padding:0; }
    .credit-reqs li { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:#3A3A42; padding:4px 0; }
    .credit-reqs li .rq-ic { flex:0 0 16px; width:16px; height:16px; margin-top:1px; }
    .credit-reqs li .rq-sub { color:#9A9AA5; font-size:11px; margin-left:4px; }

    /* Credits Pagination */
    .credits-pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 24px;
      border-top: 1px solid rgba(0,0,0,0.06);
    }
    .pagination-left {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .page-btn {
      min-width: 32px;
      height: 32px;
      border: 1px solid #E0E0E0;
      background: #fff;
      border-radius: 4px;
      font-size: 13px;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .page-btn:hover {
      background: #F5F5F5;
    }
    .page-btn.active {
      background: #452E5A;
      color: #fff;
      border-color: #452E5A;
    }
    .page-select {
      padding: 6px 12px;
      border: 1px solid #E0E0E0;
      border-radius: 4px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      margin-left: 8px;
      accent-color: #452E5A;
      color: #1C1C1C;
      cursor: pointer;
    }
    .page-select:focus { outline: none; border-color: #452E5A; box-shadow: 0 0 0 2px rgba(69,46,90,.15); }
    .page-select option:checked { background: #452E5A; color: #fff; }
    .page-select::selection { background: #452E5A; color: #fff; }
    .pagination-right {
      font-size: 13px;
      color: #484848;
    }
    
    /* Empty Tab State */
    .empty-tab {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 200px;
      color: #8B8B8B;
      font-size: 14px;
    }

    /* ============================================
       CREDIT EDIT/DELETE MODAL STYLES
       ============================================ */
    .credit-modal {
      background: #fff;
      border-radius: 12px;
      width: 100%;
      max-width: 520px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }
    .credit-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 24px;
      border-bottom: 1px solid #F0F0F0;
    }
    .credit-modal-header h2 {
      font-size: 17px;
      font-weight: 600;
      color: #1C1C1C;
      margin: 0;
    }
    .credit-modal-close {
      width: 28px;
      height: 28px;
      border: none;
      background: none;
      cursor: pointer;
      font-size: 18px;
      color: #484848;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .credit-modal-close:hover { background: #F0F0F0; }
    .credit-modal-body { padding: 20px 24px; }
    .credit-modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 16px 24px;
      border-top: 1px solid #F0F0F0;
    }

    /* Credit Modal Summary Bar */
    .credit-modal-summary {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      background: #FAFAFA;
      border-radius: 10px;
      border: 1px solid #F0F0F0;
      margin-bottom: 20px;
    }
    .credit-modal-summary-icon {
      width: 40px;
      height: 40px;
      background: rgba(69,46,90,0.1);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .credit-modal-summary-text { flex: 1; }
    .credit-modal-summary-title { font-size: 14px; font-weight: 600; color: #1C1C1C; }
    .credit-modal-summary-sub { font-size: 12px; color: #8B8B8B; margin-top: 2px; }
    .credit-modal-status {
      padding: 4px 12px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0;
    }
    .credit-modal-status.approved { background: #4CAF50; color: #fff; }
    .credit-modal-status.pending { color: #452E5A; background: transparent; }
    .credit-modal-status.rejected { background: rgba(229,57,53,0.1); color: #E53935; }

    /* Credit Form Fields */
    .credit-form-row {
      display: flex;
      gap: 16px;
      margin-bottom: 16px;
    }
    .credit-form-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .credit-form-group.full { flex: 0 0 100%; }
    .credit-form-group label {
      font-size: 12px;
      color: #484848;
      font-weight: 500;
    }
    .credit-form-group input,
    .credit-form-group select,
    .credit-form-group textarea {
      padding: 10px 12px;
      border: 1px solid #E0E0E0;
      border-radius: 6px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      color: #1C1C1C;
      background: #fff;
      outline: none;
    }
    .credit-form-group input:focus,
    .credit-form-group select:focus,
    .credit-form-group textarea:focus {
      border-color: #452E5A;
    }
    .credit-form-group textarea { resize: vertical; }

    /* Credit Modal Buttons */
    .credit-btn-primary {
      padding: 10px 24px;
      background: #452E5A;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .credit-btn-primary:hover { background: #9688e0; }
    .credit-btn-secondary {
      padding: 10px 20px;
      background: #fff;
      color: #484848;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .credit-btn-secondary:hover { background: #F5F5F5; border-color: #D6D6D6; color: #484848; }
    .credit-btn-danger {
      padding: 10px 24px;
      background: #E53935;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .credit-btn-danger:hover { background: #D32F2F; }

    /* Delete Credit Warning */
    .credit-delete-warning {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 8px 0 20px;
    }
    .credit-delete-icon { margin-bottom: 14px; }
    .credit-delete-title {
      font-size: 15px;
      font-weight: 600;
      color: #1C1C1C;
      margin: 0 0 6px;
    }
    .credit-delete-desc {
      font-size: 13px;
      color: #8B8B8B;
      margin: 0;
    }

    /* Delete Credit Item Summary */
    .credit-delete-item {
      background: #FAFAFA;
      border: 1px solid #F0F0F0;
      border-radius: 10px;
      padding: 16px;
    }
    .credit-delete-item-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
    }
    .credit-delete-item-row + .credit-delete-item-row {
      border-top: 1px solid #F0F0F0;
    }
    .credit-delete-label {
      font-size: 12px;
      color: #8B8B8B;
      font-weight: 500;
    }
    .credit-delete-value {
      font-size: 13px;
      color: #1C1C1C;
      font-weight: 500;
    }

    /* ============================================
       LEAVES TAB STYLES
       ============================================ */
    .leaves-table td { white-space: nowrap; }
    /* Bulk selection */
    .lv-sel-th, .lv-sel-td { width: 38px; text-align: center; padding-left: 4px !important; padding-right: 4px !important; }
    .lv-check { width: 15px; height: 15px; cursor: pointer; accent-color: #452E5A; vertical-align: middle; }
    .leaves-table tbody tr.lv-row-selected { background: #F5F1FA; }
    .lv-select-bar {
      display: flex; align-items: center; gap: 16px;
      padding: 10px 16px; margin: 0 0 12px;
      background: #F5F1FA; border: 1px solid #E3D9EF; border-radius: 10px;
      font-size: 12.5px; color: #1C1C1C; font-family: 'DM Sans', sans-serif;
      flex-wrap: wrap;
    }
    .lv-select-bar b { font-weight: 700; }
    .lv-sel-count { color: #452E5A; }
    .lv-sel-sep { width: 1px; height: 16px; background: #D9CDE6; }
    .lv-sel-stat { display: inline-flex; align-items: center; gap: 6px; color: #5B5B5B; }
    .lv-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .lv-sel-clear {
      padding: 6px 14px; border: 1px solid #C9BFD6; background: #fff; color: #452E5A;
      border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .lv-sel-clear:hover { background: #452E5A; color: #fff; border-color: #452E5A; }
    .leave-type {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid;
    }
    .leave-type.casual { color: #D4A017; background: rgba(212,160,23,0.08); border-color: rgba(212,160,23,0.25); }
    .leave-type.sick { color: #4CAF50; background: rgba(76,175,80,0.08); border-color: rgba(76,175,80,0.25); }
    .leave-type.death { color: #E53935; background: rgba(229,57,53,0.08); border-color: rgba(229,57,53,0.25); }
    .leave-type.parenting { color: #452E5A; background: rgba(69,46,90,0.08); border-color: rgba(69,46,90,0.25); }
    .leave-status {
      display: inline-block;
      padding: 4px 14px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }
    .leave-status.approved { background: #4CAF50; color: #fff; }
    .leave-status.pending { background: transparent; color: #452E5A; }
    .leave-status.rejected { background: rgba(229,57,53,0.1); color: #E53935; }
    .comment-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .comment-btn:hover { background: rgba(69,46,90,0.1); }

    /* ============================================
       TOOLS TAB STYLES
       ============================================ */
    .tool-item-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .tool-icon {
      width: 40px;
      height: 40px;
      background: #F5F5F5;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tool-info { display: flex; flex-direction: column; gap: 2px; }
    .tool-name { font-size: 14px; font-weight: 500; color: #1C1C1C; }
    .tool-subtitle { font-size: 11px; color: #8B8B8B; }
    .tool-status {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }
    .tool-status.in-use { color: #452E5A; background: rgba(69,46,90,0.1); }
    .tool-status.available { color: #4CAF50; background: rgba(76,175,80,0.1); }
    .tool-status.maintenance { color: #666; background: #F0F0F0; }
    .tool-status.returned { color: #2563EB; background: rgba(37,99,235,0.10); }
    .tool-status.lost { color: #E5484D; background: rgba(229,72,77,0.10); }
    .tool-status.checked-out { color: #2563EB; background: rgba(37,99,235,0.10); }
    .tool-status.reserved { color: #0891B2; background: rgba(8,145,178,0.12); }
    .tool-status.damaged { color: #EA580C; background: rgba(234,88,12,0.12); }
    .tool-status.retired { color: #6B7280; background: rgba(107,114,128,0.12); }
    .tool-status.archived { color: #94A3B8; background: rgba(148,163,184,0.18); }
    .tool-status.clickable { cursor: pointer; }
    .tool-status.clickable:hover { filter: brightness(0.96); box-shadow: 0 0 0 2px rgba(69,46,90,0.12); }
    /* Equipment bulk controls */
    .eq-sel-th, .eq-sel-td { width: 38px; text-align: center; }
    .eq-check { width: 15px; height: 15px; cursor: pointer; accent-color: #452E5A; vertical-align: middle; }
    .tools-table tbody tr.eq-row-selected { background: #F5F1FA; }
    .eq-toolbar {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
      padding: 12px 16px; margin: 0 0 12px;
      background: #FAFAFB; border: 1px solid #ECECEF; border-radius: 10px;
      font-family: 'DM Sans', sans-serif; font-size: 12.5px;
    }
    .eq-toolbar label { color: #8B8B8B; font-weight: 600; }
    .eq-filter-select {
      padding: 7px 10px; border: 1px solid #E0E0E5; border-radius: 7px;
      font-size: 12.5px; font-family: 'DM Sans', sans-serif; color: #1C1C1C; background: #fff; cursor: pointer; outline: none;
    }
    .eq-bulk-wrap { display: none; align-items: center; gap: 10px; }
    .eq-bulk-wrap.show { display: flex; }
    .eq-sel-count { color: #452E5A; font-weight: 700; }
    .eq-btn {
      padding: 7px 14px; border: 1px solid #452E5A; background: #452E5A; color: #fff;
      border-radius: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .eq-btn.ghost { background: #fff; color: #452E5A; }
    .eq-btn.ghost:hover { background: #F2ECF8; }
    .eq-status-menu {
      position: fixed; z-index: 9800; background: #fff; border: 1px solid #E6E6EA;
      border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.16); padding: 6px; min-width: 160px;
      font-family: 'DM Sans', sans-serif;
    }
    .eq-status-menu button {
      display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
      padding: 8px 10px; border: none; background: none; cursor: pointer; border-radius: 7px;
      font-size: 13px; color: #1C1C1C; font-family: 'DM Sans', sans-serif;
    }
    .eq-status-menu button:hover { background: #F5F1FA; }
    .eq-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
    /* Check-in capture UI */
    .ci-step { font-family: 'DM Sans', sans-serif; }
    .ci-step h3 { font-size: 15px; font-weight: 700; color: #1C1C1C; margin: 0 0 4px; }
    .ci-step .ci-sub { font-size: 12.5px; color: #8B8B8B; margin: 0 0 16px; }
    .ci-photo-cols { display: flex; gap: 12px; margin-bottom: 16px; }
    .ci-photo-col { flex: 1; }
    .ci-photo-col > label { display: block; font-size: 12px; font-weight: 700; color: #452E5A; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
    .ci-drop { border: 1.5px dashed #D6CFE0; border-radius: 10px; padding: 14px; text-align: center; background: #FAFAFB; }
    .ci-drop-btns { display: flex; gap: 8px; justify-content: center; }
    .ci-mini-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid #452E5A; background: #fff; color: #452E5A; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
    .ci-mini-btn:hover { background: #F2ECF8; }
    .ci-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .ci-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid #E8E8E8; }
    .ci-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ci-thumb-x { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; border: none; font-size: 11px; line-height: 16px; cursor: pointer; padding: 0; }
    .ci-field { margin-bottom: 14px; }
    .ci-field label { display: block; font-size: 12.5px; font-weight: 600; color: #1C1C1C; margin-bottom: 6px; }
    .ci-field select, .ci-field textarea { width: 100%; padding: 10px 12px; border: 1px solid #E0E0E5; border-radius: 8px; font-size: 13px; font-family: 'DM Sans', sans-serif; color: #1C1C1C; outline: none; box-sizing: border-box; }
    /* Maintenance request redesign */
    .mr-prio { display:flex; gap:8px; }
    .mr-prio button { flex:1; padding:10px 6px; border:1px solid #E0E0E5; background:#fff; border-radius:9px; font-size:12.5px; font-weight:600; cursor:pointer; color:#7A7A7A; font-family:'DM Sans',sans-serif; display:flex; align-items:center; justify-content:center; gap:6px; transition:all .15s; }
    .mr-prio button .dot { width:8px; height:8px; border-radius:50%; }
    .mr-prio button.active[data-p="Low"]    { color:#2E7D32; background:rgba(76,175,80,0.10); border-color:#4CAF50; }
    .mr-prio button.active[data-p="Medium"] { color:#B45309; background:rgba(245,158,11,0.12); border-color:#F59E0B; }
    .mr-prio button.active[data-p="High"]   { color:#C2410C; background:rgba(234,88,12,0.12); border-color:#EA580C; }
    .mr-prio button.active[data-p="Urgent"] { color:#E5484D; background:rgba(229,72,77,0.12); border-color:#E5484D; }
    .mr-help { font-size:11.5px; color:#9A9A9A; margin-top:5px; }
    .mr-check { display:flex; align-items:center; gap:10px; font-size:13px; color:#1C1C1C; padding:11px 12px; background:#FAFAFB; border:1px solid #ECECEF; border-radius:9px; cursor:pointer; }
    .mr-thumbs { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
    .mr-thumb { width:52px; height:52px; border-radius:8px; overflow:hidden; border:1px solid #E8E8E8; position:relative; }
    .mr-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
    .mr-thumb button { position:absolute; top:2px; right:2px; width:16px; height:16px; border-radius:50%; background:rgba(0,0,0,0.6); color:#fff; border:none; font-size:11px; line-height:16px; cursor:pointer; padding:0; }
    /* Assign autocomplete (system-styled) */
    .ma-search { position: relative; }
    .ma-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #9A9A9A; }
    .ma-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid #E6E6EA; border-radius: 10px; box-shadow: 0 14px 36px rgba(28,20,40,0.16); max-height: 240px; overflow-y: auto; z-index: 11000; padding: 6px; }
    .ma-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-family: 'DM Sans', sans-serif; }
    .ma-item:hover, .ma-item.active { background: #F5F1FA; }
    .ma-item .ma-name { font-size: 13.5px; font-weight: 600; color: #1C1C1C; }
    .ma-item .ma-id { font-size: 11.5px; font-weight: 600; color: #8B8B8B; background: #F2F2F4; padding: 2px 8px; border-radius: 20px; }
    .ma-empty { padding: 12px; font-size: 13px; color: #9A9A9A; text-align: center; }
    /* Equipment visual history */
    .eq-hist-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
    .eq-hist-album .eq-album-img { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid #ECECEF; cursor: pointer; background: #F4F4F6; }
    .eq-hist-album .eq-album-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .eq-empty { font-size: 13px; color: #9A9A9A; padding: 6px 0; }
    .eq-timeline { position: relative; margin-top: 4px; }
    .eq-tl-item { position: relative; padding: 0 0 18px 26px; border-left: 2px solid #ECECEF; }
    .eq-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
    .eq-tl-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #452E5A; border: 2px solid #fff; box-shadow: 0 0 0 1px #ECECEF; }
    .eq-tl-dot.checkin { background: #2563EB; } .eq-tl-dot.checkout { background: #452E5A; } .eq-tl-dot.note { background: #999; } .eq-tl-dot.maintenance { background: #E5484D; }
    .eq-tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .eq-tl-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #452E5A; }
    .eq-tl-date { font-size: 12px; color: #8B8B8B; }
    .eq-tl-cond { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: rgba(76,175,80,0.12); color: #4CAF50; }
    .eq-tl-cond.fair { background: rgba(245,158,11,0.14); color: #B45309; }
    .eq-tl-cond.repair, .eq-tl-cond.damaged { background: rgba(229,72,77,0.12); color: #E5484D; }
    .eq-tl-user { font-size: 13px; color: #1C1C1C; margin-top: 3px; }
    .eq-tl-notes { font-size: 12.5px; color: #555; margin-top: 4px; }
    .eq-tl-imgs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
    .eq-tl-imgs .eq-tl-img { width: 52px; height: 52px; border-radius: 7px; overflow: hidden; border: 1px solid #ECECEF; cursor: pointer; }
    .eq-tl-imgs .eq-tl-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .eq-tl-img-label { font-size: 9px; text-align: center; color: #8B8B8B; margin-top: 1px; }
    .eq-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 12000; display: flex; align-items: center; justify-content: center; padding: 30px; }
    .eq-lightbox img { max-width: 92%; max-height: 88%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
    .eq-lightbox-x { position: absolute; top: 20px; right: 24px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 20px; cursor: pointer; }
    .eq-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
    .eq-lb-nav:hover { background: rgba(255,255,255,0.28); }
    .eq-lb-prev { left: 24px; }
    .eq-lb-next { right: 24px; }
    .eq-lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; font-weight: 600; background: rgba(0,0,0,0.4); padding: 5px 12px; border-radius: 20px; font-family: 'DM Sans', sans-serif; }
    @media (max-width: 600px){ .eq-lb-nav { width: 42px; height: 42px; } .eq-lb-prev { left: 10px; } .eq-lb-next { right: 10px; } }
    /* Asset image gallery */
    .eq-gal-act { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid #452E5A; background: #fff; color: #452E5A; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
    .eq-gal-act:hover { background: #F2ECF8; }
    .eq-gal-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
    .eq-gal-catpick { padding: 7px 10px; border: 1px solid #E0E0E5; border-radius: 8px; font-size: 12.5px; font-family: 'DM Sans', sans-serif; color: #1C1C1C; background: #fff; cursor: pointer; outline: none; }
    .eq-gal-hint { font-size: 11.5px; color: #9A9A9A; }
    .eq-gal-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
    .eq-gal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #E6E6EA; background: #fff; border-radius: 20px; font-size: 12px; font-weight: 600; color: #555; cursor: pointer; font-family: 'DM Sans', sans-serif; }
    .eq-gal-chip .eq-gal-dot { width: 8px; height: 8px; border-radius: 50%; }
    .eq-gal-chip .eq-gal-n { color: #9A9A9A; font-weight: 700; }
    .eq-gal-chip.active { background: #452E5A; border-color: #452E5A; color: #fff; }
    .eq-gal-chip.active .eq-gal-n { color: rgba(255,255,255,0.8); }
    .eq-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
    .eq-gal-card { border: 1px solid #ECECEF; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
    .eq-gal-card:hover { box-shadow: 0 8px 22px rgba(28,20,40,0.12); transform: translateY(-2px); }
    .eq-gal-img { aspect-ratio: 4/3; background: #F4F4F6; overflow: hidden; }
    .eq-gal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .eq-gal-meta { padding: 8px 10px; }
    .eq-gal-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
    .eq-gal-sub { font-size: 11px; color: #8B8B8B; margin-top: 5px; display: flex; justify-content: space-between; }
    .eq-gal-empty { grid-column: 1/-1; font-size: 13px; color: #9A9A9A; padding: 16px 0; text-align: center; }
    #toolsListView { padding-bottom: 0; }
    #toolsDetailView { padding-bottom: 24px; }
    .tool-assigned { display: flex; flex-direction: column; gap: 2px; }
    .tool-email { font-size: 11px; color: #8B8B8B; }

    /* Tool Detail View */
    .tool-detail-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid #F0F0F0;
    }
    .tool-detail-back {
      display: flex;
      align-items: center;
      gap: 6px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      color: #1C1C1C;
      font-weight: 500;
    }
    .tool-detail-back:hover { color: #452E5A; }
    .tool-manage-btn {
      background: #452E5A;
      color: #fff;
      border: none;
      padding: 8px 24px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .tool-manage-btn:hover { background: #9688e0; }
    .tool-detail-card {
      padding: 20px;
      border-bottom: 1px solid #F0F0F0;
    }
    .tool-detail-top {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
    }
    .tool-detail-icon {
      width: 56px;
      height: 56px;
      background: #F5F5F5;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .tool-detail-title { flex: 1; }
    .tool-detail-name { font-size: 18px; font-weight: 600; color: #1C1C1C; }
    .tool-detail-subtitle { font-size: 13px; color: #8B8B8B; }
    .tool-detail-specs {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 16px;
      margin-bottom: 16px;
    }
    .tool-spec-label { font-size: 11px; color: #8B8B8B; margin-bottom: 4px; }
    .tool-spec-value { font-size: 14px; color: #1C1C1C; font-weight: 500; }
    .tool-detail-link {
      font-size: 14px;
      color: #1C1C1C;
      text-decoration: underline;
      cursor: pointer;
      margin-top: 8px;
    }
    .tool-detail-link:hover { color: #452E5A; }
    .tool-detail-section {
      padding: 20px;
      border-bottom: 1px solid #F0F0F0;
    }
    .tool-detail-section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }
    .tool-detail-section-header h3 { font-size: 16px; font-weight: 600; color: #1C1C1C; }
    .tool-section-action {
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
    }
    .tool-section-action:hover { background: rgba(69,46,90,0.1); }
    .tool-notes-list { display: flex; flex-direction: column; gap: 16px; }
    .tool-note { border-bottom: 1px solid #F5F5F5; padding-bottom: 12px; }
    .tool-note:last-child { border-bottom: none; padding-bottom: 0; }
    .tool-note-date { font-size: 12px; color: #8B8B8B; margin-bottom: 4px; }
    .tool-note-text { font-size: 14px; color: #1C1C1C; }

    /* ============================================
       TOOLS MODAL STYLES
       ============================================ */
    .tool-modal {
      background: #fff;
      border-radius: 12px;
      width: 100%;
      max-width: 480px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }
    /* Equipment modals rendered as right-side sliders (like Call review / Assignment Log) */
    #manageEquipmentModal, #addNoteModal, #toolsMaintenanceModal {
      align-items: stretch; justify-content: flex-end; padding: 0;
    }
    #manageEquipmentModal .tool-modal,
    #addNoteModal .tool-modal,
    #toolsMaintenanceModal .tool-modal {
      max-width: 440px !important; width: 100%; height: 100%; max-height: 100%;
      border-radius: 0; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,0.16);
    }
    @keyframes eqSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
    #manageEquipmentModal.show .tool-modal,
    #addNoteModal.show .tool-modal,
    #toolsMaintenanceModal.show .tool-modal { animation: eqSlideIn 0.32s cubic-bezier(0.16,1,0.3,1); }
    /* All popups render as right-side sliders EXCEPT delete / confirm dialogs */
    .modal-overlay:not(#deleteCompanyModal):not(#deleteCreditModal):not(#deleteLeaveModal):not(#deleteLoanModal):not(#deleteToolModal):not(#docDeleteModal):not(#confirmDialog):not(#convertConfirmModal):not(#passwordGate):not(#callModal):not(#callTypeModal):not(#editAuthModal) {
      align-items: stretch; justify-content: flex-end; padding: 0;
    }
    .modal-overlay:not(#deleteCompanyModal):not(#deleteCreditModal):not(#deleteLeaveModal):not(#deleteLoanModal):not(#deleteToolModal):not(#docDeleteModal):not(#confirmDialog):not(#convertConfirmModal):not(#passwordGate):not(#callModal):not(#callTypeModal):not(#editAuthModal) > * {
      width: var(--tricky-slider-w, 480px) !important; max-width: 94vw !important; height: 100% !important; max-height: 100% !important;
      border-radius: 0 !important; margin: 0 !important; overflow-y: auto !important;
      box-shadow: -8px 0 30px rgba(0,0,0,0.16) !important;
    }
    /* Per-modal slider widths — content-heavy popups get more room */
    #editProfileModal { --tricky-slider-w: 940px; }
    #invoiceDetailModal, #newInvoiceModal, #recordingsModal, #companyProfileModal, #projectSummaryModal, #editCompanyModal, #convertCandidateModal { --tricky-slider-w: 760px; }
    #editCompensationModal, #editBankingModal, #editContactModal { --tricky-slider-w: 560px; }
    #docViewFullModal { --tricky-slider-w: 820px; }
    #recordingDetailModal { --tricky-slider-w: 720px; }
    #viewPayslipModal { --tricky-slider-w: 640px; }
    #loanInvoiceModal { --tricky-slider-w: 640px; }
    #viewCreditModal { --tricky-slider-w: 760px; }
    #editCreditModal { --tricky-slider-w: 760px; }
    #addNewModal { --tricky-slider-w: min(1120px, 62vw); }
    .modal-overlay.show:not(#deleteCompanyModal):not(#deleteCreditModal):not(#deleteLeaveModal):not(#deleteLoanModal):not(#deleteToolModal):not(#docDeleteModal):not(#confirmDialog):not(#convertConfirmModal):not(#passwordGate):not(#callModal):not(#callTypeModal) > * {
      animation: eqSlideIn 0.32s cubic-bezier(0.16,1,0.3,1);
    }
    /* Hide the floating Role + Audit fabs while a slider/drawer is open */
    body:has(.modal-overlay.show) #rbacFab,
    body:has(.modal-overlay.show) #trickyAuditFab,
    body:has(.calls-review-panel.show) #rbacFab,
    body:has(.calls-review-panel.show) #trickyAuditFab { display: none !important; }
    .tool-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 24px;
      border-bottom: 1px solid #F0F0F0;
    }
    .tool-modal-header h2 { font-size: 16px; font-weight: 600; color: #1C1C1C; margin: 0; }
    .tool-modal-close {
      width: 28px; height: 28px; border: none; background: none;
      cursor: pointer; font-size: 18px; color: #484848; border-radius: 4px;
    }
    .tool-modal-close:hover { background: #F0F0F0; }
    .tool-modal-equip-info {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 24px;
      border-bottom: 1px solid #F0F0F0;
    }
    .tool-modal-equip-icon {
      width: 40px; height: 40px; background: #F5F5F5; border-radius: 8px;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .tool-modal-equip-text { flex: 1; }
    .tool-modal-equip-name { font-size: 14px; font-weight: 600; color: #1C1C1C; }
    .tool-modal-equip-sub { font-size: 12px; color: #8B8B8B; }
    .tool-modal-body { padding: 20px 24px; }

    /* Manage Equipment Options */
    .manage-option-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 16px 20px;
      background: #fff;
      border: 1px solid #E0E0E0;
      border-radius: 10px;
      font-size: 14px;
      color: #1C1C1C;
      cursor: pointer;
      margin-bottom: 10px;
      font-family: 'DM Sans', sans-serif;
      transition: all 0.15s;
    }
    .manage-option-btn:hover { border-color: #452E5A; background: rgba(69,46,90,0.04); }

    /* Manage User Section */
    .manage-user-section { margin-bottom: 20px; }
    .manage-user-label { font-size: 12px; color: #8B8B8B; margin-bottom: 10px; font-weight: 500; }
    .manage-user-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: #FAFAFA;
      border-radius: 8px;
      border: 1px solid #F0F0F0;
    }
    .manage-user-avatar {
      width: 38px; height: 38px; border-radius: 50%; display: flex;
      align-items: center; justify-content: center; font-size: 12px;
      font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .manage-user-info { flex: 1; }
    .manage-user-name { font-size: 13px; font-weight: 600; color: #1C1C1C; }
    .manage-user-email { font-size: 11px; color: #8B8B8B; }
    .manage-user-actions-inline { display: flex; gap: 12px; }
    .manage-link {
      font-size: 12px; color: #452E5A; text-decoration: none;
      font-weight: 500; cursor: pointer;
    }
    .manage-link:hover { text-decoration: underline; }
    .manage-notes-section { margin-bottom: 20px; }
    .manage-notes-section label { font-size: 12px; color: #484848; font-weight: 500; display: block; margin-bottom: 6px; }
    .manage-notes-section textarea {
      width: 100%; padding: 10px 12px; border: 1px solid #E0E0E0; border-radius: 6px;
      font-size: 13px; font-family: 'DM Sans', sans-serif; resize: vertical; outline: none;
    }
    .manage-notes-section textarea:focus { border-color: #452E5A; }
    .manage-actions {
      display: flex; justify-content: space-between; align-items: center;
      padding-top: 16px; border-top: 1px solid #F0F0F0;
    }

    /* Success State */
    .manage-success {
      display: flex; flex-direction: column; align-items: center;
      padding: 32px 20px; text-align: center; gap: 16px;
    }
    .manage-success p { font-size: 14px; color: #484848; line-height: 1.5; max-width: 280px; }

    /* Assignment Log */
    .assignment-log-list { display: flex; flex-direction: column; gap: 0; }
    .assignment-log-entry {
      padding: 14px 0;
      border-bottom: 1px solid #F5F5F5;
    }
    .assignment-log-entry:last-child { border-bottom: none; }
    .assignment-log-date {
      font-size: 11px; color: #8B8B8B; margin-bottom: 8px;
      display: flex; align-items: center; gap: 8px;
    }
    .assignment-log-tag {
      font-size: 10px; padding: 2px 8px; border-radius: 4px;
      font-weight: 500;
    }
    .assignment-log-tag.current {
      background: rgba(69,46,90,0.1); color: #452E5A;
    }
    .assignment-log-user {
      display: flex; align-items: center; gap: 10px;
    }

    /* Equipment Images */
    .equip-images-main { display: flex; flex-direction: column; gap: 12px; }
    .equip-image-large { width: 100%; }
    .equip-images-label { font-size: 12px; color: #8B8B8B; font-weight: 500; }
    .equip-images-thumbs { display: flex; gap: 10px; }
    .equip-thumb {
      width: 72px; height: 54px; border-radius: 6px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      border: 2px solid transparent; transition: border-color 0.15s;
    }
    .equip-thumb.active, .equip-thumb:hover { border-color: #452E5A; }

    /* ============================================
       FORMS TAB STYLES
       ============================================ */
    .forms-layout {
      display: flex;
      min-height: 340px;
    }
    .forms-sidebar {
      width: 260px;
      border-right: 1px solid #F0F0F0;
      flex-shrink: 0;
      overflow-y: auto;
      background: #fff;
    }

    /* Accordion Header */
    .forms-accordion { border-bottom: 1px solid #F0F0F0; }
    .forms-accordion-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      color: #484848;
      transition: color 0.15s;
      font-family: 'DM Sans', sans-serif;
      background: none;
      border: none;
      width: 100%;
      text-align: left;
    }
    .forms-accordion-header:hover { color: #452E5A; }
    .forms-accordion-header.active { color: #452E5A; font-weight: 600; }
    .forms-accordion-arrow {
      transition: transform 0.25s ease;
      flex-shrink: 0;
      color: #452E5A;
    }
    .forms-accordion-header.active .forms-accordion-arrow {
      transform: rotate(0deg);
    }
    .forms-accordion-header:not(.active) .forms-accordion-arrow {
      transform: rotate(-90deg);
    }

    /* Accordion Body (step list) */
    .forms-accordion-body {
      max-height: 800px;
      overflow-y: auto;
      transition: max-height 0.3s ease, padding 0.3s ease;
      padding: 0 12px 8px 12px;
    }
    .forms-accordion-body.collapsed {
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
      overflow: hidden;
    }

    /* Step Items in Sidebar */
    .forms-step-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      color: #484848;
      transition: all 0.15s;
      position: relative;
      font-family: 'DM Sans', sans-serif;
      line-height: 1.3;
    }
    .forms-step-item:hover { background: rgba(69,46,90,0.06); }
    .forms-step-item.active {
      background: rgba(69,46,90,0.1);
      color: #1C1C1C;
      font-weight: 500;
      border-left: 3px solid #452E5A;
      margin-left: -3px;
    }
    .forms-step-item span:first-of-type:not(.forms-step-subtitle) { flex: 1; }
    .forms-step-subtitle {
      display: block;
      font-size: 10px;
      color: #8B8B8B;
      font-weight: 400;
      margin-top: 1px;
    }

    /* Step Status Icons */
    .forms-step-icon {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      border: 1.5px solid #D0D0D0;
      background: #fff;
    }
    .forms-step-icon.completed {
      background: #452E5A;
      border-color: #452E5A;
    }
    .forms-step-icon.completed svg { stroke: #fff; }
    .forms-step-icon.pending {
      border-color: #452E5A;
      border-style: dashed;
      background: rgba(69,46,90,0.06);
    }
    .forms-step-item.active .forms-step-icon {
      border-color: #452E5A;
      box-shadow: 0 0 0 3px rgba(69,46,90,0.15);
    }

    /* Other Form Categories */
    .forms-category {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      cursor: pointer;
      font-size: 14px;
      color: #484848;
      border-bottom: 1px solid #F5F5F5;
      transition: all 0.15s;
      font-family: 'DM Sans', sans-serif;
      font-weight: 500;
    }
    .forms-category:hover { background: rgba(69,46,90,0.04); color: #452E5A; }
    .forms-category.active {
      color: #452E5A;
      font-weight: 600;
      background: rgba(69,46,90,0.06);
      border-left: 3px solid #452E5A;
    }
    .forms-category svg { opacity: 0.3; flex-shrink: 0; }
    .forms-category:hover svg { opacity: 0.6; }
    .forms-category.active svg { opacity: 1; stroke: #452E5A; }

    /* Forms Content Area */
    .forms-content {
      flex: 1;
      overflow-y: auto;
    }
    .form-panel { padding: 24px; }
    .form-panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }
    .form-panel-header h3 { font-size: 18px; font-weight: 600; color: #1C1C1C; }
    .form-step-indicator { font-size: 13px; color: #8B8B8B; font-weight: 500; }

    /* Form Fields */
    .form-row {
      display: flex;
      gap: 16px;
      margin-bottom: 16px;
    }
    .form-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .form-group.full { flex: 0 0 100%; }
    .form-group label {
      font-size: 12px;
      color: #484848;
      font-weight: 500;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
      padding: 10px 12px;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      color: #1C1C1C;
      background: #fff;
      outline: none;
      transition: border-color 0.15s;
    }
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
      border-color: #452E5A;
    }
    .form-group textarea { resize: vertical; }
    .file-upload-area {
      border: 2px dashed #E0E0E0;
      border-radius: 8px;
      padding: 24px;
      text-align: center;
      color: #8B8B8B;
      font-size: 13px;
      cursor: pointer;
      transition: border-color 0.15s;
    }
    .file-upload-area:hover { border-color: #452E5A; }
    .signature-area {
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      padding: 20px;
      min-height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #FAFAFA;
    }

    /* Form Actions */
    .form-actions {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 20px;
      border-top: 1px solid #F0F0F0;
      margin-top: 20px;
    }
    .form-actions-left { display: flex; gap: 8px; }
    .form-btn-primary {
      background: #452E5A;
      color: #fff;
      border: none;
      padding: 10px 28px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .form-btn-primary:hover { background: #9688e0; }
    .form-btn-secondary {
      background: #fff;
      color: #484848;
      border: 1px solid #E0E0E0;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .form-btn-secondary:hover { border-color: #452E5A; color: #452E5A; }
    .form-btn-outline {
      background: transparent;
      color: #484848;
      border: 1px solid #E0E0E0;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
    }
    .form-btn-outline:hover { border-color: #452E5A; color: #452E5A; }
    
    /* Loan Styles */
    .loan-detail-back {
      width: 32px;
      height: 38px;
      border: none;
      background: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 8px;
    }
    .loan-detail-back svg {
      width: 18px;
      height: 18px;
      color: #484848;
    }
    .loan-detail-back:hover svg {
      color: #452E5A;
    }
    .loan-name {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .loan-icon {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .loan-icon svg {
      width: 20px;
      height: 20px;
    }
    #tabLOANS .profile-table tbody tr {
      cursor: pointer;
    }
    #tabLOANS .profile-table tbody tr:hover {
      background: rgba(69,46,90,0.05);
    }
    .loan-detail-header {
      padding: 8px 0 16px 0;
    }
    .loan-back-btn {
      width: 32px;
      height: 32px;
      border: none;
      background: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .loan-back-btn svg {
      width: 20px;
      height: 20px;
      color: #484848;
    }
    .loan-summary {
      background: transparent;
      padding: 24px;
      margin: 0 24px;
    }
    .loan-summary-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 24px;
      margin-bottom: 24px;
      padding-bottom: 24px;
      border-bottom: 1px solid #F0F0F0;
    }
    .loan-summary-row:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }
    .loan-summary-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .loan-summary-item label {
      font-size: 11px;
      color: #8B8B8B;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .loan-summary-item span {
      font-size: 15px;
      color: #1C1C1C;
      font-weight: 500;
    }
    .loan-stats {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 24px;
      padding: 20px 24px;
      background: rgba(69,46,90,0.08);
      margin: 0 24px 24px 24px;
      border-radius: 8px;
    }
    .loan-stat {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .loan-stat label {
      font-size: 11px;
      color: #6B6B6B;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .loan-stat span {
      font-size: 15px;
      color: #1C1C1C;
      font-weight: 500;
    }
    .loan-payments-table {
      margin: 0 24px;
      background: transparent;
    }
    .loan-payments-table thead tr {
      background: transparent;
    }
    .loan-payments-table th {
      color: #452E5A !important;
      border-bottom: 1px solid #E0E0E0;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .loan-payments-table td {
      color: #1C1C1C !important;
      border-bottom: 1px solid #F0F0F0;
    }
    .loan-payments-table tbody tr:hover {
      background: rgba(69,46,90,0.05);
    }
    
    /* Loan Quick Summary Cards */
    .loan-quick-summary {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin: 0 24px 16px 24px;
    }
    .loan-quick-card {
      background: #fff;
      border-radius: 8px;
      padding: 16px;
      display: flex;
      align-items: flex-start;
      gap: 12px;
      border: 1px solid #F0F0F0;
    }
    .quick-card-icon {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      background: rgba(69,46,90,0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .quick-card-icon svg {
      width: 20px;
      height: 20px;
      color: #452E5A;
    }
    .quick-card-icon.good {
      background: rgba(76, 175, 80, 0.15);
    }
    .quick-card-icon.good svg {
      color: #4CAF50;
    }
    .quick-card-content {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .quick-card-content label {
      font-size: 11px;
      color: #8B8B8B;
    }
    .quick-card-value {
      font-size: 16px;
      font-weight: 600;
      color: #1C1C1C;
    }
    .quick-card-value.good {
      color: #4CAF50;
    }
    .quick-card-sub {
      font-size: 12px;
      color: #452E5A;
    }
    
    /* Loan Progress Bar */
    .loan-progress-section {
      background: #fff;
      margin: 0 24px 16px 24px;
      padding: 20px 24px;
      border-radius: 8px;
      border: 1px solid #F0F0F0;
    }
    .progress-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }
    .progress-label {
      font-size: 14px;
      font-weight: 500;
      color: #1C1C1C;
    }
    .progress-percent {
      font-size: 14px;
      font-weight: 600;
      color: #452E5A;
    }
    .progress-bar-container {
      height: 12px;
      background: #F0F0F0;
      border-radius: 6px;
      overflow: hidden;
      margin-bottom: 12px;
    }
    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #452E5A 0%, #36234A 100%);
      border-radius: 6px;
      transition: width 0.5s ease;
    }
    .progress-amounts {
      display: flex;
      gap: 24px;
    }
    .progress-paid, .progress-remaining {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: #8B8B8B;
    }
    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }
    .dot.paid {
      background: #452E5A;
    }
    .dot.remaining {
      background: #E0E0E0;
    }
    
    /* Loan Details Grid - Organized Cards */
    .loan-details-container {
      margin: 0 24px 20px 24px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }
    .loan-detail-card {
      background: #fff;
      border-radius: 12px;
      padding: 20px 22px;
      border: 1px solid #F0F0F0;
    }
    .loan-detail-card:hover {
      background: #fff;
      border-color: #F0F0F0;
      box-shadow: none;
    }
    .loan-detail-card-title {
      font-size: 14px;
      font-weight: 700;
      color: #452E5A;
      margin-bottom: 20px;
      padding-bottom: 0;
      padding-left: 0;
      border-bottom: none;
      border-left: none;
      line-height: 1.1;
    }

    /* Loan list status chips */
    .loan-status-chip { display:inline-block; padding:3px 11px; border-radius:999px; font-size:11.5px; font-weight:700; }
    .loan-st-active  { background:#EAF7EE; color:#2E7D32; }
    .loan-st-paid    { background:#E8F0FE; color:#1A56DB; }
    .loan-st-pending { background:#FFF1DD; color:#B26A00; }
    .loan-st-rejected { background:rgba(229,57,53,0.12); color:#E53935; }
    .loan-type-chip  { display:inline-block; padding:3px 11px; border-radius:999px; font-size:12px; font-weight:600; background:#F0EEF4; color:#5B4A6B; }

    /* Loan list table — same polished look as Payment History */
    .loan-list-table { border-collapse: collapse; }
    .loan-list-table thead tr { background: rgba(69,46,90,0.06); }
    .loan-list-table th {
      color: #452E5A !important;
      border-bottom: none;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 14px 16px !important;
    }
    .loan-list-table td {
      color: #1C1C1C !important;
      border-bottom: 1px solid #F0F0F0;
      padding: 14px 16px !important;
    }
    .loan-list-table tbody tr { cursor: pointer; }
    .loan-list-table tbody tr:hover { background: rgba(69,46,90,0.05); }

    /* Loan detail header bar */
    .loan-detail-topbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 24px 16px 24px; }
    .loan-back-icon { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; background:none; border:none; border-radius:8px; color:#1C1C1C; cursor:pointer; padding:0; }
    .loan-back-icon:hover { background:#F1F0F4; }
    .loan-detail-heading { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .loan-detail-name { font-size:18px; font-weight:700; color:#1C1C1C; }
    .loan-detail-id { margin-left:auto; font-size:12px; color:#9A9AA5; }

    .loan-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }
    .loan-detail-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .loan-detail-item label {
      font-size: 11px;
      color: #8B8B8B;
    }
    .loan-detail-item span {
      font-size: 15px;
      color: #1C1C1C;
      font-weight: 500;
    }
    .loan-detail-item span.highlight {
      color: #4CAF50;
      font-weight: 600;
    }
    
    /* Loan Stats Bar */
    .loan-stats {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
      padding: 20px 24px;
      background: #fff;
      margin: 0 24px 24px 24px;
      border-radius: 12px;
      border: 1px solid #F0F0F0;
    }
    .loan-stat {
      display: flex;
      flex-direction: column;
      gap: 6px;
      text-align: center;
    }
    .loan-stat label {
      font-size: 10px;
      color: #8B8B8B;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .loan-stat span {
      font-size: 16px;
      color: #452E5A;
      font-weight: 600;
    }
    
    /* Payment History Section */
    .loan-payments-section {
      margin: 0 24px 24px 24px;
      background: #fff;
      border: 1px solid #F0F0F0;
      border-radius: 12px;
      padding: 18px 0 0 0;
      overflow: hidden;
    }
    .loan-payments-title {
      font-size: 14px;
      font-weight: 700;
      color: #452E5A;
      margin-bottom: 14px;
      padding: 0 18px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .loan-payments-title::before {
      content: none;
    }
    .loan-payments-table {
      background: transparent;
      width: 100%;
      margin: 0;
      border-collapse: collapse;
    }
    .loan-payments-table thead tr {
      background: rgba(69,46,90,0.06);
    }
    .loan-payments-table th {
      color: #452E5A !important;
      border-bottom: none;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 12px 14px !important;
    }
    .loan-payments-table td {
      color: #1C1C1C !important;
      border-bottom: 1px solid #F0F0F0;
      padding: 13px 14px !important;
    }
    .loan-payments-table tbody tr:hover {
      background: rgba(69,46,90,0.05);
    }
    
    /* ── Share Modal (minimalist) ── */
    .share-modal {
      background: #fff;
      border-radius: 14px;
      max-width: 480px;
      width: 92vw;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    }
    .share-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 18px 22px 14px;
      border-bottom: 1px solid #F0F0F2;
    }
    .share-modal-header h3 {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
      color: #1C1C1C;
      letter-spacing: -0.2px;
    }
    .share-header-actions { display: flex; align-items: center; gap: 4px; }
    .share-history-link {
      background: none; border: none; cursor: pointer;
      font-size: 11px; color: #8B8B8B; padding: 5px 8px; border-radius: 6px;
      display: inline-flex; align-items: center; gap: 4px;
      font-family: inherit; font-weight: 600;
      transition: all 0.15s;
    }
    .share-history-link:hover { background: #F5F5F7; color: #452E5A; }
    .share-close {
      width: 28px; height: 28px;
      background: none; border: none; cursor: pointer;
      font-size: 20px; color: #8B8B8B; border-radius: 6px;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .share-close:hover { background: #F5F5F7; color: #1C1C1C; }
    .share-modal-body {
      padding: 16px 22px;
      overflow-y: auto;
      flex: 1;
    }
    .share-section { margin-bottom: 14px; }
    .share-section:last-of-type { margin-bottom: 0; }
    .share-label {
      font-size: 10px;
      font-weight: 700;
      color: #8B8B8B;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-bottom: 6px;
      display: block;
    }
    .share-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
    .share-label-row .share-label { margin-bottom: 0; }
    .share-hint { font-size: 10px; color: #ABABAB; font-weight: 500; }
    .share-item {
      padding: 10px 12px;
      background: #F8F4FB;
      border: 1px solid #EFE8F6;
      border-radius: 8px;
      font-size: 13px;
      color: #1C1C1C;
      display: flex; align-items: center; gap: 8px;
    }
    .share-item::before {
      content: ''; width: 6px; height: 6px; border-radius: 50%;
      background: #452E5A; flex-shrink: 0;
    }
    .share-recipients-input {
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      padding: 5px 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      background: #fff;
      min-height: 36px;
      align-items: center;
      cursor: text;
      transition: border-color 0.15s;
    }
    .share-recipients-input:focus-within { border-color: #452E5A; }
    .share-chip {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 3px 4px 3px 9px;
      background: #EFE8F6;
      color: #452E5A;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 500;
      max-width: 220px;
    }
    .share-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .share-chip button {
      background: none; border: none; cursor: pointer;
      color: #452E5A; font-size: 14px; line-height: 1;
      padding: 0 5px; border-radius: 50%;
      width: 18px; height: 18px;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .share-chip button:hover { background: rgba(69,46,90,0.15); }
    .share-recipients-input input {
      flex: 1;
      min-width: 100px;
      border: none;
      outline: none;
      font-family: inherit;
      font-size: 13px;
      padding: 4px 4px;
      background: transparent;
      color: #1C1C1C;
    }
    .share-recent-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      align-items: center;
    }
    .share-recent-label {
      font-size: 10px;
      color: #ABABAB;
      font-weight: 700;
      margin-right: 2px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .share-pill {
      padding: 4px 10px;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 12px;
      font-size: 11px;
      color: #3A3A3A;
      cursor: pointer;
      font-family: inherit;
      font-weight: 500;
      transition: all 0.15s;
    }
    .share-pill:hover { background: #EFE8F6; color: #452E5A; border-color: #D7C8E4; }
    .share-methods {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
    }
    .share-method {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 9px 8px;
      border: 1px solid #E0E0E5;
      border-radius: 7px;
      cursor: pointer;
      font-size: 12px;
      color: #3A3A3A;
      background: #fff;
      transition: all 0.15s;
      font-weight: 500;
    }
    .share-method:hover { border-color: #D7C8E4; }
    .share-method input { display: none; }
    .share-method:has(input:checked) {
      border-color: #452E5A;
      background: #F8F4FB;
      color: #452E5A;
      font-weight: 700;
    }
    .share-modal-body textarea {
      width: 100%;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      padding: 9px 11px;
      font-family: inherit;
      font-size: 13px;
      resize: vertical;
      box-sizing: border-box;
      background: #fff;
      color: #1C1C1C;
      transition: border-color 0.15s;
    }
    .share-modal-body textarea:focus { border-color: #452E5A; outline: none; }
    .share-advanced {
      border-top: 1px solid #F0F0F2;
      padding-top: 12px;
      margin-top: 12px;
    }
    .share-advanced summary {
      cursor: pointer;
      font-size: 11px;
      color: #8B8B8B;
      font-weight: 700;
      letter-spacing: 0.3px;
      text-transform: uppercase;
      list-style: none;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 2px 0;
      user-select: none;
    }
    .share-advanced summary::-webkit-details-marker { display: none; }
    .share-advanced summary::before {
      content: ''; display: inline-block;
      width: 0; height: 0;
      border-left: 4px solid #8B8B8B;
      border-top: 4px solid transparent;
      border-bottom: 4px solid transparent;
      transition: transform 0.15s;
    }
    .share-advanced[open] summary::before { transform: rotate(90deg); }
    .share-advanced summary:hover { color: #452E5A; }
    .share-advanced summary:hover::before { border-left-color: #452E5A; }
    .share-advanced-content {
      padding: 10px 0 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .share-check {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: #3A3A3A;
      cursor: pointer;
      user-select: none;
    }
    .share-check input { accent-color: #452E5A; margin: 0; cursor: pointer; }
    .share-divider { border-top: 1px solid #F0F0F2; margin: 4px 0; }
    .share-field {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      color: #3A3A3A;
    }
    .share-field select {
      border: 1px solid #E0E0E5;
      border-radius: 6px;
      padding: 4px 8px;
      font-family: inherit;
      font-size: 12px;
      background: #fff;
      color: #1C1C1C;
      cursor: pointer;
    }
    .share-field select:focus { outline: none; border-color: #452E5A; }
    .share-modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 14px 22px;
      border-top: 1px solid #F0F0F2;
    }
    .share-btn-secondary {
      padding: 9px 18px;
      background: none;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #3A3A3A;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.15s;
    }
    .share-btn-secondary:hover { background: #F5F5F7; }
    .share-btn-primary {
      padding: 9px 22px;
      background: #452E5A;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #fff;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
    }
    .share-btn-primary:hover { background: #5B3D76; }
    /* Share History rows */
    .share-history-empty {
      padding: 40px 0;
      text-align: center;
      color: #ABABAB;
      font-size: 13px;
    }
    .share-history-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 11px 0;
      border-bottom: 1px solid #F5F5F7;
      gap: 12px;
    }
    .share-history-row:last-child { border-bottom: none; }
    .share-history-main { flex: 1; min-width: 0; }
    .share-history-payload {
      font-size: 13px;
      font-weight: 600;
      color: #1C1C1C;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .share-history-meta {
      font-size: 11px;
      color: #8B8B8B;
      margin-top: 2px;
    }
    .share-history-status {
      font-size: 9px;
      padding: 3px 8px;
      border-radius: 10px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .share-status-sent { background: #F0F0F2; color: #6B6B6B; }
    .share-status-delivered { background: #E6F0FB; color: #2563EB; }
    .share-status-opened { background: #E6F7EE; color: #2F7A4D; }
    .share-status-downloaded { background: #E6F7EE; color: #2F7A4D; }
    .share-status-copied { background: #E6F7EE; color: #2F7A4D; }
    .share-status-failed { background: #FEF2F2; color: #C53030; }
    .context-menu-item-subtle { color: #8B8B8B; font-size: 12px; }

    /* ── Mini Select (searchable, for large data dropdowns) ── */
    .mini-select-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 140px;
      height: 32px;
      padding: 0 10px 0 12px;
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 6px;
      font-size: 12px;
      font-family: 'DM Sans', sans-serif;
      color: #484848;
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
      box-sizing: border-box;
    }
    .mini-select-trigger:hover { border-color: #D0D0D5; }
    .mini-select-trigger.active { border-color: #452E5A; }
    .mini-select-trigger .ms-label {
      flex: 1; text-align: left;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mini-select-trigger .ms-caret {
      color: #8B8B8B; flex-shrink: 0;
      transition: transform 0.15s;
    }
    .mini-select-trigger.active .ms-caret { transform: rotate(180deg); }

    #miniSelectPopover {
      position: fixed;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      z-index: 5000;
      min-width: 240px;
      max-width: 360px;
      max-height: 340px;
      display: none;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      overflow: hidden;
    }
    #miniSelectPopover.show { display: flex; }
    .mini-select-search {
      display: flex; align-items: center; gap: 8px;
      padding: 9px 12px;
      border-bottom: 1px solid #F0F0F2;
    }
    .mini-select-search svg { color: #ABABAB; flex-shrink: 0; }
    .mini-select-search input {
      flex: 1; border: none; outline: none;
      font-family: inherit; font-size: 13px;
      background: transparent;
      color: #1C1C1C;
    }
    .mini-select-list {
      flex: 1;
      overflow-y: auto;
      padding: 4px;
    }
    .mini-select-section-label {
      font-size: 9px; font-weight: 700;
      color: #ABABAB;
      text-transform: uppercase; letter-spacing: 0.4px;
      padding: 8px 10px 4px;
    }
    .mini-select-item {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 10px;
      font-size: 13px;
      color: #1C1C1C;
      cursor: pointer;
      border-radius: 6px;
    }
    .mini-select-item:hover { background: rgba(69,46,90,0.06); color: #452E5A; }
    .mini-select-item.focused { background: rgba(69,46,90,0.1); color: #452E5A; }
    .mini-select-item.selected { background: rgba(69,46,90,0.08); color: #452E5A; font-weight: 600; }
    .mini-select-item-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mini-select-star {
      width: 18px; height: 18px;
      background: none; border: none; padding: 0;
      color: #D0D0D5;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; line-height: 1;
      opacity: 0;
      transition: opacity 0.15s, color 0.15s;
      border-radius: 50%;
    }
    .mini-select-item:hover .mini-select-star,
    .mini-select-item.focused .mini-select-star,
    .mini-select-star.is-fav { opacity: 1; }
    .mini-select-star.is-fav { color: #F5B400; }
    .mini-select-star:hover { color: #F5B400; background: rgba(245,180,0,0.1); }
    .mini-select-empty {
      padding: 22px 14px;
      text-align: center;
      color: #ABABAB;
      font-size: 12px;
    }
    .mini-select-divider { border-top: 1px solid #F0F0F2; margin: 4px 0; }

    /* ── Comm Hub (header icons + dropdown panels) ── */
    .comm-btn { position: relative; }
    .comm-badge {
      position: absolute;
      top: 1px; right: 1px;
      min-width: 14px; height: 14px;
      padding: 0 4px;
      background: #452E5A;
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      line-height: 1;
      border: 1.5px solid #FAFAFA;
      pointer-events: none;
      letter-spacing: 0;
    }
    .comm-badge.hidden { display: none; }
    #commPanel {
      position: fixed;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      z-index: 5000;
      width: 340px;
      max-height: 480px;
      display: none;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      overflow: hidden;
    }
    #commPanel.show { display: flex; }
    .comm-panel-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 14px 16px 12px;
      border-bottom: 1px solid #F0F0F2;
    }
    .comm-panel-title {
      font-size: 13px; font-weight: 700; color: #1C1C1C;
    }
    .comm-panel-mark {
      background: none; border: none;
      font-size: 11px; color: #8B8B8B;
      cursor: pointer;
      padding: 4px 6px; border-radius: 4px;
      font-family: inherit; font-weight: 500;
      transition: all 0.15s;
    }
    .comm-panel-mark:hover { color: #452E5A; background: #F5F5F7; }
    .comm-panel-list {
      flex: 1; overflow-y: auto;
      padding: 4px;
    }
    .comm-item {
      display: flex; align-items: flex-start; gap: 8px;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.15s;
      position: relative;
    }
    .comm-item:hover { background: #FAFAFA; }
    .comm-item.unread::before {
      content: ''; position: absolute;
      left: 4px; top: 16px;
      width: 6px; height: 6px;
      border-radius: 50%;
      background: #452E5A;
    }
    .comm-item.unread { padding-left: 20px; }
    .comm-item-body { flex: 1; min-width: 0; }
    .comm-item-row1 {
      display: flex; justify-content: space-between; align-items: baseline;
      gap: 8px;
    }
    .comm-item-name {
      font-size: 13px; font-weight: 600; color: #1C1C1C;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      flex: 1; min-width: 0;
      display: flex; align-items: center; gap: 6px;
    }
    .comm-item.read .comm-item-name { font-weight: 500; color: #6B6B6B; }
    .comm-item-time {
      font-size: 11px; color: #ABABAB;
      flex-shrink: 0;
    }
    .comm-item-snippet {
      font-size: 12px; color: #8B8B8B;
      margin-top: 2px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .comm-item-kind {
      font-size: 9px; font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      padding: 1px 6px;
      border-radius: 8px;
      flex-shrink: 0;
    }
    .comm-item-kind.missed { background: #FEF2F2; color: #C53030; }
    .comm-item-kind.voicemail { background: #EFE8F6; color: #452E5A; }
    .comm-item-kind.incoming { background: #E6F0FB; color: #2563EB; }
    .comm-item-kind.outgoing { background: #E6F7EE; color: #2F7A4D; }
    .comm-panel-empty {
      padding: 36px 16px;
      text-align: center;
      color: #ABABAB; font-size: 12px;
    }
    .comm-panel-footer {
      border-top: 1px solid #F0F0F2;
      padding: 10px 16px;
      text-align: center;
    }
    .comm-panel-footer a {
      font-size: 12px; color: #452E5A; font-weight: 600;
      text-decoration: none;
    }
    .comm-panel-footer a:hover { text-decoration: underline; }

    /* ── Confirm Dialog (minimalist "Are you sure?" for sensitive actions) ── */
    .confirm-modal {
      background: #fff;
      border-radius: 14px;
      max-width: 380px;
      width: 92vw;
      padding: 22px 24px 18px;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 14px 44px rgba(0,0,0,0.16);
      animation: confirmIn 0.15s ease;
    }
    @keyframes confirmIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
    .confirm-title {
      margin: 0 0 6px;
      font-size: 15px; font-weight: 700;
      color: #1C1C1C;
      letter-spacing: -0.2px;
    }
    .confirm-message {
      margin: 0;
      font-size: 13px; color: #6B6B6B;
      line-height: 1.5;
    }
    .confirm-actions {
      display: flex; justify-content: flex-end;
      gap: 8px; margin-top: 18px;
    }
    .confirm-actions button {
      padding: 9px 18px;
      border-radius: 8px;
      font-size: 13px; font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s, border-color 0.15s;
    }
    .confirm-cancel {
      background: none;
      border: 1px solid #E0E0E5;
      color: #3A3A3A;
    }
    .confirm-cancel:hover { background: #F5F5F7; }
    .confirm-confirm {
      background: #452E5A;
      border: 1px solid #452E5A;
      color: #fff;
    }
    .confirm-confirm:hover { background: #5B3D76; }
    .confirm-confirm.danger {
      background: #C53030;
      border-color: #C53030;
    }
    .confirm-confirm.danger:hover { background: #9B2C2C; }

    /* ── Type Switcher (Contractor / Employee / Candidate / Prospect) ── */
    .type-switcher {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 4px 8px 4px 10px;
      background: #F5F5F7;
      border: 1px solid #E2E2E6;
      border-radius: 14px;
      font-size: 13px; font-weight: 500;
      color: #1C1C1C;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: border-color 0.15s, background 0.15s;
      margin-top: 4px;
    }
    .type-switcher:hover { border-color: #C8C8CD; background: #EEEEF1; }
    .type-switcher.active { border-color: #452E5A; background: #fff; }
    .type-switcher .type-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: #452E5A;
      flex-shrink: 0;
    }
    .type-switcher .type-label { white-space: nowrap; }
    .type-switcher .type-caret {
      width: 11px; height: 11px;
      color: #8B8B8B;
      transition: transform 0.15s;
    }
    .type-switcher.active .type-caret { transform: rotate(180deg); }
    #typeSwitcherPopover {
      position: fixed;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      z-index: 5500;
      min-width: 200px;
      padding: 4px;
      display: none;
      font-family: 'DM Sans', sans-serif;
    }
    #typeSwitcherPopover.show { display: block; }
    .type-option {
      display: flex; align-items: center; gap: 9px;
      padding: 9px 12px;
      font-size: 13px;
      color: #1C1C1C;
      cursor: pointer;
      border-radius: 6px;
      transition: background 0.15s;
    }
    .type-option:hover { background: rgba(69,46,90,0.06); }
    .type-option-dot {
      width: 8px; height: 8px; border-radius: 50%;
      flex-shrink: 0;
    }
    .type-option-text { flex: 1; }
    .type-option-check {
      width: 14px; height: 14px;
      color: #452E5A;
      opacity: 0;
      flex-shrink: 0;
    }
    .type-option.current { background: rgba(69,46,90,0.06); font-weight: 600; }
    .type-option.current .type-option-check { opacity: 1; }

    /* ── Department picker (typeable: search OR type a new one) ── */
    #deptPopover,
    #companyPopover {
      position: fixed;
      background: #fff;
      border: 1px solid #ECECEF;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      z-index: 5500;
      min-width: 260px;
      max-width: 320px;
      max-height: 380px;
      display: none;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      overflow: hidden;
    }
    #deptPopover.show,
    #companyPopover.show { display: flex; }
    .dept-search {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 12px;
      border-bottom: 1px solid #F0F0F2;
    }
    .dept-search svg { color: #ABABAB; flex-shrink: 0; }
    .dept-search input {
      flex: 1; border: none; outline: none;
      font-family: inherit; font-size: 13px;
      background: transparent;
      color: #1C1C1C;
    }
    .dept-list { flex: 1; overflow-y: auto; padding: 4px; }
    .dept-option {
      display: flex; align-items: center; gap: 8px;
      padding: 9px 12px;
      font-size: 13px;
      color: #1C1C1C;
      cursor: pointer;
      border-radius: 6px;
    }
    .dept-option:hover, .dept-option.focused {
      background: rgba(69,46,90,0.08);
      color: #452E5A;
    }
    .dept-option.current { background: rgba(69,46,90,0.06); font-weight: 600; }
    .dept-option-text { flex: 1; }
    .dept-option-check {
      width: 14px; height: 14px;
      color: #452E5A;
      opacity: 0;
      flex-shrink: 0;
    }
    .dept-option.current .dept-option-check { opacity: 1; }
    .dept-option.add-new {
      border-top: 1px solid #F0F0F2;
      margin-top: 2px;
      color: #452E5A;
    }
    .dept-option.add-new .new-prefix {
      color: #8B8B8B; font-weight: 500;
      margin-right: 6px;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .dept-empty {
      padding: 20px 14px;
      text-align: center;
      color: #ABABAB;
      font-size: 12px;
    }

    /* ── Auto-calc badge + value sub-label (used on Compensation card) ── */
    .auto-badge {
      display: inline-block;
      font-size: 9px; font-weight: 600;
      color: #8B8B8B;
      background: #F0F0F2;
      padding: 1px 6px;
      border-radius: 7px;
      margin-left: 5px;
      vertical-align: middle;
      text-transform: lowercase;
      letter-spacing: 0.2px;
    }
    .value-sub {
      display: block;
      font-size: 11px;
      color: #8B8B8B;
      margin-top: 3px;
      font-weight: 400;
    }

    /* ── Section Edit Popups (focused per-card modals) ── */
    .section-edit-modal {
      background: #fff;
      border-radius: 14px;
      max-width: 560px;
      width: 92vw;
      max-height: 86vh;
      display: flex;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 14px 44px rgba(0,0,0,0.16);
      overflow: hidden;
      animation: confirmIn 0.15s ease;
    }
    .section-edit-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 18px 22px 14px;
      border-bottom: 1px solid #F0F0F2;
    }
    .section-edit-header h3 {
      margin: 0;
      font-size: 15px; font-weight: 700;
      color: #1C1C1C;
      letter-spacing: -0.2px;
    }
    .section-edit-close {
      background: none; border: none;
      width: 28px; height: 28px;
      border-radius: 50%;
      font-size: 20px; line-height: 1;
      color: #8B8B8B; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s, color 0.15s;
    }
    .section-edit-close:hover { background: #F5F5F7; color: #1C1C1C; }
    .section-edit-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
    .section-edit-row {
      display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
      margin-bottom: 14px;
    }
    .section-edit-row.full { grid-template-columns: 1fr; }
    .section-edit-row .field label {
      display: block;
      font-size: 10px; font-weight: 700;
      color: #8B8B8B;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      margin-bottom: 5px;
    }
    .section-edit-row .field input,
    .section-edit-row .field select,
    .section-edit-row .field textarea {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      font-size: 13px;
      font-family: inherit;
      background: #fff;
      color: #1C1C1C;
      box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .section-edit-row .field input:focus,
    .section-edit-row .field select:focus,
    .section-edit-row .field textarea:focus {
      outline: none;
      border-color: #452E5A;
    }
    .section-edit-row .field input[readonly] {
      background: #FAFAFA;
      color: #6B6B6B;
      cursor: default;
    }
    .section-edit-footer {
      display: flex; justify-content: flex-end; gap: 8px;
      padding: 14px 22px;
      border-top: 1px solid #F0F0F2;
      background: #FAFAFA;
    }
    .section-edit-footer .btn-cancel {
      padding: 9px 18px;
      background: none;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      font-size: 13px; font-weight: 600;
      cursor: pointer; color: #3A3A3A;
      font-family: inherit;
      transition: background 0.15s;
    }
    .section-edit-footer .btn-cancel:hover { background: #F5F5F7; }
    .section-edit-footer .btn-save {
      padding: 9px 18px;
      background: #452E5A;
      border: 1px solid #452E5A;
      border-radius: 8px;
      font-size: 13px; font-weight: 600;
      color: #fff; cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
    }
    .section-edit-footer .btn-save:hover { background: #5B3D76; }

    /* ── Password Gate — protect every edit on the personnel profile ── */
    #passwordGate { z-index: 6500; }
    .password-gate-modal {
      background: #fff;
      border-radius: 14px;
      max-width: 380px;
      width: 92vw;
      padding: 28px 28px 22px;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 14px 44px rgba(0,0,0,0.16);
      text-align: center;
      animation: confirmIn 0.15s ease;
    }
    .password-gate-icon {
      width: 56px; height: 56px;
      background: #F4EEF9;
      border-radius: 50%;
      margin: 0 auto 14px;
      display: flex; align-items: center; justify-content: center;
      color: #452E5A;
    }
    .password-gate-title {
      margin: 0 0 6px;
      font-size: 16px; font-weight: 700;
      color: #1C1C1C;
      letter-spacing: -0.2px;
    }
    .password-gate-message {
      margin: 0 0 18px;
      font-size: 13px; color: #6B6B6B;
      line-height: 1.5;
    }
    .password-gate-input {
      width: 100%;
      padding: 12px 14px;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      font-size: 15px;
      font-family: inherit;
      box-sizing: border-box;
      text-align: center;
      letter-spacing: 3px;
      transition: border-color 0.15s;
    }
    .password-gate-input:focus {
      outline: none;
      border-color: #452E5A;
    }
    .password-gate-input.error {
      border-color: #C53030;
      animation: shake 0.3s ease;
    }
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-6px); }
      75% { transform: translateX(6px); }
    }
    .password-gate-error {
      font-size: 12px;
      color: #C53030;
      min-height: 16px;
      margin: 8px 0 4px;
      font-weight: 500;
    }
    .password-gate-hint {
      font-size: 11px;
      color: #ABABAB;
      margin: 4px 0 14px;
    }
    .password-gate-actions {
      display: flex; gap: 8px;
      margin-top: 8px;
    }
    .password-gate-actions button {
      flex: 1;
      padding: 10px 18px;
      border-radius: 8px;
      font-size: 13px; font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
    }
    .password-gate-cancel {
      background: none;
      border: 1px solid #E0E0E5;
      color: #3A3A3A;
    }
    .password-gate-cancel:hover { background: #F5F5F7; }
    .password-gate-verify {
      background: #452E5A;
      border: 1px solid #452E5A;
      color: #fff;
    }
    .password-gate-verify:hover { background: #5B3D76; }

    /* Session indicator — small "Unlocked" pill in the header */
    .edit-session-pill {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 4px 10px 4px 8px;
      background: #E6F7EE;
      color: #2F7A4D;
      border: 1px solid #C5E8D4;
      border-radius: 12px;
      font-size: 10px; font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      cursor: pointer;
      transition: background 0.15s;
      font-family: 'DM Sans', sans-serif;
    }
    .edit-session-pill:hover { background: #D9F0E1; }
    .edit-session-pill svg { width: 11px; height: 11px; }

    /* ── Payslip Modal (minimalist) ── */
    .payslip-modal {
      background: #fff;
      border-radius: 14px;
      max-width: 720px;
      width: 92vw;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    }
    .payslip-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 18px 22px 14px;
      border-bottom: 1px solid #F0F0F2;
    }
    .payslip-header h3 {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
      color: #1C1C1C;
      letter-spacing: -0.2px;
    }
    .payslip-body { overflow-y: auto; flex: 1; padding: 0 22px 4px; }
    .payslip-top {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 18px 0 16px;
      border-bottom: 1px solid #F0F0F2;
    }
    .payslip-top .payslip-avatar {
      width: 40px; height: 40px;
      border-radius: 10px;
      background: #E53935;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff;
      flex-shrink: 0;
    }
    .payslip-top-info { flex: 1; min-width: 0; padding-top: 2px; }
    .payslip-top-name { font-size: 14px; font-weight: 700; color: #1C1C1C; }
    .payslip-top-meta {
      font-size: 12px; color: #8B8B8B; margin-top: 2px;
      display: flex; align-items: center; gap: 6px;
      flex-wrap: wrap;
    }
    .payslip-top-meta .dot { color: #D0D0D5; }
    .payslip-paid { color: #2F7A4D; font-weight: 600; }
    /* Net pay now lives top-right, compact */
    .payslip-hero-mini { text-align: right; flex-shrink: 0; }
    .payslip-hero-label {
      font-size: 10px; font-weight: 700;
      color: #8B8B8B;
      text-transform: uppercase; letter-spacing: 0.4px;
    }
    .payslip-hero-amount {
      font-size: 26px; font-weight: 700;
      color: #1C1C1C; margin-top: 2px;
      letter-spacing: -0.5px; line-height: 1.1;
    }
    .payslip-hero-sub {
      font-size: 11.5px; color: #8B8B8B;
      margin-top: 5px;
      display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
    }
    .payslip-hero-sub b { color: #1C1C1C; font-weight: 600; }
    .payslip-hero-sub .dot { color: #D0D0D5; }
    /* Single vertical column so it reads top-to-bottom in the slider */
    .payslip-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      padding: 4px 0 0;
    }
    .payslip-col { display: flex; flex-direction: column; }
    .payslip-section { padding: 16px 0; border-bottom: 1px solid #F0F0F2; }
    .payslip-col .payslip-section:last-child { border-bottom: none; }
    @media (max-width: 640px) {
      .payslip-grid { grid-template-columns: 1fr; gap: 0; }
      .payslip-top { flex-wrap: wrap; }
      .payslip-hero-mini { text-align: left; width: 100%; }
      .payslip-hero-sub { justify-content: flex-start; }
    }
    .payslip-label {
      font-size: 10px; font-weight: 700;
      color: #8B8B8B;
      text-transform: uppercase; letter-spacing: 0.4px;
      margin-bottom: 10px;
    }
    .payslip-kv {
      display: flex; justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      font-size: 13px;
    }
    .payslip-kv > span:first-child { color: #8B8B8B; }
    .payslip-kv > span:last-child { color: #1C1C1C; font-weight: 500; text-align: right; }
    .payslip-kv .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
    .payslip-status-cleared { color: #2F7A4D !important; }
    .payslip-docs { display: flex; flex-direction: column; gap: 6px; }
    .payslip-doc {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 12px;
      font-size: 13px; color: #1C1C1C;
      cursor: pointer;
      border: 1px solid #ECECEF;
      border-radius: 9px;
      background: #fff;
      transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    }
    .payslip-doc:hover { background: #FAFAFB; border-color: #452E5A; box-shadow: 0 2px 8px rgba(69,46,90,0.08); }
    .payslip-doc:hover .payslip-doc-open { color: #452E5A; }
    .payslip-doc > svg:first-child { color: #452E5A; flex-shrink: 0; }
    .payslip-doc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
    .payslip-doc-size { color: #ABABAB; font-size: 11px; flex-shrink: 0; }
    .payslip-doc-open { color: #C8C8CD; flex-shrink: 0; transition: color 0.15s; }
    .payslip-footer {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 14px 22px;
      border-top: 1px solid #F0F0F2;
    }

    /* Edit Profile Modal */
    .edit-profile-modal {
      background: #fff;
      border-radius: 14px;
      width: 1100px;
      max-width: 96vw;
      height: 90vh;
      max-height: 90vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .edit-profile-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 22px;
      border-bottom: 1px solid #F0F0F2;
      background: #fff;
      flex-shrink: 0;
      z-index: 1;
    }
    .edit-profile-header h2 {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: #1C1C1C;
    }
    .edit-profile-close {
      width: 30px;
      height: 30px;
      border: none;
      background: #F5F5F7;
      border-radius: 7px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #484848;
      transition: all .15s;
    }
    .edit-profile-close:hover { background: #1C1C1C; color: #fff; }
    .edit-profile-form {
      padding: 18px 22px;
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .edit-form-section {
      margin-bottom: 20px;
    }
    .edit-form-section h3 {
      font-size: 13px;
      font-weight: 700;
      color: #1C1C1C;
      margin: 0 0 12px 0;
      padding-bottom: 8px;
      border-bottom: 1px solid #F0F0F2;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .edit-form-row {
      display: flex;
      gap: 14px;
      margin-bottom: 12px;
    }
    .edit-form-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .edit-form-group.full {
      flex: 2;
    }
    .edit-form-group label {
      font-size: 11px;
      font-weight: 700;
      color: #8B8B8B;
      text-transform: uppercase;
      letter-spacing: .3px;
    }
    .edit-form-group input,
    .edit-form-group select {
      padding: 9px 12px;
      border: 1px solid #E0E0E5;
      border-radius: 8px;
      font-size: 13px;
      font-family: 'DM Sans', sans-serif;
      background: #FAFAFA;
      color: #1C1C1C;
      transition: border-color .15s, background .15s;
    }
    .edit-form-group input:focus,
    .edit-form-group select:focus {
      outline: none;
      border-color: #452E5A;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(69,46,90,0.08);
    }
    .edit-form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 12px;
      border-top: 1px solid #F0F0F2;
      margin-top: 4px;
    }
    .edit-cancel-btn {
      padding: 9px 20px;
      border: 1px solid #DDDDE0;
      background: #fff;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #484848;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: all .12s;
    }
    .edit-cancel-btn:hover { background: #F5F5F7; }
    .edit-save-btn {
      padding: 9px 20px;
      border: none;
      background: linear-gradient(135deg,#452E5A,#6B4D8A);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 2px 8px rgba(69,46,90,0.3);
      transition: all .15s;
    }
    .edit-save-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(69,46,90,0.35); }
      font-weight: 700;
      color: #452E5A;
      text-align: left;
      text-transform: uppercase;
    }
    .profile-table td {
      padding: 14px 16px;
      font-size: 14px;
      color: #1C1C1C;
      border-bottom: 1px solid rgba(0,0,0,0.04);
    }
    
    /* DOCUMENTS Tab Styles - Light Theme */
    .documents-container-new {
      display: flex;
      gap: 0;
      background: #fff;
      border-radius: 0;
      margin: 0;
      overflow: hidden;
      min-height: 500px;
    }
    .documents-sidebar-new {
      width: 280px;
      background: #fff;
      padding: 0;
      border-right: 1px solid #F0F0F0;
      display: flex;
      flex-direction: column;
    }
    .docs-sidebar-header {
      padding: 16px;
      border-bottom: 1px solid #F0F0F0;
    }
    .docs-back-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      color: #484848;
      font-size: 13px;
      font-weight: 500;
      background: none;
      border: none;
      cursor: pointer;
      border-radius: 8px;
      transition: all 0.2s;
      font-family: 'DM Sans', sans-serif;
    }
    .docs-back-btn:hover {
      background: rgba(69,46,90,0.08);
      color: #452E5A;
    }
    .docs-back-btn svg {
      width: 16px;
      height: 16px;
    }
    .docs-category-list {
      flex: 1;
      padding: 12px;
    }
    .docs-category {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px;
      color: #1C1C1C;
      font-size: 14px;
      background: none;
      border: none;
      cursor: pointer;
      width: 100%;
      text-align: left;
      border-radius: 10px;
      margin-bottom: 4px;
      transition: all 0.2s;
      font-family: 'DM Sans', sans-serif;
    }
    .docs-category:hover {
      background: rgba(69,46,90,0.06);
    }
    .docs-category.active {
      background: rgba(69,46,90,0.1);
      border: 1px solid rgba(69,46,90,0.25);
    }
    .docs-category-icon {
      width: 36px;
      height: 36px;
      background: rgba(69,46,90,0.06);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .docs-category.active .docs-category-icon {
      background: rgba(69,46,90,0.15);
    }
    .docs-category-icon svg {
      width: 18px;
      height: 18px;
      color: #8B8B8B;
    }
    .docs-category.active .docs-category-icon svg {
      color: #452E5A;
    }
    .docs-category-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .docs-category-name {
      font-size: 13px;
      font-weight: 500;
    }
    .docs-category-status {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 600;
    }
    .docs-category-status.verified {
      color: #4CAF50;
    }
    .docs-category-status.pending {
      color: #FFA726;
    }
    .docs-arrow {
      font-size: 18px;
      color: #CCCCCC;
    }
    .docs-upload-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 12px;
      padding: 12px;
      background: rgba(69,46,90,0.06);
      border: 1px dashed rgba(69,46,90,0.4);
      border-radius: 10px;
      color: #452E5A;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'DM Sans', sans-serif;
    }
    .docs-upload-btn:hover {
      background: rgba(69,46,90,0.12);
      border-color: #452E5A;
    }
    .docs-upload-btn svg {
      width: 18px;
      height: 18px;
    }
    
    /* Documents Main Content */
    .documents-main-new {
      flex: 1;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      background: #fff;
    }
    .docs-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .docs-title-section {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .docs-title-section h3 {
      font-size: 18px;
      font-weight: 600;
      color: #1C1C1C;
      margin: 0;
    }
    .docs-badge {
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 500;
    }
    .docs-badge.verified {
      background: rgba(76, 175, 80, 0.1);
      color: #4CAF50;
    }
    .docs-badge.pending {
      background: rgba(255, 167, 38, 0.1);
      color: #FFA726;
    }
    .docs-actions {
      display: flex;
      gap: 8px;
    }
    .docs-action-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      background: #fff;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      color: #484848;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'DM Sans', sans-serif;
    }
    .docs-action-btn:hover {
      background: #FAFAFA;
      border-color: #452E5A;
      color: #452E5A;
    }
    .docs-action-btn.danger:hover {
      background: rgba(244, 67, 54, 0.05);
      border-color: rgba(244, 67, 54, 0.4);
      color: #F44336;
    }
    .docs-action-btn svg {
      width: 14px;
      height: 14px;
    }
    
    /* Document Info Cards */
    .docs-info-cards {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }
    .docs-info-card {
      background: #fff;
      border-radius: 0;
      padding: 0;
      border: none;
    }
    .docs-info-card-title {
      font-size: 13px;
      font-weight: 600;
      color: #E53935;
      margin-bottom: 16px;
    }
    .docs-info-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }
    .docs-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .docs-info-item label {
      font-size: 11px;
      color: #8B8B8B;
    }
    .docs-info-item span {
      font-size: 14px;
      color: #1C1C1C;
      font-weight: 500;
    }
    .docs-info-item span.warning {
      color: #E53935;
    }
    .docs-info-item span.mono {
      font-family: monospace;
      letter-spacing: 1px;
    }
    
    /* Document Images Section */
    .docs-images-section {
      flex: 1;
    }
    .docs-images-title {
      font-size: 14px;
      font-weight: 600;
      color: #1C1C1C;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .docs-images-title::before {
      content: none;
    }
    .docs-images-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }
    .docs-image-card {
      background: #fff;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid #F0F0F0;
      position: relative;
    }
    .docs-image-label {
      padding: 10px 16px;
      font-size: 12px;
      font-weight: 500;
      color: #8B8B8B;
      background: #fff;
      border-bottom: 1px solid #F0F0F0;
    }
    .docs-image-preview {
      padding: 20px;
      display: flex;
      justify-content: center;
    }
    .docs-image-content {
      width: 100%;
      max-width: 280px;
    }
    .docs-image-zoom {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 32px;
      height: 32px;
      background: rgba(0,0,0,0.5);
      border: none;
      border-radius: 8px;
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.2s;
    }
    .docs-image-card:hover .docs-image-zoom {
      opacity: 1;
    }
    .docs-image-zoom svg {
      width: 16px;
      height: 16px;
    }
    
    /* License Mock Styles (document previews stay dark - they represent physical documents) */
    .license-mock {
      background: linear-gradient(145deg, #2d5a3f 0%, #1e4530 50%, #153520 100%);
      border-radius: 8px;
      padding: 16px;
      color: #fff;
      font-size: 10px;
      aspect-ratio: 1.6;
      display: flex;
      flex-direction: column;
    }
    .license-mock.back {
      background: linear-gradient(145deg, #1e4530 0%, #153520 50%, #0d2515 100%);
    }
    .license-header {
      font-size: 14px;
      font-weight: 700;
      text-align: center;
      margin-bottom: 2px;
    }
    .license-subheader {
      font-size: 9px;
      text-align: center;
      color: rgba(255,255,255,0.7);
      margin-bottom: 10px;
    }
    .license-photo {
      width: 50px;
      height: 60px;
      background: rgba(255,255,255,0.2);
      border-radius: 4px;
      margin-bottom: 8px;
    }
    .license-info {
      flex: 1;
    }
    .license-name {
      font-size: 11px;
      font-weight: 600;
      margin-bottom: 4px;
    }
    .license-number {
      font-family: monospace;
      font-size: 10px;
      margin-bottom: 4px;
    }
    .license-details {
      font-size: 8px;
      color: rgba(255,255,255,0.6);
    }
    .license-barcode {
      height: 30px;
      background: repeating-linear-gradient(90deg, #fff 0px, #fff 2px, transparent 2px, transparent 4px);
      margin-bottom: 10px;
      border-radius: 2px;
    }
    .license-back-info {
      font-size: 9px;
      color: rgba(255,255,255,0.8);
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .license-magstripe {
      height: 20px;
      background: linear-gradient(180deg, #333 0%, #1a1a1a 50%, #333 100%);
      margin-top: auto;
      border-radius: 2px;
    }
  


            body { font-family: 'DM Sans', Arial, sans-serif; padding: 40px; }
            h1 { color: #1C1C1C; margin-bottom: 8px; }
            .subtitle { color: #8B8B8B; margin-bottom: 24px; }
            table { width: 100%; border-collapse: collapse; }
            th { background: #452E5A; color: white; padding: 12px; text-align: left; }
            td { padding: 12px; border-bottom: 1px solid #E8E8E8; }
            tr:nth-child(even) { background: #F5F5F5; }
            .footer { margin-top: 40px; color: #8B8B8B; font-size: 12px; }
            @media print { body { padding: 20px; } }
          


.cep-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:9000;display:none;align-items:center;justify-content:center;}
.cep-modal-overlay.show{display:flex;}
.cep-modal{background:#fff;border-radius:14px;padding:28px;width:480px;max-width:94vw;box-shadow:0 20px 60px rgba(0,0,0,0.2);}
.cep-modal h3{font-size:16px;font-weight:700;color:#1C1C1C;margin:0 0 20px;}
.cep-modal label{font-size:12px;font-weight:600;color:#8B8B8B;display:block;margin-bottom:5px;text-transform:uppercase;letter-spacing:0.4px;}
.cep-modal input,.cep-modal select,.cep-modal textarea{width:100%;border:1px solid #E0E0E0;border-radius:8px;padding:10px 12px;font-size:13px;font-family:'DM Sans',sans-serif;color:#1C1C1C;outline:none;background:#FAFAFA;margin-bottom:14px;box-sizing:border-box;}
.cep-modal input:focus,.cep-modal select:focus,.cep-modal textarea:focus{border-color:#452E5A;background:#fff;}
.cep-modal textarea{resize:vertical;min-height:70px;}
.cep-modal-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.cep-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:6px;}
.cep-btn-cancel{padding:10px 20px;border:1px solid #E0E0E0;background:transparent;border-radius:8px;cursor:pointer;font-size:13px;font-family:'DM Sans',sans-serif;color:#484848;}
.cep-btn-primary{padding:10px 22px;border:none;background:#452E5A;color:#fff;border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;font-family:'DM Sans',sans-serif;}
.cep-btn-primary:hover{background:#5B3D76;}
.cep-doc-view{border:1px solid #F0F0F0;border-radius:10px;padding:20px;text-align:center;}
.cep-doc-preview{width:100%;height:160px;background:linear-gradient(135deg,#F5F3FF,#E8E4FF);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;margin-bottom:16px;cursor:pointer;}
.cep-toast{position:fixed;bottom:24px;right:24px;background:#1C1C1C;color:#fff;padding:12px 20px;border-radius:10px;font-size:13px;font-family:'DM Sans',sans-serif;z-index:99999;transform:translateY(80px);opacity:0;transition:all 0.3s ease;pointer-events:none;}
.cep-toast.show{transform:translateY(0);opacity:1;}
.cep-toast.success{background:#4CAF50;}
.cep-toast.error{background:#F56565;}



#payrollActionMenu button:hover { background:#F8F8F8; }
.payroll-action-btn:hover { background:#F5F5F5 !important; }



/* Print-specific styles - only the invoice card prints */
@media print {
  body * { visibility: hidden; }
  #invoicePrintArea, #invoicePrintArea * { visibility: visible; }
  #invoicePrintArea { position:absolute; left:0; top:0; width:100%; padding:24px !important; border:none !important; }
}


body{font-family:Arial,sans-serif;margin:0;padding:32px;color:#1C1C1C;}table{width:100%;border-collapse:collapse;}th,td{padding:8px;}@media print{@page{margin:18mm;}}

body{font-family:Arial,sans-serif;margin:0;padding:32px;color:#1C1C1C;background:#fff;}table{width:100%;border-collapse:collapse;}th,td{padding:8px;text-align:left;}


/* ===== FULL-SCREEN SIGN UP (clean & minimal) ===== */
.su-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10010;
  font-family: 'DM Sans', sans-serif;
}
.su-fullscreen.show { display: flex; }

/* LEFT BRAND PANE */
.su-brand-pane {
  width: 42%;
  min-width: 380px;
  max-width: 540px;
  background: #1C1330;
  color: #fff;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.su-brand-pane::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(159,122,234,0.16), transparent 70%);
  pointer-events: none;
}
.su-brand-top { position: relative; z-index: 1; }
.su-logo { display: flex; align-items: center; }
.su-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2.5px;
}
.su-brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: -20px;
}
.su-brand-eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.su-brand-headline {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 22px;
  letter-spacing: -1px;
  line-height: 1.1;
}
.su-brand-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin: 0 0 56px;
  max-width: 380px;
}
.su-brand-quote {
  padding: 24px 0 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  max-width: 380px;
}
.su-brand-quote p {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0 0 12px;
  font-style: italic;
}
.su-brand-attribution {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.su-brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.su-brand-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.su-brand-footer a:hover { color: #fff; }

/* RIGHT FORM PANE */
.su-form-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.su-form-header {
  padding: 32px 72px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.su-back-btn {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: #8B8B8B;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 4px 0;
  transition: color 0.15s;
}
.su-back-btn::before {
  content: '←';
  margin-right: 6px;
}
.su-back-btn:hover { color: #1C1C1C; }

.su-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 440px;
}
.su-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #A0A0A5;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.25s ease;
}
.su-step.active { color: #1C1C1C; font-weight: 600; }
.su-step.complete { color: #1C1C1C; }
.su-step-num {
  width: 26px; height: 26px;
  background: #fff;
  border: 1.5px solid #E0E0E5;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.25s ease;
}
.su-step.active .su-step-num {
  background: #1C1C1C;
  border-color: #1C1C1C;
  color: #fff;
}
.su-step.complete .su-step-num {
  background: #1C1C1C;
  border-color: #1C1C1C;
  color: #fff;
}
.su-step-label { white-space: nowrap; }
.su-step-line {
  flex: 1;
  height: 1.5px;
  background: #E8E8EC;
  border-radius: 1px;
  min-width: 32px;
  transition: background 0.3s ease;
}

.su-form-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 72px 32px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.su-section-head { margin-bottom: 36px; }
.su-section-head h2 {
  font-size: 30px;
  font-weight: 700;
  color: #1C1C1C;
  margin: 0 0 10px;
  letter-spacing: -0.6px;
  line-height: 1.2;
}
.su-section-head p {
  font-size: 15px;
  color: #6B6B6B;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}
.su-field { margin-bottom: 22px; }
.su-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #484848;
  margin-bottom: 8px;
  letter-spacing: 0;
  text-transform: none;
}
.su-optional {
  font-weight: 400;
  color: #A0A0A5;
  font-size: 12px;
  margin-left: 4px;
}
.su-field input[type="text"],
.su-field input[type="email"],
.su-field input[type="password"],
.su-field input[type="tel"],
.su-field input[type="url"],
.su-field select,
.su-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #E5E5EA;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  color: #1C1C1C;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.su-field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.su-field input::placeholder,
.su-field textarea::placeholder {
  color: #B8B8BD;
  font-weight: 400;
}
.su-field input:focus,
.su-field select:focus,
.su-field textarea:focus {
  border-color: #1C1C1C;
  box-shadow: 0 0 0 3px rgba(28,28,28,0.06);
}
.su-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B8B8B' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
/* Error state */
.su-input-error,
.su-field input.su-input-error,
.su-field select.su-input-error,
.su-field textarea.su-input-error {
  border-color: #E53E3E !important;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.08) !important;
  animation: suFieldShake 0.4s ease;
}
@keyframes suFieldShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.su-field-error {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: #E53E3E;
  font-weight: 500;
  line-height: 1.4;
}
.su-field-error.show { display: flex; }
.su-field-error span { flex: 1; }
.su-fix-btn {
  flex-shrink: 0;
  padding: 4px 11px;
  background: #fff;
  color: #E53E3E;
  border: 1px solid rgba(229,62,62,0.35);
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.su-fix-btn:hover {
  background: #E53E3E;
  color: #fff;
  border-color: #E53E3E;
}
.su-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.su-grid-2 .su-field { margin-bottom: 0; }

/* Terms block */
.su-terms-block {
  margin-top: 14px;
  padding: 16px 0 0;
  border-top: 1px solid #F0F0F2;
}
.su-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13.5px;
  color: #484848;
  line-height: 1.55;
}
.su-terms-row input[type="checkbox"] {
  accent-color: #1C1C1C;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.su-terms-row a {
  color: #1C1C1C;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #C8C8CC;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.su-terms-row a:hover {
  text-decoration-color: #1C1C1C;
}

/* Footer with controls */
.su-form-footer {
  padding: 24px 72px;
  border-top: 1px solid #F0F0F2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  flex-shrink: 0;
}
.su-btn-ghost {
  padding: 12px 22px;
  background: transparent;
  border: 1px solid #E0E0E5;
  color: #484848;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.su-btn-ghost:hover { background: #FAFAFB; border-color: #C8C8CC; color: #1C1C1C; }
.su-btn-primary {
  padding: 12px 28px;
  background: #1C1C1C;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
  letter-spacing: 0.1px;
}
.su-btn-primary:hover { background: #000; transform: translateY(-1px); }
.su-btn-primary:active { transform: translateY(0); }
.su-progress-text {
  font-size: 13px;
  color: #8B8B8B;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 920px) {
  .su-fullscreen { flex-direction: column; }
  .su-brand-pane {
    width: 100%; max-width: none; min-width: 0;
    padding: 24px 32px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .su-brand-content, .su-brand-quote { display: none; }
  .su-brand-footer { display: none; }
  .su-form-header { padding: 24px 28px; }
  .su-form-body { padding: 16px 28px 24px; }
  .su-form-footer { padding: 20px 28px; }
  .su-stepper { overflow-x: auto; padding-bottom: 4px; }
  .su-grid-2 { grid-template-columns: 1fr; }
  .su-section-head h2 { font-size: 24px; }
}

/* Terms reader content */
#termsReadBody h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1C1C1C;
  margin: 18px 0 8px;
}
#termsReadBody h4:first-child { margin-top: 0; }
#termsReadBody p { margin: 0 0 14px; }
#termsReadBody ul { margin: 0 0 14px; padding-left: 22px; }
#termsReadBody li { margin-bottom: 6px; }



#signInPage input:focus { border-color:#452E5A !important; box-shadow:0 0 0 3px rgba(69,46,90,0.15); }
#signInLoginBtn:hover { background:#5B3D76; box-shadow:0 6px 20px rgba(69,46,90,0.5); transform:translateY(-1px); }
#signInLoginBtn:active { transform:translateY(0); }
#signInPage .si-lang-opt { display:block;width:100%;padding:12px 16px;border:none;background:transparent;cursor:pointer;font-size:13px;color:#1C1C1C;text-align:left;font-family:'DM Sans',sans-serif; }
#signInPage .si-lang-opt:hover { background:#F8F8F8; }
#signInPage button[onclick^="socialSignIn"]:hover { border-color:#452E5A; transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.06); }


@media print {
body{font-family:Arial,sans-serif;margin:24px;}table{width:100%;border-collapse:collapse;}th,td{padding:8px;border-bottom:1px solid #eee;text-align:left;font-size:12px;}th{background:#F5F5F5;text-transform:uppercase;font-size:10px;}button,svg,.header,.icon-btn{display:none !important;}h1{font-size:20px;margin-bottom:16px;}
}


.lc-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:9500; display:none; align-items:center; justify-content:center; padding:24px; font-family:'DM Sans',sans-serif; }
.lc-modal-overlay.show { display:flex; }
.lc-modal { background:#fff; border-radius:14px; width:100%; max-width:1100px; max-height:88vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 64px rgba(0,0,0,0.25); }
.lc-modal-header { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; border-bottom:1px solid #F0F0F0; }
.lc-modal-header h2 { margin:0; font-size:18px; font-weight:700; color:#1C1C1C; }
.lc-close-btn { width:32px; height:32px; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:6px; }
.lc-close-btn:hover { background:#F5F5F5; }
.lc-body { display:flex; flex:1; min-height:0; }
.lc-pane { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.lc-left-pane { border-right:1px solid #F0F0F0; }
.lc-comments-list { flex:1; overflow-y:auto; padding:18px 24px; }
.lc-status-badge { display:inline-block; padding:4px 10px; border-radius:6px; font-size:11px; font-weight:600; margin-bottom:14px; }
.lc-status-rejected { background:rgba(245,101,101,0.1); color:#F56565; }
.lc-status-approved { background:rgba(76,175,80,0.1); color:#4CAF50; }
.lc-status-pending  { background:rgba(255,167,38,0.1); color:#FFA726; }
.lc-comment { margin-bottom:18px; }
.lc-comment-header { display:flex; align-items:flex-start; gap:10px; margin-bottom:6px; }
.lc-comment-avatar { width:36px; height:36px; border-radius:8px; background:linear-gradient(135deg,#452E5A,#36234A); display:flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:700; flex-shrink:0; }
.lc-comment-info { flex:1; }
.lc-comment-name { font-size:13px; font-weight:700; color:#1C1C1C; }
.lc-comment-time { font-size:11px; color:#8B8B8B; margin-top:1px; }
.lc-comment-body { padding-left:46px; font-size:13px; color:#1C1C1C; line-height:1.5; }
.lc-comment-actions { padding-left:46px; margin-top:6px; display:flex; gap:14px; }
.lc-action-btn { background:transparent; border:none; cursor:pointer; padding:4px; color:#8B8B8B; display:flex; align-items:center; justify-content:center; border-radius:4px; }
.lc-action-btn:hover { background:#F5F5F5; color:#452E5A; }
.lc-action-btn.liked { color:#452E5A; }
.lc-action-btn.liked svg { fill:rgba(69,46,90,0.18); }
.lc-comment-nested { margin-left:38px; padding-left:18px; border-left:2px solid #F0F0F0; margin-top:10px; }
.lc-mention { display:inline-block; padding:2px 6px; background:#F0F0F0; border-radius:4px; font-size:12px; color:#452E5A; font-weight:600; margin-right:4px; }
.lc-input-bar { padding:14px 18px; border-top:1px solid #F0F0F0; display:flex; align-items:center; gap:10px; background:#FAFAFA; flex-shrink:0; }
.lc-input { flex:1; background:#fff; border:1px solid #E8E8E8; border-radius:8px; padding:10px 14px; font-size:13px; font-family:inherit; color:#1C1C1C; outline:none; }
.lc-input:focus { border-color:#452E5A; }
.lc-send-btn { width:36px; height:36px; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#452E5A; border-radius:8px; }
.lc-send-btn:hover { background:rgba(69,46,90,0.1); }

/* Right pane: private chat */
.lc-chat-header { padding:14px 20px; border-bottom:1px solid #F0F0F0; display:flex; align-items:center; gap:12px; flex-shrink:0; }
.lc-chat-user-avatar { width:40px; height:40px; border-radius:8px; background:linear-gradient(135deg,#FFA726,#FB8C00); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; }
.lc-chat-user-info { flex:1; }
.lc-chat-user-name { font-size:14px; font-weight:700; color:#1C1C1C; }
.lc-chat-user-status { font-size:11px; color:#8B8B8B; margin-top:1px; display:flex; align-items:center; gap:6px; }
.lc-online-dot { width:7px; height:7px; border-radius:50%; background:#4CAF50; }
.lc-chat-actions { display:flex; gap:4px; }
.lc-chat-icon-btn { width:34px; height:34px; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#484848; border-radius:6px; }
.lc-chat-icon-btn:hover { background:#F5F5F5; }
.lc-chat-messages { flex:1; overflow-y:auto; padding:18px 20px; display:flex; flex-direction:column; gap:14px; }
.lc-time-row { display:flex; justify-content:space-between; font-size:11px; color:#8B8B8B; padding:0 4px; }
.lc-date-divider { text-align:center; font-size:11px; color:#8B8B8B; padding:6px 0; }
.lc-date-divider span { background:#F5F5F5; padding:3px 12px; border-radius:10px; }
.lc-image-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; max-width:240px; align-self:flex-start; }
.lc-image-tile { aspect-ratio:1; background:linear-gradient(135deg,#CDDC39,#8BC34A); border-radius:8px; overflow:hidden; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; position:relative; }
.lc-image-tile.more::after { content:'+9'; position:absolute; font-size:20px; font-weight:700; color:#fff; background:rgba(0,0,0,0.5); inset:0; display:flex; align-items:center; justify-content:center; border-radius:8px; }
.lc-msg-row { display:flex; gap:10px; align-items:flex-end; }
.lc-msg-row.self { justify-content:flex-end; }
.lc-msg-avatar { width:32px; height:32px; border-radius:8px; flex-shrink:0; }
.lc-msg-avatar.you { background:linear-gradient(135deg,#1C1C1C,#3a3a3a); display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:700; }
.lc-msg-avatar.david { background:linear-gradient(135deg,#FF9800,#F57C00); display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:700; }
.lc-msg-bubble { max-width:62%; padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.5; }
.lc-msg-bubble.received { background:#F5F5F5; color:#1C1C1C; border-bottom-left-radius:4px; }
.lc-msg-bubble.sent { background:#452E5A; color:#fff; border-bottom-right-radius:4px; }
.lc-msg-name { font-size:12px; font-weight:700; color:#1C1C1C; margin-bottom:6px; }
.lc-reply-quote { padding:8px 10px; background:rgba(0,0,0,0.05); border-left:3px solid #452E5A; border-radius:4px; font-size:12px; margin-bottom:6px; }
.lc-reply-quote-name { font-weight:700; color:#452E5A; font-size:11px; }
.lc-file-attach { background:#452E5A; color:#fff; border-radius:14px; border-bottom-right-radius:4px; padding:12px 14px; display:flex; align-items:center; gap:10px; max-width:280px; }
.lc-file-icon { width:32px; height:32px; background:rgba(255,255,255,0.2); border-radius:6px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.lc-file-info { flex:1; }
.lc-file-name { font-size:13px; font-weight:600; }
.lc-file-meta { font-size:11px; opacity:0.8; }
.lc-chat-input { padding:14px 18px; border-top:1px solid #F0F0F0; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.lc-chat-input-field { flex:1; background:#F5F5F5; border:none; border-radius:8px; padding:10px 14px; font-size:13px; font-family:inherit; outline:none; }
@media (max-width: 900px) { .lc-body { flex-direction:column; } .lc-left-pane { border-right:none; border-bottom:1px solid #F0F0F0; } }



.calls-container { background:#fff; border-radius:8px; padding:0; overflow:hidden; font-family:'DM Sans',sans-serif; }
.calls-header { padding:18px 24px; border-bottom:1px solid #F0F0F0; display:flex; justify-content:space-between; align-items:center; }
.calls-title { margin:0; font-size:14px; font-weight:700; color:#1C1C1C; display:flex; align-items:center; gap:8px; }
.calls-title-bar { display:inline-block; width:3px; height:14px; background:#452E5A; border-radius:2px; }
.calls-context-name { padding:14px 24px; border-bottom:1px solid #F0F0F0; font-size:13px; font-weight:500; color:#1C1C1C; background:#FAFAFA; }
.calls-list { max-height:480px; overflow-y:auto; }
.calls-footer { padding:14px 24px; border-top:1px solid #F0F0F0; text-align:center; font-size:13px; color:#8B8B8B; }
.calls-new-btn { padding:8px 14px; background:#452E5A; color:#fff; border:none; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; font-family:'DM Sans',sans-serif; display:inline-flex; align-items:center; gap:6px; }
.calls-new-btn:hover { background:#5B3D76; }
.calls-empty { padding:60px 24px; text-align:center; color:#8B8B8B; font-size:13px; }



  /* Quick Actions Row */
  .profile-quick-actions {
    display:flex;
    gap:8px;
    padding:14px 0;
    flex-wrap:wrap;
    border-top:1px solid #F0F0F0;
    margin-top:4px;
  }
  /* Persistent variant — lives OUTSIDE the collapsible profileCard.
     Always visible across all tabs and across collapse states. */
  .profile-quick-actions.persistent-actions {
    background:#fff;
    border-top:none;
    border-bottom:1px solid #F0F0F0;
    margin:0 24px;
    padding:12px 16px;
    border-radius:10px 10px 0 0;
    box-shadow:0 1px 0 rgba(0,0,0,0.02);
  }
  .pqa-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:8px 16px;
    min-width:150px;
    background:#fff;
    border:1px solid #E8E8E8;
    border-radius:8px;
    font-size:12.5px;
    font-weight:600;
    color:#1C1C1C;
    cursor:pointer;
    font-family:'DM Sans',sans-serif;
    transition:all 0.15s;
  }
  .pqa-btn:hover {
    background:rgba(69,46,90,0.04);
    border-color:#452E5A;
    transform:translateY(-1px);
    box-shadow:0 2px 6px rgba(69,46,90,0.08);
  }
  .pqa-btn:active { transform:translateY(0); }

  /* Quick Action Modal */
  .qa-modal-overlay {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(20,15,30,0.55);
    backdrop-filter:blur(4px);
    z-index:5500;
    align-items:center;
    justify-content:center;
    padding:20px;
    animation:fadeIn 0.18s ease;
  }
  .qa-modal-overlay.show { display:flex; }
  .qa-modal {
    background:#fff;
    border-radius:14px;
    width:480px;
    max-width:100%;
    max-height:88vh;
    overflow-y:auto;
    box-shadow:0 24px 60px rgba(20,15,30,0.25);
    font-family:'DM Sans',sans-serif;
    animation:tsPickerIn 0.22s cubic-bezier(0.16,1,0.3,1);
  }
  .qa-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    padding:22px 24px 18px;
    border-bottom:1px solid #F2F2F4;
    gap:12px;
  }
  .qa-head-icon {
    width:42px;
    height:42px;
    border-radius:10px;
    background:linear-gradient(135deg,#452E5A,#36234A);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    box-shadow:0 4px 10px rgba(69,46,90,0.25);
  }
  .qa-title {
    font-size:18px;
    font-weight:700;
    color:#1C1C1C;
    margin:0;
    letter-spacing:-0.2px;
  }
  .qa-sub {
    font-size:12.5px;
    color:#6B6B6B;
    margin-top:4px;
    line-height:1.4;
  }
  .qa-close {
    width:32px;
    height:32px;
    border:none;
    background:#F5F5F7;
    color:#484848;
    border-radius:8px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.15s;
    flex-shrink:0;
  }
  .qa-close:hover { background:#1C1C1C; color:#fff; transform:rotate(90deg); }
  .qa-body { padding:18px 24px; }
  .qa-field { margin-bottom:14px; }
  .qa-field:last-child { margin-bottom:0; }
  .qa-label {
    display:block;
    font-size:11px;
    font-weight:600;
    color:#484848;
    text-transform:uppercase;
    letter-spacing:0.4px;
    margin-bottom:6px;
  }
  .qa-input, .qa-textarea, .qa-select {
    width:100%;
    padding:10px 12px;
    border:1px solid #E0E0E5;
    border-radius:8px;
    font-size:13px;
    font-family:'DM Sans',sans-serif;
    outline:none;
    box-sizing:border-box;
    transition:all 0.15s;
    background:#fff;
    color:#1C1C1C;
  }
  .qa-input:focus, .qa-textarea:focus, .qa-select:focus {
    border-color:#452E5A;
    box-shadow:0 0 0 3px rgba(69,46,90,0.08);
  }
  .qa-textarea { resize:vertical; min-height:90px; }
  .qa-foot {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding:14px 24px;
    border-top:1px solid #F2F2F4;
    background:#FAFAFB;
  }
  .qa-btn-ghost {
    padding:9px 18px;
    background:#fff;
    color:#484848;
    border:1px solid #E0E0E5;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    font-family:'DM Sans',sans-serif;
    transition:all 0.12s;
  }
  .qa-btn-ghost:hover { background:#F5F5F7; border-color:#C0C0C8; }
  .qa-btn-primary {
    padding:9px 20px;
    background:linear-gradient(135deg,#452E5A,#36234A);
    color:#fff;
    border:none;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    font-family:'DM Sans',sans-serif;
    box-shadow:0 2px 6px rgba(69,46,90,0.2);
    transition:all 0.15s;
  }
  .qa-btn-primary:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(69,46,90,0.3); }
  .qa-context-card {
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    background:#FAFAFB;
    border:1px solid #F0F0F2;
    border-radius:10px;
    margin-bottom:18px;
  }
  .qa-ctx-avatar {
    width:38px;
    height:38px;
    border-radius:9px;
    background:#452E5A;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:700;
    flex-shrink:0;
  }
  .qa-ctx-name { font-size:13.5px; font-weight:600; color:#1C1C1C; }
  .qa-ctx-sub { font-size:11px; color:#8B8B8B; margin-top:2px; }



  .pwd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,15,30,0.55);
    backdrop-filter: blur(4px);
    z-index: 7000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.18s ease;
  }
  .pwd-overlay.show { display: flex; }
  .pwd-modal {
    background: #fff;
    border-radius: 8px;
    width: 420px;
    max-width: 100%;
    box-shadow: 0 24px 60px rgba(20,15,30,0.25);
    font-family: 'DM Sans', sans-serif;
    animation: tsPickerIn 0.22s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
  }
  .pwd-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #F2F2F4;
  }
  .pwd-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #F56565, #C53030);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245,101,101,0.25);
  }
  .pwd-head-content { flex: 1; }
  .pwd-title {
    font-size: 16px;
    font-weight: 700;
    color: #1C1C1C;
    margin: 0;
    letter-spacing: -0.2px;
  }
  .pwd-sub {
    font-size: 12.5px;
    color: #6B6B6B;
    margin-top: 4px;
    line-height: 1.45;
  }
  .pwd-close {
    width: 30px;
    height: 30px;
    border: none;
    background: #F5F5F7;
    color: #484848;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
  }
  .pwd-close:hover { background: #1C1C1C; color: #fff; transform: rotate(90deg); }
  .pwd-target-card {
    margin: 16px 24px 0;
    padding: 12px 14px;
    background: rgba(245,101,101,0.04);
    border: 1px solid rgba(245,101,101,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .pwd-target-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .pwd-target-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #1C1C1C;
  }
  .pwd-target-sub {
    font-size: 11.5px;
    color: #6B6B6B;
    margin-top: 2px;
  }
  .pwd-body { padding: 16px 24px 4px; }
  .pwd-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #484848;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
  }
  .pwd-input-wrap { position: relative; }
  .pwd-input {
    width: 100%;
    padding: 11px 42px 11px 14px;
    border: 1px solid #E0E0E5;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    box-sizing: border-box;
    transition: all 0.15s;
    background: #fff;
    color: #1C1C1C;
    letter-spacing: 1px;
  }
  .pwd-input:focus {
    border-color: #452E5A;
    box-shadow: 0 0 0 3px rgba(69,46,90,0.08);
  }
  .pwd-input.error {
    border-color: #F56565;
    box-shadow: 0 0 0 3px rgba(245,101,101,0.1);
    animation: pwdShake 0.4s ease;
  }
  @keyframes pwdShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
  }
  .pwd-toggle-vis {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #8B8B8B;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
  }
  .pwd-toggle-vis:hover { background: #F5F5F7; color: #1C1C1C; }
  .pwd-hint {
    margin-top: 8px;
    padding: 8px 11px;
    background: #FAFAFB;
    border: 1px dashed #D0D0D5;
    border-radius: 6px;
    font-size: 11px;
    color: #6B6B6B;
    line-height: 1.4;
  }
  .pwd-hint code {
    background: rgba(69,46,90,0.08);
    color: #452E5A;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 10.5px;
  }
  .pwd-error-msg {
    display: none;
    margin-top: 8px;
    padding: 8px 11px;
    background: rgba(245,101,101,0.08);
    border: 1px solid rgba(245,101,101,0.2);
    border-radius: 6px;
    font-size: 11.5px;
    color: #C53030;
    font-weight: 500;
  }
  .pwd-error-msg.show { display: block; }
  .pwd-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #F2F2F4;
    margin-top: 16px;
    background: #FAFAFB;
  }
  .pwd-btn-ghost {
    padding: 9px 16px;
    background: #fff;
    color: #484848;
    border: 1px solid #E0E0E5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.12s;
  }
  .pwd-btn-ghost:hover { background: #F5F5F7; border-color: #C0C0C8; }
  .pwd-btn-danger {
    padding: 9px 18px;
    background: linear-gradient(135deg, #F56565, #C53030);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 2px 6px rgba(245,101,101,0.25);
    transition: all 0.15s;
  }
  .pwd-btn-danger:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,101,101,0.35); }
  .pwd-btn-danger:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }



    #benefitsSettingsScreen{position:fixed;inset:0;background:#F4F5F7;z-index:9500;display:none;flex-direction:column;font-family:'DM Sans',sans-serif;overflow:hidden;}
    #benefitsSettingsScreen.show{display:flex;}
    .bcs-topbar{display:flex;align-items:center;gap:14px;padding:16px 28px;background:#fff;border-bottom:1px solid #ECECEF;flex-shrink:0;}
    .bcs-back{width:38px;height:38px;border:1px solid #E2E2E6;border-radius:9px;background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#1C1C1C;flex-shrink:0;}
    .bcs-back:hover{background:#F5F5F7;border-color:#452E5A;}
    .bcs-back svg{width:18px;height:18px;}
    .bcs-title h2{margin:0;font-size:18px;font-weight:700;color:#1C1C1C;}
    .bcs-title p{margin:2px 0 0;font-size:12.5px;color:#8B8B8B;}
    .bcs-body{flex:1;overflow-y:auto;padding:20px 28px 40px;}
    .bcs-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
    .bcs-tabs{display:inline-flex;background:#fff;border:1px solid #ECECEF;border-radius:10px;padding:4px;gap:2px;}
    .bcs-tab{border:none;background:transparent;padding:8px 16px;border-radius:7px;font-size:12.5px;font-weight:600;color:#7A7A85;cursor:pointer;font-family:'DM Sans',sans-serif;transition:all .12s;}
    .bcs-tab:hover{color:#452E5A;}
    .bcs-tab.active{background:#452E5A;color:#fff;}
    .bcs-toolbar-right{display:flex;align-items:center;gap:10px;}
    .bcs-search{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #E2E2E6;border-radius:9px;padding:0 12px;height:40px;width:260px;}
    .bcs-search svg{width:16px;height:16px;color:#9094A0;flex-shrink:0;}
    .bcs-search input{border:none;outline:none;flex:1;font-size:13px;font-family:'DM Sans',sans-serif;background:transparent;color:#1C1C1C;}
    .bcs-add{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 18px;background:#452E5A;color:#fff;border:none;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif;box-shadow:0 2px 8px rgba(69,46,90,0.22);transition:all .15s;}
    .bcs-add:hover{background:#5B3D76;transform:translateY(-1px);}
    .bcs-add svg{width:16px;height:16px;}
    .bcs-card{background:#fff;border:1px solid #ECECEF;border-radius:12px;overflow:hidden;}
    .bcs-table{width:100%;border-collapse:collapse;}
    .bcs-table thead{background:rgba(69,46,90,0.06);}
    .bcs-table th{text-align:left;padding:13px 18px;font-size:10.5px;font-weight:700;color:#452E5A;text-transform:uppercase;letter-spacing:0.4px;white-space:nowrap;}
    .bcs-table td{padding:14px 18px;font-size:13px;color:#1C1C1C;border-top:1px solid #F2F2F4;vertical-align:middle;}
    .bcs-table tbody tr:hover{background:#FAFAFB;}
    .bcs-name{font-weight:600;}
    .bcs-type-badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;}
    .bcs-type-badge.bcs-benefit{background:rgba(69,46,90,0.10);color:#452E5A;}
    .bcs-type-badge.bcs-credit{background:rgba(45,140,255,0.12);color:#1E6FD0;}
    .bcs-type-badge.bcs-holiday{background:rgba(76,175,80,0.14);color:#2E7D32;}
    .bcs-type-badge.bcs-reward{background:rgba(237,137,54,0.16);color:#C05621;}
    .bcs-applies{display:inline-flex;flex-direction:column;gap:1px;}
    .bcs-applies b{font-weight:600;font-size:12.5px;color:#1C1C1C;}
    .bcs-applies small{font-size:11px;color:#9094A0;}
    .bcs-trigger{display:block;font-weight:600;font-size:12.5px;color:#1C1C1C;}
    .bcs-trigger-detail{display:block;font-size:11px;color:#9094A0;margin-top:1px;}
    .bcs-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;}
    .bcs-status::before{content:'';width:7px;height:7px;border-radius:50%;}
    .bcs-status.on{color:#2E7D32;}
    .bcs-status.on::before{background:#2E7D32;}
    .bcs-status.off{color:#9094A0;}
    .bcs-status.off::before{background:#C4C4CC;}
    .bcs-actions{white-space:nowrap;}
    .bcs-act-btn{width:30px;height:30px;border:1px solid #E2E2E6;border-radius:7px;background:#fff;color:#6B6B76;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;margin-left:4px;transition:all .12s;}
    .bcs-act-btn:hover{border-color:#452E5A;color:#452E5A;}
    .bcs-act-btn.danger:hover{border-color:#F56565;color:#F56565;}
    .bcs-act-btn svg{width:15px;height:15px;}
    .bcs-empty{padding:48px 20px;text-align:center;color:#9094A0;font-size:13px;}
    .bcs-count{margin-top:12px;font-size:12px;color:#9094A0;}
    /* Modal */
    .bcs-modal-overlay{position:fixed;inset:0;background:rgba(20,15,30,0.5);backdrop-filter:blur(3px);z-index:9600;display:none;align-items:center;justify-content:center;padding:20px;}
    .bcs-modal-overlay.show{display:flex;}
    .bcs-modal{background:#fff;border-radius:16px;width:620px;max-width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 24px 70px rgba(20,15,30,0.3);font-family:'DM Sans',sans-serif;}
    .bcs-modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #F2F2F4;position:sticky;top:0;background:#fff;border-radius:16px 16px 0 0;}
    .bcs-modal-head h3{margin:0;font-size:16px;font-weight:700;color:#1C1C1C;}
    .bcs-modal-close{width:30px;height:30px;border:none;background:transparent;color:#8B8B8B;cursor:pointer;border-radius:7px;display:flex;align-items:center;justify-content:center;}
    .bcs-modal-close:hover{background:#F5F5F7;color:#1C1C1C;}
    .bcs-modal-body{padding:20px 24px;}
    .bcs-field{margin-bottom:16px;}
    .bcs-field label{display:block;font-size:11.5px;font-weight:600;color:#6B6B76;margin-bottom:6px;text-transform:uppercase;letter-spacing:0.3px;}
    .bcs-field input,.bcs-field select,.bcs-field textarea{width:100%;border:1px solid #E0E0E5;border-radius:9px;padding:10px 12px;font-size:13px;font-family:'DM Sans',sans-serif;color:#1C1C1C;outline:none;background:#FAFAFB;box-sizing:border-box;}
    .bcs-field input:focus,.bcs-field select:focus,.bcs-field textarea:focus{border-color:#452E5A;background:#fff;box-shadow:0 0 0 3px rgba(69,46,90,0.1);}
    .bcs-field textarea{resize:vertical;min-height:64px;}
    .bcs-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
    .bcs-row-3{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
    .bcs-hint{font-size:11px;color:#9094A0;margin-top:5px;}
    .bcs-start-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;}
    .bcs-modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid #F2F2F4;position:sticky;bottom:0;background:#fff;}
    .bcs-btn-ghost{padding:10px 18px;background:#fff;color:#484848;border:1px solid #E0E0E5;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif;}
    .bcs-btn-ghost:hover{background:#F5F5F7;}
    .bcs-btn-save{padding:10px 22px;background:#452E5A;color:#fff;border:none;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif;box-shadow:0 2px 8px rgba(69,46,90,0.25);}
    .bcs-btn-save:hover{background:#5B3D76;}
  


  body.editing-lock #profileViewScreen { display: none !important; }



/* TRICKY Global Guard styles */
.tricky-ov{position:fixed;inset:0;background:rgba(28,22,38,.45);display:none;align-items:center;justify-content:center;z-index:100000;padding:20px;backdrop-filter:blur(2px);}
.tricky-dialog{background:#fff;width:100%;max-width:420px;border-radius:16px;padding:26px 24px 20px;box-shadow:0 24px 60px rgba(0,0,0,.28);animation:trickyPop .16s ease;}
@keyframes trickyPop{from{opacity:0;transform:translateY(10px) scale(.98);}to{opacity:1;transform:none;}}
.tricky-dialog-icon{width:54px;height:54px;border-radius:50%;background:#FFF6E9;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;}
.tricky-dialog-title{font-size:18px;font-weight:700;color:#1C1C1C;text-align:center;margin-bottom:6px;}
.tricky-dialog-msg{font-size:13.5px;color:#5B5B66;text-align:center;line-height:1.5;margin-bottom:16px;}
.tricky-dialog-msg b{color:#1C1C1C;font-weight:600;}
.tricky-perm{display:flex;align-items:center;justify-content:center;gap:7px;background:#EEF7EE;color:#2E7D32;font-size:12px;border-radius:8px;padding:8px 10px;margin-bottom:14px;}
.tricky-perm b{font-weight:700;}
.tricky-secure{border:1px solid #F0E6D6;background:#FFFBF4;border-radius:10px;padding:12px;margin-bottom:16px;}
.tricky-secure-head{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:#B26A00;margin-bottom:10px;}
.tricky-tabs{display:flex;gap:6px;margin-bottom:10px;}
.tricky-tab{flex:1;border:1px solid #E6DAC8;background:#fff;color:#8a7a5e;font-size:12px;font-weight:600;padding:7px;border-radius:7px;cursor:pointer;font-family:inherit;}
.tricky-tab.active{background:#452E5A;border-color:#452E5A;color:#fff;}
.tricky-input{width:100%;border:1px solid #E0DCE6;border-radius:8px;padding:10px 12px;font-size:13px;font-family:inherit;box-sizing:border-box;outline:none;}
.tricky-input:focus{border-color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.12);}
.tricky-err{color:#E53935;font-size:12px;min-height:14px;margin-top:6px;}
.tricky-actions{display:flex;gap:10px;}
.tricky-btn{flex:1;border:none;border-radius:9px;padding:11px;font-size:13.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:filter .12s ease;}
.tricky-btn:hover{filter:brightness(.96);}
.tricky-no{background:#F1F0F4;color:#5B5B66;}
.tricky-yes{background:#452E5A;color:#fff;}
.tricky-yes.tricky-danger{background:#E53935;}
/* Audit trail */
.tricky-audit-card{background:#fff;width:100%;max-width:620px;max-height:82vh;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.28);display:flex;flex-direction:column;overflow:hidden;animation:trickyPop .16s ease;}
.tricky-audit-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #EEECF2;}
.tricky-audit-title{font-size:17px;font-weight:700;color:#1C1C1C;}
.tricky-audit-sub{font-size:12px;color:#9A9AA5;margin-top:2px;}
.tricky-audit-x{border:none;background:#F1F0F4;width:30px;height:30px;border-radius:8px;font-size:18px;color:#5B5B66;cursor:pointer;line-height:1;}
.tricky-audit-body{padding:14px 16px;overflow-y:auto;}
.tricky-audit-empty{text-align:center;color:#9A9AA5;font-size:13px;line-height:1.6;padding:34px 24px;}
.aud-item{border:1px solid #ECEAF1;border-radius:10px;margin-bottom:8px;overflow:hidden;}
.aud-row{display:flex;align-items:center;gap:12px;padding:12px 14px;cursor:pointer;}
.aud-row:hover{background:#FAF9FC;}
.aud-badge{flex:0 0 auto;font-size:11px;font-weight:700;padding:4px 10px;border-radius:999px;}
.aud-badge.aud-del{background:#FDECEC;color:#E53935;}
.aud-badge.aud-upd{background:#EEF7EE;color:#2E7D32;}
.aud-badge.aud-other{background:#F0EEF4;color:#6B5B7B;}
.aud-main{flex:1;min-width:0;}
.aud-sec{font-size:13.5px;font-weight:600;color:#1C1C1C;}
.aud-lock{font-size:10px;font-weight:700;color:#B26A00;background:#FFF1DD;padding:1px 6px;border-radius:6px;margin-left:6px;}
.aud-meta{font-size:11.5px;color:#9A9AA5;margin-top:2px;}
.aud-caret{color:#B0B0B8;flex:0 0 auto;}
.aud-detail{padding:0 14px 14px;}
.aud-vals{width:100%;border-collapse:collapse;font-size:12px;}
.aud-vals th{text-align:left;color:#9A9AA5;font-weight:600;text-transform:uppercase;font-size:10px;letter-spacing:.04em;padding:6px 8px;border-bottom:1px solid #EEECF2;}
.aud-vals td{padding:7px 8px;border-bottom:1px solid #F4F3F7;color:#3A3A42;vertical-align:top;}
.aud-old{color:#9A9AA5;text-decoration:line-through;}
.aud-new{color:#2E7D32;font-weight:600;}
.aud-novals{font-size:12px;color:#9A9AA5;padding:6px 2px;}
/* Floating audit button */
#trickyAuditFab{position:fixed;right:18px;bottom:18px;z-index:99990;display:flex;align-items:center;gap:7px;background:#452E5A;color:#fff;border:none;border-radius:999px;padding:10px 14px;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;box-shadow:0 8px 22px rgba(69,46,90,.35);}
#trickyAuditFab:hover{filter:brightness(1.08);}
#trickyAuditFab #trickyAuditCount{background:rgba(255,255,255,.22);border-radius:999px;padding:1px 7px;font-size:11px;}
@media(max-width:600px){#trickyAuditFab span#trickyAuditCount{}}




/* TRICKY Access Governance (RBAC) styles */
.perm-hidden { display: none !important; }
.perm-noedit { cursor: default !important; pointer-events: none !important; }
.perm-noedit .edit-icon { display: none !important; }
.perm-sensitive { color: #9A9AA5 !important; font-style: italic; letter-spacing: normal !important; }

#rbacFab { position: fixed; right: 18px; bottom: 64px; z-index: 99990; display: flex; align-items: center; gap: 7px; background: #2D2433; color: #fff; border: none; border-radius: 999px; padding: 10px 14px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; box-shadow: 0 8px 22px rgba(45,36,51,.35); }
#rbacFab:hover { filter: brightness(1.12); }
#rbacFab b { font-weight: 700; }

.rbac-card { background: #fff; width: 100%; max-width: 720px; max-height: 84vh; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden; animation: trickyPop .16s ease; }
.rbac-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid #EEECF2; }
.rbac-title { font-size: 17px; font-weight: 700; color: #1C1C1C; }
.rbac-sub { font-size: 12px; color: #9A9AA5; margin-top: 2px; }
.rbac-x { border: none; background: #F1F0F4; width: 30px; height: 30px; border-radius: 8px; font-size: 18px; color: #5B5B66; cursor: pointer; line-height: 1; }
.rbac-body { padding: 18px 22px; overflow-y: auto; }
.rbac-active { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rbac-active label { font-size: 12px; font-weight: 600; color: #5B5B66; }
.rbac-active select { flex: 0 0 auto; min-width: 180px; padding: 9px 12px; border: 1px solid #E0DCE6; border-radius: 8px; font-size: 13px; font-family: inherit; background: #fff; }
.rbac-matrix-wrap { overflow-x: auto; border: 1px solid #ECEAF1; border-radius: 10px; }
.rbac-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.rbac-matrix th { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #6B5B7B; background: rgba(69,46,90,0.06); padding: 11px 8px; }
.rbac-matrix th:first-child { text-align: left; }
.rbac-matrix td { padding: 11px 8px; text-align: center; border-top: 1px solid #F1F0F4; }
.rbac-rolename { text-align: left !important; font-weight: 600; color: #1C1C1C; white-space: nowrap; }
.rbac-cur { font-size: 10px; font-weight: 700; color: #2E7D32; background: #EAF7EE; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.rbac-tog { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.rbac-tog input { opacity: 0; width: 0; height: 0; position: absolute; }
.rbac-tog span { position: absolute; inset: 0; background: #D8D5DF; border-radius: 999px; transition: background .15s; }
.rbac-tog span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.rbac-tog input:checked + span { background: #452E5A; }
.rbac-tog input:checked + span::after { transform: translateX(16px); }
.rbac-note { font-size: 12px; color: #6B6B76; line-height: 1.55; margin-top: 14px; }
.rbac-foot { padding: 14px 22px; border-top: 1px solid #EEECF2; display: flex; justify-content: flex-end; }
.rbac-apply { background: #452E5A; color: #fff; border: none; border-radius: 9px; padding: 10px 22px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
@media (max-width: 560px){ #rbacFab { bottom: 60px; } }




  .tool-cat { display:inline-block; margin-top:4px; padding:1px 8px; border-radius:5px; font-size:10px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; }
  .tool-cat-hardware { background:#EEF1F6; color:#5B6B86; }
  .tool-cat-software { background:#EFE8F6; color:#452E5A; }
  a.asset-owner-link, .asset-owner-link { color:#452E5A; font-weight:600; text-decoration:none; cursor:pointer; border-bottom:1px dashed rgba(69,46,90,0.4); display:inline-block; }
  a.asset-owner-link:hover, .asset-owner-link:hover { border-bottom-style:solid; }
  /* Hide the image-category controls (upload-category picker + filter chips) */
  .tool-detail-section .eq-gal-bar, #equipGalCats { display:none !important; }
  /* Collapsible detail sections */
  .tool-detail-section.eq-collapsed > *:not(.tool-detail-section-header) { display:none !important; }
  .eq-sec-chevron { display:inline-flex; align-items:center; justify-content:center; color:#8B8B8B; transition:transform .2s; flex-shrink:0; }
  /* Asset detail as a wide right-side slider */
  #toolsDetailView { position:fixed; top:0; right:0; height:100vh; width:min(1200px,96vw); background:#fff; box-shadow:-14px 0 44px rgba(0,0,0,0.18); transform:translateX(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); z-index:7000; overflow-y:auto; padding:26px 30px 48px; box-sizing:border-box; }
  #toolsDetailView.show { transform:translateX(0); }
  #toolsDetailScrim { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.35); z-index:6999; opacity:0; pointer-events:none; transition:opacity .3s; }
  #toolsDetailScrim.show { opacity:1; pointer-events:auto; }
  @media (max-width:600px){ #toolsDetailView { width:100vw; } }
  /* Loan detail as a wide right-side slider */
  #loanDetailView { position:fixed; top:0; right:0; height:100vh; width:min(1440px,98vw); background:#fff; box-shadow:-14px 0 44px rgba(0,0,0,0.18); transform:translateX(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); z-index:7000; overflow-y:auto; padding:26px 30px 48px; box-sizing:border-box; }
  #loanDetailView.show { transform:translateX(0); }
  #loanDetailScrim { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.35); z-index:6999; opacity:0; pointer-events:none; transition:opacity .3s; }
  #loanDetailScrim.show { opacity:1; pointer-events:auto; }
  @media (max-width:600px){ #loanDetailView { width:100vw; } }
  /* Invoice popup above the loan slider + minimalist receipt */
  #loanInvoiceModal { z-index:7100 !important; }
  #loanInvoiceModal .credit-modal { max-width:480px !important; background:#fff !important; }
  .invoice-receipt { border-radius:0 !important; padding:0 !important; box-shadow:none !important; width:100% !important; background:#fff !important; }
  .invoice-receipt-header { background:#fff !important; margin:0 !important; padding:20px 22px !important; border-bottom:1px solid #EFEFF1; align-items:center; }
  .invoice-company-logo { background:rgba(69,46,90,0.08) !important; }
  .invoice-company-logo svg { stroke:#452E5A !important; }
  .invoice-company-name { color:#1C1C1C !important; }
  .invoice-company-sub { color:#9A9AA5 !important; }
  .invoice-date { color:#9A9AA5 !important; }
  .invoice-receipt-header + .invoice-divider { display:none !important; }
  .invoice-divider { background:repeating-linear-gradient(90deg,#E6E6EA 0px,#E6E6EA 4px,transparent 4px,transparent 8px) !important; margin:14px 22px !important; }
  .invoice-meta { padding:16px 22px 0 !important; gap:8px !important; }
  .invoice-table { padding:0 22px !important; }
  .invoice-total { padding:14px 22px 8px !important; border-top:1px solid #EFEFF1; margin-top:2px; }
  .invoice-total span:last-child { color:#1C1C1C !important; font-size:22px !important; font-weight:800 !important; }
  .invoice-balance { background:#F6F3FA; margin:4px 22px 18px !important; padding:12px 16px !important; border-radius:8px; }
  .invoice-balance span:first-child { color:#452E5A !important; font-weight:600 !important; }
  .invoice-balance span:last-child { color:#452E5A !important; font-weight:800 !important; font-size:15px !important; }
  .invoice-barcode { display:none !important; }



/* ===== Add New Personnel — searchable selects, overtime & phone country picker ===== */
/* Personnel table employment-status badges */
.emp-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.emp-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.emp-status.active { color: #1B873F; background: #E7F6EC; }
.emp-status.inactive { color: #B42318; background: #FEECEB; }
.emp-status.onleave { color: #B25E09; background: #FFF4E5; }
/* Company profile cell (mirrors the Name column) */
.company-cell { display: flex; align-items: center; gap: 12px; }
.company-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
}
.company-name { font-size: 14px; font-weight: 400; color: #1C1C1C; }
/* Kebab menu — Change Status submenu */
.cm-caret { width: 12px; height: 12px; color: #9094A0; margin-left: auto; transition: transform 0.15s; }
#cmStatusToggle.open .cm-caret { transform: rotate(90deg); }
.context-submenu { display: flex; flex-direction: column; gap: 0; margin: 2px 0 2px 8px; padding-left: 6px; border-left: 2px solid #EFEFF2; }
.cm-status-opt {
  font-size: 13px; color: #1C1C1C; cursor: pointer; background: transparent; border: none;
  text-align: left; padding: 8px 12px; border-radius: 7px; font-family: 'DM Sans', sans-serif;
  font-weight: 500; display: flex; align-items: center; gap: 8px; transition: background 0.12s, color 0.12s;
}
.cm-status-opt:hover { background: #F5F0FA; color: #452E5A; }
.cm-status-opt.current { background: #F5F0FA; font-weight: 600; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* Change Status popup dialog */
.status-pop-overlay {
  position: fixed; inset: 0; background: rgba(20,12,28,0.45);
  z-index: 100000; display: none; align-items: center; justify-content: center;
}
.status-pop-overlay.show { display: flex; }
.status-pop {
  width: min(360px, 92vw); background: #fff; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.3); font-family: 'DM Sans', sans-serif; overflow: hidden;
}
.status-pop-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.status-pop-header h3 { margin: 0; font-size: 17px; font-weight: 700; color: #2A1B36; }
.status-pop-close { border: none; background: none; cursor: pointer; font-size: 22px; line-height: 1; color: #9094A0; }
.status-pop-sub { padding: 0 20px 14px; font-size: 13px; color: #7A7486; }
.status-pop-options { padding: 4px 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.status-pop-opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 13px 14px; border: 1px solid #ECE7F2; border-radius: 10px;
  background: #fff; cursor: pointer; font-family: inherit; font-size: 14px;
  font-weight: 500; color: #2A1B36; text-align: left;
  transition: background 0.12s, border-color 0.12s;
}
.status-pop-opt:hover { background: #F7F5FA; border-color: #D9CEE8; }
.status-pop-opt.current { background: #F5F0FA; border-color: #452E5A; }
.status-pop-opt-label { flex: 1; }
.status-pop-check { width: 16px; height: 16px; color: #452E5A; opacity: 0; }
.status-pop-opt.current .status-pop-check { opacity: 1; }
/* Status column header filter */
.th-with-filter { display: inline-flex; align-items: center; gap: 6px; }
.status-filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: none; background: transparent; border-radius: 6px;
  cursor: pointer; color: #9A9A9A; padding: 0; transition: background 0.12s, color 0.12s;
}
.status-filter-btn svg { width: 13px; height: 13px; }
.status-filter-btn:hover, .status-filter-btn.active { background: #F1ECF7; color: #452E5A; }
.status-filter-menu {
  position: fixed; z-index: 100002; background: #fff; border: 1px solid #E4E4E8;
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  padding: 5px; min-width: 190px; font-family: 'DM Sans', sans-serif;
}
.sf-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: transparent; border-radius: 7px; padding: 9px 10px;
  font-size: 13px; font-weight: 500; color: #1C1C1C; cursor: pointer; font-family: inherit;
}
.sf-opt:hover { background: #F5F1FA; }
.sf-opt.active { background: #F5F1FA; font-weight: 700; color: #452E5A; }
.sf-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sf-dot-all { background: linear-gradient(135deg, #1B873F, #B25E09); }
.sf-label { flex: 1; }
.sf-check { width: 14px; height: 14px; color: #452E5A; flex-shrink: 0; }
.ssel { position: relative; }
.ssel-input { width: 100%; }
.ssel-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid #E2DDEA; border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  max-height: 220px; overflow-y: auto; padding: 4px; display: none;
}
.ssel.open .ssel-menu { display: block; }
.ssel-option {
  padding: 9px 12px; border-radius: 6px; font-size: 14px; color: #3A3A3A; cursor: pointer;
}
.ssel-option:hover, .ssel-option.focused { background: rgba(69,46,90,0.08); color: #452E5A; }
.ssel-option.sel { background: rgba(69,46,90,0.10); color: #452E5A; font-weight: 600; }
.ssel-empty { padding: 10px 12px; font-size: 12.5px; color: #9094A0; }

/* Phone number with country picker */
.phone-field { position: relative; display: flex; gap: 8px; }
.phone-cc {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  border: 1px solid #CFCFCF; border-radius: 6px; background: #fff; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #474747; white-space: nowrap;
}
.phone-cc:hover { background: #FAFAFA; }
.phone-cc-caret { width: 12px; height: 12px; color: #888; flex-shrink: 0; }
.phone-num { flex: 1; min-width: 0; }
.phone-cc-menu {
  position: absolute; top: calc(100% + 4px); left: 0; width: 280px; max-width: 100%; z-index: 60;
  background: #fff; border: 1px solid #E2DDEA; border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.14); display: none; overflow: hidden;
}
.phone-field.open .phone-cc-menu { display: block; }
.phone-cc-search { padding: 8px; border-bottom: 1px solid #F0F0F0; }
.phone-cc-search input {
  width: 100%; height: 34px; padding: 6px 10px; border: 1px solid #E2DDEA; border-radius: 6px;
  font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; box-sizing: border-box;
}
.phone-cc-list { max-height: 240px; overflow-y: auto; padding: 4px; }
.phone-cc-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  cursor: pointer; font-size: 13.5px; color: #3A3A3A;
}
.phone-cc-item:hover { background: rgba(69,46,90,0.08); }
.phone-cc-item .cc-flag { font-size: 16px; }
.phone-cc-item .cc-dial { margin-left: auto; color: #8B8B8B; font-size: 12.5px; }
.phone-cc-empty { padding: 10px 12px; font-size: 12.5px; color: #9094A0; }



  /* Single view-switch button */
  .pv-btn { display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 14px; margin-right:6px; border:1px solid #E5E0EC; border-radius:9px; background:#fff; color:#452E5A; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; transition:background .15s,color .15s,border-color .15s; }
  .pv-btn:hover { background:#5B3D76; color:#fff; border-color:#5B3D76; }
  .pv-btn svg { width:17px; height:17px; }
  /* Selection checkboxes (table) */
  .sel-box, .sel-all-box { display:inline-flex; align-items:center; margin-right:12px; vertical-align:middle; }
  .sel-box input[type="checkbox"], .sel-all-box input[type="checkbox"] { width:16px; height:16px; cursor:pointer; accent-color:#452E5A; margin:0; }
  #personnelTable tr.row-selected { background:#F5F1FA !important; }

  /* ===== Card / box view ===== */
  .pcard-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:24px; padding:22px 4px 10px; }
  @media (max-width:1280px){ .pcard-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); } }
  @media (max-width:920px){ .pcard-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
  @media (max-width:600px){ .pcard-grid { grid-template-columns:1fr; } }
  /* In card view, drop the white panel so cards sit on the grey page background */
  .table-container.pv-box-host { background:transparent; box-shadow:none; overflow:visible; border-radius:0; }
  .pcard { position:relative; background:#fff; border:1px solid #F0ECF4; border-radius:12px; padding:20px 20px 18px; cursor:pointer; box-shadow:0 4px 16px rgba(28,28,28,.05); transition:box-shadow .18s, transform .18s, border-color .18s; }
  .pcard:hover { box-shadow:0 16px 34px rgba(69,46,90,.13); transform:translateY(-3px); border-color:#E6DCEF; }
  .pcard.pcard-selected { border-color:#452E5A; box-shadow:0 0 0 1.5px #452E5A inset, 0 4px 16px rgba(28,28,28,.05); }

  .pcard-check { position:absolute; top:16px; right:46px; width:16px; height:16px; cursor:pointer; accent-color:#452E5A; margin:0; opacity:0; transition:opacity .15s; z-index:2; }
  .pcard:hover .pcard-check, .pcard-check:checked { opacity:1; }
  .pcard-kebab { position:absolute; top:12px; right:12px; width:28px; height:28px; border:none; background:transparent; border-radius:8px; color:#A49DB0; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; z-index:2; }
  .pcard-kebab:hover { background:#F2EEF7; color:#452E5A; }
  .pcard-kebab svg { width:18px; height:18px; }

  .pcard-head { display:flex; align-items:flex-start; gap:13px; margin-bottom:16px; padding-right:30px; }
  .pcard-avatar { width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:16px; flex:0 0 auto; }
  .pcard-headinfo { flex:1 1 auto; min-width:0; }
  .pcard-name { font-weight:700; font-size:16px; color:#1C1C1C; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pcard-nameRow { display:flex; align-items:center; gap:9px; }
  .pcard-nameRow .pcard-name { min-width:0; flex:0 1 auto; }
  .pcard-nameRow .pcard-rate { flex:0 0 auto; }
  .pcard-role { font-size:13px; color:#9A93A6; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

  .pcard-sub { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:15px; }
  .pcard-rate { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:999px; color:#fff; font-weight:700; font-size:12px; }
  .pcard-rate svg { width:12px; height:12px; }
  .pcard-rate.rate-green { background:#1FA85C; }
  .pcard-rate.rate-amber { background:#F0A91E; }
  .pcard-rate.rate-red   { background:#EF5350; }
  .pcard-loc { display:inline-flex; align-items:center; gap:5px; color:#6B6670; font-size:13px; min-width:0; margin-top:7px; }
  .pcard-loc svg { width:14px; height:14px; flex:0 0 auto; color:#A49DB0; }
  .pcard-loc span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

  .pcard-chips { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:17px; }
  .pcard-chip { padding:5px 11px; border-radius:999px; background:#F5F3F8; color:#5A5563; font-size:12px; font-weight:500; white-space:nowrap; }
  .pcard-chip.is-active   { background:#E7F6EE; color:#1FA85C; }
  .pcard-chip.is-inactive { background:#FDECEC; color:#EF5350; }
  .pcard-chip.is-onleave  { background:#FEF3E2; color:#D9870B; }

  .pcard-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:15px; border-top:1px solid #F2EEF6; }
  .pcard-company { display:flex; align-items:center; gap:8px; font-size:13px; color:#33303A; min-width:0; overflow:hidden; }
  .pcard-company > span.cname { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pcard-cav { width:24px; height:24px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:10px; font-weight:700; flex:0 0 auto; }
  .pcard-action { border:none; background:#452E5A; color:#fff; font-weight:600; font-size:13px; padding:9px 17px; border-radius:11px; cursor:pointer; white-space:nowrap; flex:0 0 auto; transition:background .15s; }
  .pcard-action:hover { background:#5B3D76; }
  .pcard-empty { grid-column:1/-1; text-align:center; color:#8B8B8B; padding:40px 0; }
  /* Bulk selection action bar */
  .bulk-bar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 14px; padding:11px 16px; background:#F5F1FA; border:1px solid #E6DCEF; border-radius:10px; }
  .bulk-count { font-size:13.5px; color:#452E5A; }
  .bulk-count b { font-weight:700; }
  .bulk-actions { display:flex; align-items:center; gap:10px; }
  .bulk-clear { border:none; background:transparent; color:#6B6670; font-size:13px; font-weight:600; cursor:pointer; padding:7px 11px; border-radius:8px; font-family:inherit; }
  .bulk-clear:hover { background:#EDE7F3; color:#452E5A; }
  .bulk-del { border:none; background:#EF5350; color:#fff; font-size:13px; font-weight:600; cursor:pointer; padding:8px 16px; border-radius:8px; display:inline-flex; align-items:center; gap:7px; font-family:inherit; }
  .bulk-del:hover { background:#E53935; }
  .bulk-del svg { width:15px; height:15px; }



  .lcalc-overlay { position:fixed; inset:0; background:rgba(28,20,38,.5); z-index:100040; opacity:0; pointer-events:none; transition:opacity .25s; }
  .lcalc-overlay.show { opacity:1; pointer-events:auto; }
  .lcalc-modal { position:absolute; top:0; right:0; height:100%; width:70vw; background:#fff; box-shadow:-14px 0 50px rgba(0,0,0,.18); display:flex; flex-direction:column; transform:translateX(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); font-family:'DM Sans',sans-serif; }
  .lcalc-overlay.show .lcalc-modal { transform:translateX(0); }
  @media (max-width:980px){ .lcalc-modal { width:94vw; } }
  .lcalc-head { display:flex; align-items:center; justify-content:space-between; padding:20px 28px; border-bottom:1px solid #F1EDF5; flex:0 0 auto; }
  .lcalc-title { display:flex; align-items:center; gap:10px; font-size:18px; font-weight:700; color:#1C1C1C; }
  .lcalc-title small { display:block; font-size:12px; font-weight:500; color:#9A93A6; margin-top:2px; }
  .lcalc-title svg { width:21px; height:21px; color:#452E5A; }
  .lcalc-close { width:34px; height:34px; border:none; background:#F4F1F8; border-radius:9px; cursor:pointer; color:#6B6670; display:flex; align-items:center; justify-content:center; }
  .lcalc-close:hover { background:#EAE3F1; color:#452E5A; }
  .lcalc-body { padding:24px 28px; overflow:auto; flex:1 1 auto; }
  .lcalc-presets { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:24px; }
  .lcalc-preset { border:1px solid #E8E1F0; background:#fff; color:#5A5563; padding:9px 15px; border-radius:999px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; display:inline-flex; align-items:center; gap:8px; transition:all .15s; }
  .lcalc-preset:hover { border-color:#C9B9DC; color:#452E5A; }
  .lcalc-preset.active { background:#452E5A; color:#fff; border-color:#452E5A; }
  .lcalc-preset svg { width:15px; height:15px; }
  .lcalc-grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px 22px; margin-bottom:22px; }
  @media (max-width:760px){ .lcalc-grid3 { grid-template-columns:repeat(2,1fr); } }
  @media (max-width:520px){ .lcalc-grid3 { grid-template-columns:1fr; } }
  .lcalc-f > label { display:block; font-size:12.5px; font-weight:600; color:#6B6670; margin-bottom:7px; }
  .lcalc-input-wrap { display:flex; align-items:center; gap:6px; border:1px solid #E4DEEC; border-radius:10px; padding:0 13px; height:46px; transition:border-color .15s, box-shadow .15s; }
  .lcalc-input-wrap:focus-within { border-color:#452E5A; box-shadow:0 0 0 3px rgba(69,46,90,.12); }
  .lcalc-input-wrap .lcalc-prefix, .lcalc-input-wrap .lcalc-suffix { color:#9A93A6; font-size:13.5px; flex:0 0 auto; }
  .lcalc-input-wrap input { flex:1 1 auto; border:none; outline:none; font-size:15px; font-weight:600; color:#1C1C1C; font-family:inherit; min-width:0; background:transparent; }
  .lcalc-input-wrap input::-webkit-outer-spin-button, .lcalc-input-wrap input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
  .lcalc-callout { align-self:end; background:#FFF6DE; border:1px solid #F3E2A8; border-radius:11px; padding:11px 14px; font-size:12.5px; color:#7A6326; line-height:1.5; }
  .lcalc-callout b { color:#5A4A14; font-weight:700; }
  .lcalc-yn { display:flex; gap:8px; height:46px; }
  .lcalc-yn button { flex:1; border:1px solid #E4DEEC; background:#fff; border-radius:10px; font-size:13px; font-weight:600; color:#5A5563; cursor:pointer; font-family:inherit; }
  .lcalc-yn button.active { background:#452E5A; color:#fff; border-color:#452E5A; }
  .lcalc-summary { font-size:13.5px; color:#484848; line-height:1.55; margin:0 0 16px; }
  .lcalc-summary b { color:#452E5A; }
  .lcalc-cards { display:grid; grid-template-columns:repeat(4,1fr); background:#F4F1FA; border-radius:14px; overflow:hidden; }
  @media (max-width:760px){ .lcalc-cards { grid-template-columns:repeat(2,1fr); } }
  .lcalc-card { padding:18px 20px; border-right:1px solid #E6DEF0; }
  .lcalc-card:last-child { border-right:none; }
  @media (max-width:760px){ .lcalc-card:nth-child(2){border-right:none;} .lcalc-card:nth-child(1),.lcalc-card:nth-child(2){border-bottom:1px solid #E6DEF0;} }
  .lcalc-card span { display:block; font-size:12px; color:#8B8398; margin-bottom:5px; }
  .lcalc-card b { font-size:23px; font-weight:800; color:#452E5A; letter-spacing:-0.5px; }
  .lcalc-schedule { margin-top:26px; border-top:1px solid #F1EDF5; }
  .lcalc-sched-toggle { width:100%; text-align:left; background:transparent; border:none; padding:18px 2px; font-size:14px; font-weight:600; color:#452E5A; cursor:pointer; display:flex; align-items:center; justify-content:space-between; font-family:inherit; }
  .lcalc-sched-toggle svg { width:17px; height:17px; transition:transform .18s; }
  .lcalc-sched-toggle.open svg { transform:rotate(180deg); }
  .lcalc-sched-body { display:none; max-height:320px; overflow:auto; padding-bottom:8px; }
  .lcalc-sched-body.open { display:block; }
  .lcalc-sched-table { width:100%; border-collapse:collapse; font-size:13px; }
  .lcalc-sched-table th { position:sticky; top:0; background:#F6F2FB; color:#6B6670; font-weight:600; text-align:right; padding:10px 12px; font-size:12px; }
  .lcalc-sched-table th:first-child { text-align:left; }
  .lcalc-sched-table td { padding:10px 12px; text-align:right; border-bottom:1px solid #F4F0F8; color:#33303A; }
  .lcalc-sched-table td:first-child { text-align:left; color:#9A93A6; }
  .lcalc-sched-phase td { color:#452E5A; font-weight:600; }
  .lcalc-foot { display:flex; align-items:center; justify-content:flex-end; gap:11px; padding:18px 28px; border-top:1px solid #F1EDF5; flex:0 0 auto; }
  .lcalc-btn-ghost { border:1px solid #DDD; background:#fff; color:#484848; padding:11px 20px; border-radius:10px; font-weight:600; font-size:13.5px; cursor:pointer; font-family:inherit; }
  .lcalc-btn-ghost:hover { background:#F7F5FA; }
  .lcalc-btn-primary { border:none; background:#452E5A; color:#fff; padding:11px 22px; border-radius:10px; font-weight:600; font-size:13.5px; cursor:pointer; font-family:inherit; }
  .lcalc-btn-primary:hover { background:#5B3D76; }



  .cdx-overlay { position:fixed; inset:0; background:rgba(20,16,28,0.5); display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .18s ease; z-index:100050; padding:20px; }
  .cdx-overlay.show { opacity:1; pointer-events:auto; }
  .cdx-modal { width:100%; max-width:460px; background:#fff; border-radius:16px; box-shadow:0 24px 60px rgba(20,16,40,0.22); font-family:'DM Sans',sans-serif; transform:translateY(8px); transition:transform .18s ease; overflow:hidden; }
  .cdx-overlay.show .cdx-modal { transform:translateY(0); }
  .cdx-head { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px 0; }
  .cdx-title { font-size:12px; font-weight:600; letter-spacing:.4px; text-transform:uppercase; color:#9A93A6; }
  .cdx-name { font-size:19px; font-weight:700; color:#1C1C1C; margin-top:3px; }
  .cdx-x { width:30px; height:30px; border:none; background:transparent; color:#9A93A6; border-radius:8px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .cdx-x:hover { background:#F4F2F7; color:#1C1C1C; }
  .cdx-body { padding:18px 24px 4px; }
  .cdx-details { display:grid; grid-template-columns:1fr 1fr; gap:14px 20px; }
  .cdx-row { display:flex; flex-direction:column; gap:2px; }
  .cdx-k { font-size:11px; font-weight:600; letter-spacing:.3px; text-transform:uppercase; color:#A4A0AD; }
  .cdx-v { font-size:14px; font-weight:600; color:#23202B; }
  .cdx-desc { margin:16px 0 0; font-size:13px; line-height:1.55; color:#5C5867; }
  .cdx-approver { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; padding:11px 14px; background:#F8F7FB; border-radius:10px; }
  .cdx-approver .cdx-v { font-weight:600; }
  .cdx-field { margin-top:18px; }
  .cdx-label { display:block; font-size:12px; font-weight:600; color:#4B4753; margin-bottom:7px; }
  .cdx-opt { font-weight:500; color:#A4A0AD; }
  .cdx-textarea { width:100%; box-sizing:border-box; border:1px solid #E5E2EC; border-radius:10px; padding:10px 12px; font-size:13px; font-family:inherit; color:#23202B; resize:vertical; outline:none; transition:border-color .15s, box-shadow .15s; }
  .cdx-textarea:focus { border-color:#452E5A; box-shadow:0 0 0 3px rgba(69,46,90,.1); }
  .cdx-input-wrap { position:relative; }
  .cdx-input { width:100%; box-sizing:border-box; border:1px solid #E5E2EC; border-radius:10px; padding:11px 40px 11px 12px; font-size:14px; font-family:inherit; color:#23202B; outline:none; transition:border-color .15s, box-shadow .15s; }
  .cdx-input:focus { border-color:#452E5A; box-shadow:0 0 0 3px rgba(69,46,90,.1); }
  .cdx-eye { position:absolute; right:8px; top:50%; transform:translateY(-50%); border:none; background:transparent; color:#A4A0AD; cursor:pointer; padding:4px; display:flex; }
  .cdx-eye:hover { color:#452E5A; }
  .cdx-hint { font-size:11px; color:#A4A0AD; margin-top:7px; }
  .cdx-hint code { background:#F1EEF6; color:#5B3D76; padding:1px 5px; border-radius:4px; font-size:11px; }
  .cdx-err { font-size:12px; color:#E5484D; margin-top:7px; min-height:14px; }
  .cdx-foot { display:flex; justify-content:flex-end; gap:10px; padding:8px 24px 22px; }
  .cdx-btn-ghost { border:1px solid #E5E2EC; background:#fff; color:#4B4753; font-weight:600; font-size:13px; padding:9px 18px; border-radius:10px; cursor:pointer; font-family:inherit; }
  .cdx-btn-ghost:hover { background:#F8F7FB; }
  .cdx-btn { border:none; color:#fff; font-weight:600; font-size:13px; padding:9px 22px; border-radius:10px; cursor:pointer; font-family:inherit; }
  .cdx-btn:hover { filter:brightness(0.95); }
  @media (max-width:520px){ .cdx-details { grid-template-columns:1fr; } }



  .notes-scrim { position:fixed; inset:0; background:rgba(20,16,28,0.45); opacity:0; pointer-events:none; transition:opacity .22s ease; z-index:100060; }
  .notes-scrim.show { opacity:1; pointer-events:auto; }
  .notes-panel { position:fixed; top:0; right:0; height:100%; width:780px; max-width:96vw; background:#fff; box-shadow:-12px 0 40px rgba(20,16,40,0.16); transform:translateX(100%); transition:transform .26s cubic-bezier(.16,1,.3,1); z-index:100061; display:flex; flex-direction:column; font-family:'DM Sans',sans-serif; }
  .notes-panel.show { transform:translateX(0); }
  .notes-head { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; border-bottom:1px solid #EFEDF2; }
  .notes-head h3 { margin:0; font-size:17px; font-weight:700; color:#1C1C1C; }
  .notes-x { width:30px; height:30px; border:none; background:transparent; color:#9A93A6; border-radius:8px; cursor:pointer; font-size:17px; line-height:1; }
  .notes-x:hover { background:#F4F2F7; color:#1C1C1C; }
  .notes-compose { padding:16px 24px; border-bottom:1px solid #EFEDF2; background:#FBFAFC; }
  .notes-typetoggle { display:inline-flex; background:#EEEBF3; border-radius:9px; padding:3px; gap:2px; }
  .notes-typebtn { border:none; background:transparent; padding:6px 16px; border-radius:7px; font-size:12.5px; font-weight:600; color:#6B6676; cursor:pointer; font-family:inherit; transition:all .15s; }
  .notes-typebtn.active { background:#fff; color:#452E5A; box-shadow:0 1px 3px rgba(0,0,0,.08); }
  .notes-typehint { font-size:11.5px; color:#9A93A6; margin:8px 2px 10px; display:flex; align-items:center; gap:5px; }
  .notes-input { width:100%; box-sizing:border-box; border:1px solid #E5E2EC; border-radius:10px; padding:10px 12px; font-size:13px; font-family:inherit; color:#23202B; resize:vertical; outline:none; transition:border-color .15s, box-shadow .15s; }
  .notes-input:focus { border-color:#452E5A; box-shadow:0 0 0 3px rgba(69,46,90,.1); }
  .notes-add { margin-top:10px; border:none; background:#452E5A; color:#fff; font-weight:600; font-size:13px; padding:9px 18px; border-radius:9px; cursor:pointer; font-family:inherit; }
  .notes-add:hover { background:#5B3D76; }
  .notes-scroll { flex:1; overflow-y:auto; }
  .notes-listscreen, .notes-detailscreen { flex:1; display:flex; flex-direction:column; min-height:0; }
  .notes-detail-top { padding:12px 24px; border-bottom:1px solid #EFEDF2; }
  .notes-back { display:inline-flex; align-items:center; gap:6px; border:none; background:transparent; color:#452E5A; font-weight:600; font-size:13px; cursor:pointer; font-family:'DM Sans',sans-serif; padding:4px 0; }
  .notes-back:hover { text-decoration:underline; }
  .notes-detail-body { flex:1; overflow-y:auto; padding:20px 24px 28px; }
  .notes-list { padding:16px 24px 8px; display:flex; flex-direction:column; gap:12px; }
  .notes-empty { text-align:center; color:#9A93A6; font-size:13px; padding:40px 10px; }
  .note-card { border:1px solid #EEEBF2; border-radius:12px; padding:13px 15px; }
  .note-card.note-private { background:#FBFAFC; border-style:dashed; }
  .note-top { display:flex; align-items:center; gap:8px; margin-bottom:7px; flex-wrap:wrap; }
  .note-badge { font-size:10px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; padding:3px 8px; border-radius:6px; }
  .note-badge-public { background:rgba(30,142,78,.12); color:#1E8E4E; }
  .note-badge-private { background:#ECEAF1; color:#6B6676; }
  .note-meta { font-size:11.5px; color:#9A93A6; }
  .note-text { font-size:13.5px; line-height:1.5; color:#2C2935; white-space:pre-wrap; word-break:break-word; }
  .note-cardactions { display:flex; gap:6px; margin-top:11px; }
  .note-cardactions button { border:1px solid #E8E5EE; background:#fff; color:#5C5867; font-size:11.5px; font-weight:600; padding:5px 12px; border-radius:7px; cursor:pointer; font-family:inherit; transition:all .12s; }
  .note-cardactions button:hover { background:#F5F3F8; color:#452E5A; border-color:#D8D2E2; }
  .note-cardactions button.danger { color:#E5484D; }
  .note-cardactions button.danger:hover { background:rgba(229,72,77,.08); color:#E5484D; border-color:rgba(229,72,77,.32); }
  .notes-activity { padding:14px 24px 26px; margin-top:6px; border-top:1px solid #EFEDF2; }
  .notes-activity-head { font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:#9A93A6; margin-bottom:12px; display:flex; align-items:center; gap:7px; }
  .act-item { display:flex; gap:10px; padding:8px 0; }
  .act-dot { width:7px; height:7px; border-radius:50%; background:#C4BBD2; margin-top:6px; flex-shrink:0; }
  .act-body { flex:1; }
  .act-line { font-size:12.5px; color:#3A3743; }
  .act-line b { color:#1C1C1C; font-weight:700; }
  .act-sub { font-size:11px; color:#A4A0AD; margin-top:1px; }
  .act-snip { font-size:11.5px; color:#7C7888; margin-top:3px; font-style:italic; }
  .notes-act-empty { font-size:12px; color:#A4A0AD; padding:6px 0; }



  .card-chevron { transition: transform .2s ease; flex-shrink:0; }
  .profile-detail-card.collapsed .card-chevron { transform: rotate(-90deg); }
  .profile-detail-card.collapsed > *:not(.profile-card-header) { display:none !important; }
  .profile-detail-card.collapsed .profile-card-header { margin-bottom:0; }



  .isb-scrim{position:fixed;inset:0;background:rgba(20,16,28,.45);opacity:0;pointer-events:none;transition:opacity .22s;z-index:100070;}
  .isb-scrim.show{opacity:1;pointer-events:auto;}
  .isb-panel{position:fixed;top:0;right:0;height:100%;width:80vw;max-width:96vw;background:#fff;box-shadow:-12px 0 40px rgba(20,16,40,.16);transform:translateX(100%);transition:transform .26s cubic-bezier(.16,1,.3,1);z-index:100071;display:flex;flex-direction:column;font-family:'DM Sans',sans-serif;}
  .isb-panel.show{transform:translateX(0);}
  .isb-head{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #EFEDF2;gap:12px;}
  .isb-head h3{margin:0;font-size:17px;font-weight:700;color:#1C1C1C;}
  .isb-x{width:30px;height:30px;border:none;background:transparent;color:#9A93A6;border-radius:8px;cursor:pointer;font-size:17px;line-height:1;}
  .isb-x:hover{background:#F4F2F7;color:#1C1C1C;}
  .isb-roletoggle{display:inline-flex;background:#EEEBF3;border-radius:9px;padding:3px;gap:2px;}
  .isb-rolebtn{border:none;background:transparent;padding:6px 14px;border-radius:7px;font-size:12.5px;font-weight:600;color:#6B6676;cursor:pointer;font-family:inherit;}
  .isb-rolebtn.active{background:#fff;color:#452E5A;box-shadow:0 1px 3px rgba(0,0,0,.08);}
  .isb-sub{padding:11px 24px;font-size:12.5px;color:#8B8B8B;border-bottom:1px solid #F2F0F5;background:#FBFAFC;}
  .isb-searchwrap{padding:14px 24px 4px;position:relative;}
  .isb-searchwrap svg{position:absolute;left:36px;top:50%;transform:translateY(-30%);width:15px;height:15px;color:#9A93A6;pointer-events:none;}
  .isb-search{width:100%;border:1px solid #E2E2E6;border-radius:10px;padding:10px 14px 10px 38px;font-size:13.5px;font-family:inherit;color:#1C1C1C;outline:none;background:#fff;transition:border-color .15s,box-shadow .15s;}
  .isb-search:focus{border-color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.12);}
  .isb-search::placeholder{color:#9A93A6;}
  .isb-empty-search{padding:34px 24px;text-align:center;color:#9A93A6;font-size:13.5px;}
  .isb-listscreen,.isb-detailscreen{flex:1;display:flex;flex-direction:column;min-height:0;}
  .isb-scroll{flex:1;overflow-y:auto;padding:16px 24px 30px;}
  .isb-card{border:1px solid #ECEAF1;border-radius:12px;padding:15px 16px;margin-bottom:12px;}
  .isb-group{display:flex;align-items:center;gap:8px;font-size:11.5px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:#8B8B8B;margin:20px 2px 11px;}
  .isb-group:first-child{margin-top:2px;}
  .isb-group::after{content:"";flex:1;height:1px;background:#ECEAF1;}
  .isb-group-count{background:#EEEBF3;color:#6B6676;font-size:10.5px;font-weight:700;padding:1px 8px;border-radius:20px;letter-spacing:0;}
  .isb-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
  .isb-card-name{font-size:14.5px;font-weight:700;color:#1C1C1C;}
  .isb-card-meta{font-size:12px;color:#9A93A6;margin-bottom:13px;display:flex;gap:16px;flex-wrap:wrap;}
  .isb-badge{font-size:10.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;padding:4px 11px;border-radius:20px;white-space:nowrap;}
  .isb-actions{display:flex;gap:8px;flex-wrap:wrap;}
  #isbListContent{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch;}
  #isbListContent .isb-card{margin-bottom:0;display:flex;flex-direction:column;height:100%;}
  @media (max-width:1280px){#isbListContent{grid-template-columns:repeat(3,minmax(0,1fr));}}
  @media (max-width:980px){#isbListContent{grid-template-columns:repeat(2,minmax(0,1fr));}}
  @media (max-width:680px){#isbListContent{grid-template-columns:1fr;}}
  .isb-btn{border:1px solid #E1DEE8;background:#fff;color:#3A3743;font-size:12.5px;font-weight:600;padding:7px 14px;border-radius:8px;cursor:pointer;font-family:inherit;transition:all .12s;}
  .isb-btn:hover{background:#F6F4FA;border-color:#D3CCE0;}
  .isb-btn.primary{background:#452E5A;border-color:#452E5A;color:#fff;}
  .isb-btn.primary:hover{background:#5B3D76;}
  .isb-btn.danger{color:#D14343;border-color:#F0D5D5;}
  .isb-btn.danger:hover{background:#FCEDED;}
  .isb-btn.good{color:#1E8E4E;border-color:#CDEBD8;}
  .isb-btn.good:hover{background:#EAF7EF;}
  .isb-detail-top{padding:12px 24px;border-bottom:1px solid #EFEDF2;display:flex;align-items:center;justify-content:space-between;gap:12px;}
  .isb-back{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;color:#452E5A;font-weight:600;font-size:13px;cursor:pointer;font-family:inherit;padding:4px 0;}
  .isb-back:hover{text-decoration:underline;}
  /* While reviewing a single invoice, hide the panel's top nav bar. */
  .isb-panel.reviewing .isb-head{display:none;}
  .isb-section{margin-top:16px;}
  .isb-section h4{font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:#9A93A6;margin:0 0 8px;}
  .isb-submeta{font-size:13px;color:#5C5867;line-height:1.5;}
  .isb-submeta b{color:#1C1C1C;font-weight:600;}
  .isb-kv{display:flex;justify-content:space-between;gap:14px;padding:7px 0;font-size:13px;border-bottom:1px solid #F4F2F7;}
  .isb-kv span:first-child{color:#8B8B8B;}
  .isb-kv span:last-child{color:#1C1C1C;font-weight:600;text-align:right;}
  .isb-act{display:flex;gap:10px;padding:9px 0;}
  .isb-act-dot{width:8px;height:8px;border-radius:50%;background:#C4BBD2;margin-top:6px;flex-shrink:0;}
  .isb-act-body{flex:1;}
  .isb-act-line{font-size:13px;color:#2C2935;}
  .isb-act-line b{color:#1C1C1C;}
  .isb-act-sub{font-size:11.5px;color:#A4A0AD;margin-top:1px;}
  .isb-act-detail{font-size:12px;color:#7C7888;margin-top:3px;font-style:italic;}
  .isb-diff{border:1px solid #ECEAF1;border-radius:10px;overflow:hidden;margin-bottom:10px;}
  .isb-diff-head{padding:9px 12px;background:#FBFAFC;font-size:12.5px;font-weight:700;color:#1C1C1C;border-bottom:1px solid #EFEDF2;}
  .isb-diff-row{display:grid;grid-template-columns:1fr 1fr;}
  .isb-diff-cell{padding:9px 12px;font-size:12.5px;line-height:1.4;}
  .isb-diff-prev{background:#FDF0F0;color:#A23B3B;}
  .isb-diff-next{background:#EDF8F0;color:#1E8E4E;}
  .isb-diff-cap{font-size:10px;text-transform:uppercase;letter-spacing:.3px;margin-bottom:3px;opacity:.75;}
  .isb-diff-meta{padding:8px 12px;font-size:11.5px;color:#8B8B8B;border-top:1px solid #F2F0F5;}
  .isb-comment{background:#FBFAFC;border:1px solid #EFEDF2;border-radius:10px;padding:10px 12px;margin-bottom:8px;}
  .isb-comment-meta{font-size:11.5px;color:#9A93A6;margin-bottom:3px;}
  .isb-comment-text{font-size:13px;color:#2C2935;}
  .isb-empty{font-size:12.5px;color:#A4A0AD;padding:4px 0;}
  .isb-field{margin-bottom:12px;}
  .isb-field label{display:block;font-size:11.5px;font-weight:600;color:#6B6676;margin-bottom:5px;}
  .isb-field input,.isb-field textarea{width:100%;box-sizing:border-box;border:1px solid #E1DEE8;border-radius:9px;padding:9px 11px;font-size:13px;font-family:inherit;color:#23202B;outline:none;resize:vertical;}
  .isb-field input:focus,.isb-field textarea:focus{border-color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.1);}
  .isb-card{border-left-width:1px;}
  .isb-summary{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 14px;margin-bottom:16px;border-bottom:1px solid #F2F0F5;}
  .isb-chip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;padding:5px 10px;border-radius:20px;}
  .isb-chip .dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
  .isb-attention{font-size:12.5px;color:#D97316;font-weight:700;margin:0 0 12px;display:flex;align-items:center;gap:7px;}
  .isb-next{font-size:12px;color:#6B6676;margin:2px 0 12px;line-height:1.4;}
  .isb-reason{background:#FFF7ED;border:1px solid #FCE3C4;border-radius:8px;padding:8px 11px;font-size:12px;color:#8A5A1E;margin:0 0 12px;line-height:1.45;}
  .isb-reason b{color:#7A4E18;}
  .isb-attn-pill{display:inline-flex;align-items:center;gap:5px;font-size:9.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;color:#D97316;background:#FFF1E0;padding:3px 8px;border-radius:20px;}
  .isb-statusline{font-size:12.5px;color:#6B6676;margin:6px 0 16px;line-height:1.45;}
  .isb-stepper{display:flex;align-items:flex-start;margin:4px 0 10px;}
  .isb-step{display:flex;flex-direction:column;align-items:center;flex:1;position:relative;}
  .isb-step .node{width:24px;height:24px;border-radius:50%;border:2px solid #E1DEE8;background:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#B7B1C2;position:relative;z-index:1;}
  .isb-step.done .node{background:#452E5A;border-color:#452E5A;color:#fff;}
  .isb-step.active .node{border-color:#452E5A;color:#452E5A;box-shadow:0 0 0 3px rgba(69,46,90,.12);}
  .isb-step .lbl{font-size:10.5px;color:#9A93A6;margin-top:7px;text-align:center;line-height:1.2;}
  .isb-step.done .lbl,.isb-step.active .lbl{color:#1C1C1C;font-weight:600;}
  .isb-step .bar{position:absolute;top:11px;left:50%;width:100%;height:2px;background:#E1DEE8;z-index:0;}
  .isb-step.done .bar{background:#452E5A;}
  .isb-step:last-child .bar{display:none;}
  .isb-invoice{border:1px solid #ECEAF1;border-radius:12px;background:#fff;padding:28px 30px 20px;overflow-x:auto;}
  .isb-invoice table{width:100%;}
  .isb-attach{display:flex;align-items:center;gap:10px;border:1px solid #E1DEE8;border-radius:10px;padding:10px 12px;font-size:13px;color:#3A3743;}
  .isb-attach .name{font-weight:600;color:#1C1C1C;}
  .isb-attach .view{margin-left:auto;color:#452E5A;font-weight:600;cursor:pointer;font-size:12.5px;}
  .isb-attach .view:hover{text-decoration:underline;}


