/* ─────────────────────────────────────────────────────────────
   Dashboard Header — base styles
   ───────────────────────────────────────────────────────────── */

   .esg_text {
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    margin-bottom: -2px;
  }
  
  .leftmarg { margin-left: -7%; }
  
  .esg_text2 {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-bottom: -2px;
    border: 2px solid #3f88a5;
    border-radius: 10px;
    padding: 5px;
  }
  
  .esg_button_style {
    border: none;
    color: var(--neutralColor);
    padding: 9px 20px;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 13px;
    transition: 1s;
    background: var(--primaryColor);
  }
  
  .syncButton {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
  }
  
  .esg_button_style:hover { background: var(--secondaryColor); }
  
  .m-n20 { margin-left: -60px; }
  
  .custom-tab-esg .nav-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    transition: color 0.3s, background-color 0.3s;
  }
  .custom-tab-esg .nav-link.active {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
  }
  .custom-tab-esg .nav-link:hover {
    color: #007bff;
    background-color: #e9ecef;
  }
  
  /* ─────────────────────────────────────────────────────────────
     ESG Report Modal — redesigned
     Clean white · crisp lines · no gradients · refined spacing
     ───────────────────────────────────────────────────────────── */
  
  .report-config-dialog {
    max-width: 960px;
  }
  
  /* Modal shell */
  .report-config-modal {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(0,0,0,0.06),
      0 8px 16px rgba(0,0,0,0.06),
      0 32px 64px rgba(15,47,82,0.14);
    background: #ffffff;
  }
  
  /* Header */
  .report-config-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid #f0f4f8;
    background: #ffffff;
    display: flex;
    align-items: center;
  }
  
  .report-config-header .btn-close,
  .report-config-header .close {
    margin: 0;
    opacity: 0.4;
  }
  .report-config-header .btn-close:hover,
  .report-config-header .close:hover {
    opacity: 0.75;
  }
  
  .report-config-title {
    color: #0f1f30;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1;
  }
  
  /* Body */
  .report-config-body {
    padding: 28px 32px 32px;
    background: #fafbfc;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: 82vh;
  }
  
  .report-config-subtitle {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 20px !important;
    text-align: left;
  }
  
  /* Form fields */
  .report-config-field {
    background: transparent;
  }
  
  .report-config-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 7px;
    display: block;
  }
  
  .report-required-star {
    color: #ef4444;
    margin-left: 2px;
  }
  
  .report-config-select {
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    padding-left: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color .15s, box-shadow .15s;
  }
  
  .report-config-select:focus {
    border-color: #3f88a5;
    box-shadow: 0 0 0 3px rgba(63,136,165,0.12);
    outline: none;
  }
  
  .report-config-select-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
  }
  
  .report-field-error {
    margin-top: 6px;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
  }
  
  /* Fields grid row */
  .report-config-grid {
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e8edf3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  
  /* Action buttons */
  .report-config-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .report-config-actions-main {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #f0f4f8;
  }
  
  .report-config-actions .new_button_style {
    min-width: 160px;
    height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.1px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(15,47,82,0.1);
    white-space: nowrap;
    transition: all .15s;
  }
  
  .report-config-actions .new_button_style:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1), 0 8px 20px rgba(15,47,82,0.14);
  }
  
  /* ─────────────────────────────────────────────────────────────
     Template carousel section
     ───────────────────────────────────────────────────────────── */
  
  .module-template-selector {
    margin: 20px 0 8px;
    padding-top: 20px;
    border-top: 1px solid #f0f4f8;
  }
  
  .module-template-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
  }
  
  .module-template-selector-copy {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
  }
  
  .module-template-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  
  /* ─────────────────────────────────────────────────────────────
     Template card (grid view — used in old selector)
     ───────────────────────────────────────────────────────────── */
  
  .module-template-card {
    position: relative;
    padding: 0;
    border: 1.5px solid #e8edf3;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    text-align: left;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, border-color .18s;
  }
  
  .module-template-card:hover {
    transform: translateY(-2px);
    border-color: #93c5e0;
    box-shadow: 0 8px 24px rgba(15,47,82,0.10);
  }
  
  .module-template-card.selected {
    border-color: #3f88a5;
    box-shadow: 0 0 0 3px rgba(63,136,165,0.15), 0 8px 24px rgba(15,47,82,0.10);
  }
  
  .module-template-preview-shell {
    position: relative;
    overflow: hidden;
    background: #f5f8fb;
  }
  
  .module-template-selected-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15,31,48,0.65);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
  }
  
  .module-template-card.selected .module-template-selected-badge {
    background: #3f88a5;
  }
  
  .module-template-preview {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .module-template-preview.compact { height: 160px; }
  
  .module-template-preview.full {
    width: 780px;
    min-height: 980px;
    padding: 28px;
    gap: 18px;
  }
  
  /* preview inner elements */
  .module-template-preview-topline {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.14em;
    opacity: 0.85;
  }
  .module-template-preview.full .module-template-preview-topline { font-size: 14px; }
  
  .module-template-preview-hero {
    border-radius: 10px;
    padding: 10px;
    display: grid;
    gap: 10px;
  }
  .module-template-preview.full .module-template-preview-hero {
    border-radius: 22px;
    padding: 24px;
    gap: 20px;
  }
  
  .module-template-preview-stat-panel { display: flex; flex-direction: column; gap: 4px; }
  .module-template-preview-hero-meta  { display: flex; flex-direction: column; gap: 6px; }
  
  .module-template-preview-subcopy { font-size: 7px; line-height: 1.35; opacity: 0.8; }
  .module-template-preview.full .module-template-preview-subcopy { font-size: 17px; }
  
  .module-template-preview-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .module-template-preview-meta-grid span {
    display: block; font-size: 6px; font-weight: 700;
    letter-spacing: 0.12em; opacity: 0.72; margin-bottom: 2px;
  }
  .module-template-preview-meta-grid strong { display: block; font-size: 7px; line-height: 1.2; }
  .module-template-preview.full .module-template-preview-meta-grid { gap: 16px; }
  .module-template-preview.full .module-template-preview-meta-grid span { font-size: 12px; margin-bottom: 6px; }
  .module-template-preview.full .module-template-preview-meta-grid strong { font-size: 22px; }
  
  .module-template-preview-stat-badge {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .module-template-preview-stat-badge-label { font-size: 6px; font-weight: 700; letter-spacing: 0.14em; opacity: 0.76; }
  .module-template-preview-stat-badge-pill {
    padding: 2px 6px; border-radius: 999px; font-size: 6px; font-weight: 700;
    background: rgba(255,255,255,0.14);
  }
  .module-template-preview.full .module-template-preview-stat-badge-label { font-size: 12px; }
  .module-template-preview.full .module-template-preview-stat-badge-pill { padding: 8px 14px; font-size: 13px; }
  
  .module-template-preview-title { font-size: 14px; font-weight: 700; line-height: 1.1; }
  .module-template-preview.full .module-template-preview-title { font-size: 42px; }
  
  .module-template-preview-subtitle { margin-top: 3px; font-size: 8px; opacity: 0.75; }
  .module-template-preview.full .module-template-preview-subtitle { margin-top: 8px; font-size: 18px; }
  
  .module-template-preview-stat {
    margin-top: 8px; width: fit-content; padding: 3px 7px;
    border-radius: 999px; font-size: 9px; font-weight: 700;
  }
  .module-template-preview.full .module-template-preview-stat { margin-top: 18px; padding: 10px 18px; font-size: 18px; }
  
  .module-template-preview-chips {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  }
  .module-template-preview.full .module-template-preview-chips { gap: 14px; }
  
  .module-template-preview-chip-card {
    display: flex; flex-direction: column; gap: 2px;
    min-height: 20px; border-radius: 7px; padding: 6px 7px;
    background: rgba(255,255,255,0.78); border: 1px solid rgba(184,211,234,0.4);
  }
  .module-template-preview.full .module-template-preview-chip-card {
    min-height: 74px; border-radius: 16px; padding: 16px 16px 14px;
  }
  
  .module-template-preview-chip-label { font-size: 5px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.7; }
  .module-template-preview-chip-value { font-size: 11px; font-weight: 700; line-height: 1.1; }
  .module-template-preview-chip-meta  { font-size: 5px; opacity: 0.72; }
  .module-template-preview.full .module-template-preview-chip-label { font-size: 11px; }
  .module-template-preview.full .module-template-preview-chip-value { font-size: 28px; }
  .module-template-preview.full .module-template-preview-chip-meta  { font-size: 11px; }
  
  .module-template-preview-table-wrap {
    display: grid; gap: 0; margin-top: auto;
    border-radius: 8px; overflow: hidden;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(184,211,234,0.45);
  }
  .module-template-preview.full .module-template-preview-table-wrap { border-radius: 20px; }
  
  .module-template-preview-table-title {
    padding: 5px 8px; text-align: center; font-size: 9px; font-weight: 700;
  }
  .module-template-preview.full .module-template-preview-table-title { padding: 14px 18px; font-size: 26px; }
  
  .module-template-preview-table-grid { display: grid; }
  
  .module-template-preview-th,
  .module-template-preview-td {
    padding: 4px 5px; font-size: 5.5px;
    border-top: 1px solid rgba(184,211,234,0.42);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .module-template-preview-th { font-weight: 700; letter-spacing: 0.08em; background: rgba(236,245,252,0.74); }
  .module-template-preview-td.is-total { font-weight: 700; }
  .module-template-preview.full .module-template-preview-th,
  .module-template-preview.full .module-template-preview-td { padding: 12px 16px; font-size: 15px; }
  
  /* Theme variants */
  .module-template-preview-modern {
    background: #f8fbff; color: #0f2f52;
  }
  .module-template-preview-modern .module-template-preview-hero {
    background: linear-gradient(135deg, #102947 0%, #173d68 58%, #0f2f52 100%);
    color: #ffffff;
  }
  .module-template-preview-modern .module-template-preview-stat { background: rgba(40,165,255,0.16); color: #9ad7ff; }
  .module-template-preview-modern .module-template-preview-table-title { background: #173d68; color: #ffffff; }
  
  .module-template-preview-clean {
    background: #f7f9fc; color: #1e2d3d;
  }
  .module-template-preview-clean .module-template-preview-hero {
    background: linear-gradient(135deg, #ffffff 0%, #eef6fb 100%);
    border-left: 5px solid #3f88a5; color: #1e2d3d;
  }
  .module-template-preview-clean .module-template-preview-stat { background: #e8f4fb; color: #3f88a5; }
  .module-template-preview-clean .module-template-preview-table-title { background: #f0f7ff; color: #1e2d3d; }
  
  .module-template-preview-executive {
    background: #181828; color: #f4f0df;
  }
  .module-template-preview-executive .module-template-preview-hero {
    background: linear-gradient(160deg, #0d0d1e 0%, #1a1a2e 60%, #161626 100%);
    border-bottom: 2px solid #c9a84c; color: #ffffff;
  }
  .module-template-preview-executive .module-template-preview-stat { background: rgba(201,168,76,0.18); color: #e9d69b; }
  .module-template-preview-executive .module-template-preview-chip-card,
  .module-template-preview-executive .module-template-preview-table-wrap { background: rgba(255,255,255,0.05); border-color: rgba(201,168,76,0.18); }
  .module-template-preview-executive .module-template-preview-table-title,
  .module-template-preview-executive .module-template-preview-th { background: rgba(201,168,76,0.1); color: #f3dd9a; }
  .module-template-preview-executive .module-template-preview-td,
  .module-template-preview-executive .module-template-preview-meta-grid span,
  .module-template-preview-executive .module-template-preview-subtitle,
  .module-template-preview-executive .module-template-preview-subcopy { color: rgba(255,255,255,0.78); }
  
  .module-template-preview-nature {
    background: #f5f2ec; color: #29442f;
  }
  .module-template-preview-nature .module-template-preview-hero {
    background: linear-gradient(135deg, #1a3a2a 0%, #2d5a3d 55%, #1e4530 100%);
    color: #ffffff;
  }
  .module-template-preview-nature .module-template-preview-stat { background: rgba(134,239,172,0.18); color: #0c6b36; }
  .module-template-preview-nature .module-template-preview-chip-card:nth-child(2) { background: #eef7e8; }
  .module-template-preview-nature .module-template-preview-chip-card:nth-child(3) { background: #fff4df; border-color: #e9dcb8; }
  .module-template-preview-nature .module-template-preview-table-title { background: #2d5a3d; color: #ffffff; }
  
  /* Card footer */
  .module-template-card-footer {
    padding: 10px 12px 12px;
    border-top: 1px solid #f0f4f8;
    background: #fff;
  }
  
  .module-template-eye-btn {
    position: absolute;
    right: 8px; bottom: 8px; z-index: 2;
    border: 1px solid rgba(255,255,255,0.8);
    background: rgba(15,24,39,0.65);
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(3px);
    transition: all .18s ease;
    cursor: pointer;
    backdrop-filter: blur(6px);
  }
  .module-template-card:hover .module-template-eye-btn { opacity: 1; transform: translateY(0); }
  
  .module-template-card-name {
    color: #0f1f30;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
  }
  
  .module-template-card-desc {
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.4;
  }
  
  /* ─────────────────────────────────────────────────────────────
     Preview modal (full-size preview overlay)
     ───────────────────────────────────────────────────────────── */
  
  .module-template-preview-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,24,39,0.55);
    backdrop-filter: blur(4px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  
  .module-template-preview-modal {
    width: min(1040px, 100%);
    max-height: 90vh;
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
  }
  
  /* Modal topbar */
  .module-tpm-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f4f8;
    background: #ffffff;
    flex-shrink: 0;
  }
  
  .module-tpm-topbar-left  { display: flex; gap: 6px; flex-shrink: 0; }
  .module-tpm-topbar-center {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 1px; min-width: 0;
  }
  .module-tpm-title { font-size: 14px; font-weight: 700; color: #111827; }
  .module-tpm-desc  { font-size: 11px; color: #6b7280; }
  .module-tpm-topbar-right { display: flex; gap: 7px; align-items: center; flex-shrink: 0; }
  
  .module-tpm-nav-btn {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all .12s;
    white-space: nowrap;
  }
  .module-tpm-nav-btn:hover:not(:disabled) { border-color: #3f88a5; color: #3f88a5; background: #f0f9ff; }
  .module-tpm-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  
  .module-tpm-select-btn {
    background: #3f88a5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
  }
  .module-tpm-select-btn:hover:not(:disabled) {
    background: #326e87;
    box-shadow: 0 4px 12px rgba(63,136,165,0.28);
  }
  .module-tpm-select-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  
  .module-tpm-close-btn {
    width: 30px; height: 30px;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #9ca3af;
    font-size: 18px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .12s;
    flex-shrink: 0;
  }
  .module-tpm-close-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #ef4444; }
  
  /* Thumbnail strip */
  .module-tpm-strip-wrapper {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    overflow-x: auto;
    flex-shrink: 0;
    border-bottom: 1px solid #f0f4f8;
    background: #f8fafc;
    scroll-behavior: smooth;
    align-items: flex-end;
  }
  
  .module-tpm-thumb {
    flex-shrink: 0;
    width: 136px;
    border: 1.5px solid #e8edf3;
    border-radius: 9px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    padding: 0;
    position: relative;
    transition: all .18s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .module-tpm-thumb:hover { border-color: #93c5e0; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
  .module-tpm-thumb.active { border-color: #3f88a5; box-shadow: 0 0 0 2.5px rgba(63,136,165,0.2), 0 6px 16px rgba(63,136,165,0.14); transform: translateY(-3px); }
  .module-tpm-thumb.selected:not(.active) { border-color: #10b981; }
  
  .module-tpm-thumb-preview {
    width: 100%; height: 84px; overflow: hidden;
    background: #f1f5f9; position: relative;
  }
  .module-tpm-thumb-preview .module-template-preview.compact {
    transform: scale(0.175);
    transform-origin: top left;
    width: 780px;
    pointer-events: none;
  }
  
  .module-tpm-thumb-label {
    padding: 6px 8px;
    font-size: 10px; font-weight: 600; color: #1e293b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    letter-spacing: 0.01em;
  }
  
  .module-tpm-thumb-badge {
    position: absolute; top: 5px; right: 5px; z-index: 2;
    background: #10b981; color: #ffffff;
    font-size: 9px; font-weight: 800;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(16,185,129,0.4);
  }
  
  .module-template-preview-modal-body {
    padding: 0; overflow: auto;
    background: #eef2f7; flex: 1; min-height: 0;
  }
  
  .module-template-preview-stage {
    width: 780px; margin: 0 auto; overflow: visible;
  }
  
  /* MultiSelect inside modal */
  .report-config-modal .multiselect-container { border-radius: 10px; }
  .report-config-modal .multiselect-input {
    min-height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  }
  
  /* BRSR action buttons */
  .report-config-actions-brsr {
    justify-content: center;
    gap: 12px;
  }
  .report-config-actions-brsr .new_button_style {
    min-width: 140px;
  }
  
  /* ─────────────────────────────────────────────────────────────
     Responsive
     ───────────────────────────────────────────────────────────── */
  
  @media (max-width: 991px) {
    .report-config-dialog { max-width: 94vw; }
    .report-config-body { padding: 22px 20px 26px; }
    .report-config-subtitle { font-size: 14px; }
    .module-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  
  @media (max-width: 1199px) {
    .report-config-actions-main { width: 100%; }
    .report-config-actions-main .new_button_style { flex: 1 1 160px; max-width: 220px; }
  }
  
  @media (max-width: 767px) {
    .report-config-body { padding: 20px 16px 24px; }
    .report-config-actions { gap: 10px; }
    .report-config-actions .new_button_style { width: 100%; min-width: 0; max-width: 100%; }
  }
  
  @media (max-width: 575px) {
    .module-template-grid { grid-template-columns: 1fr; }
  }