/* ==========================================================================
   Governance Hub — Intellimis Theme System
   Matches institution common.css & custome-theme.css brand colours
   ========================================================================== */

:root {
    /* Brand palette — DiraOne */
    --gh-primary: #008B9C;
    --gh-primary-dark: #007A8A;
    --gh-primary-hover: #009DAF;
    --gh-accent: #C1A35F;
    --gh-accent-dark: #A88D4F;
    --gh-brand: #001D4A;
    --gh-brand-dark: #001233;
    --gh-brand-light: #002855;

    /* Soft tints derived from primary */
    --gh-primary-soft: #e6f4f6;
    --gh-primary-softer: #f2fafb;
    --gh-primary-border: #b8dce2;
    --gh-primary-focus: rgba(0, 139, 156, 0.16);
    --gh-primary-shadow: rgba(0, 139, 156, 0.24);
    --gh-brand-shadow: rgba(0, 29, 74, 0.18);

    /* Neutrals */
    --gh-navy: #001D4A;
    --gh-navy-soft: #1e293b;
    --gh-text: #212529;
    --gh-muted: #64748b;
    --gh-border: #e2e8f0;
    --gh-bg: #f5f8fa;
    --gh-card: #ffffff;
    --gh-shadow: 0 1px 2px rgba(0, 82, 118, 0.05), 0 8px 24px rgba(0, 82, 118, 0.07);
    --gh-radius: 16px;
    --gh-radius-lg: 18px;

    /* Semantic */
    --gh-success: #16a34a;
    --gh-warning: #ea580c;
    --gh-danger: #dc2626;
    --gh-info: var(--gh-brand);
}

/* --------------------------------------------------------------------------
   Shared CTA buttons — use on .btn.gh-btn-primary etc.
   -------------------------------------------------------------------------- */
.gh-btn-primary,
.governance-hub-page .gh-btn-primary {
    background: var(--gh-primary) !important;
    border: 1px solid var(--gh-primary) !important;
    color: #fff !important;
    border-radius: 10px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px var(--gh-primary-shadow);
    transition: background .18s ease, border-color .18s ease, transform .15s ease, box-shadow .18s ease;
}

.gh-btn-primary:hover,
.gh-btn-primary:focus,
.governance-hub-page .gh-btn-primary:hover,
.governance-hub-page .gh-btn-primary:focus {
    background: var(--gh-brand) !important;
    border-color: var(--gh-brand) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--gh-brand-shadow);
}

.gh-btn-secondary,
.governance-hub-page .gh-btn-secondary {
    background: #fff !important;
    border: 1px solid var(--gh-border) !important;
    color: var(--gh-brand) !important;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 14px;
    transition: all .18s ease;
}

.gh-btn-secondary:hover,
.gh-btn-secondary:focus,
.governance-hub-page .gh-btn-secondary:hover,
.governance-hub-page .gh-btn-secondary:focus {
    background: var(--gh-primary-soft) !important;
    border-color: var(--gh-primary-border) !important;
    color: var(--gh-brand) !important;
}

.gh-btn-brand,
.governance-hub-page .gh-btn-brand {
    background: var(--gh-brand) !important;
    border: 1px solid var(--gh-brand) !important;
    color: #fff !important;
    border-radius: 10px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 14px;
    transition: all .18s ease;
}

.gh-btn-brand:hover,
.gh-btn-brand:focus {
    background: var(--gh-brand-dark) !important;
    border-color: var(--gh-brand-dark) !important;
    color: #fff !important;
}

.gh-btn-ghost,
.governance-hub-page .gh-btn-ghost {
    background: transparent !important;
    border: 1px solid var(--gh-border) !important;
    color: var(--gh-navy-soft) !important;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 14px;
    transition: all .18s ease;
}

.gh-btn-ghost:hover,
.gh-btn-ghost:focus {
    background: var(--gh-bg) !important;
    border-color: #cbd5e1 !important;
    color: var(--gh-brand) !important;
}

/* Brand icon badge used in page headers */
.gh-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--gh-brand) 0%, var(--gh-primary) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 20px var(--gh-brand-shadow);
    flex-shrink: 0;
}

.gh-brand-icon.gh-brand-icon-soft {
    background: linear-gradient(135deg, var(--gh-primary-soft) 0%, var(--gh-primary-softer) 100%);
    color: var(--gh-brand);
    box-shadow: inset 0 0 0 1px var(--gh-primary-border);
}

/* Active filter chips */
.gh-chip.active,
.gh-chip.is-active {
    background: var(--gh-primary) !important;
    border-color: var(--gh-primary) !important;
    color: #fff !important;
}

.gh-chip-dark.active,
.gh-chip-dark.is-active {
    background: var(--gh-brand) !important;
    border-color: var(--gh-brand) !important;
    color: #fff !important;
}

/* --------------------------------------------------------------------------
   Toast notifications
   -------------------------------------------------------------------------- */
.ghu-toast-host {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.ghu-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--gh-border);
    box-shadow: 0 12px 32px rgba(0, 82, 118, 0.14);
    font-size: 14px;
    line-height: 1.45;
    color: var(--gh-navy);
    pointer-events: auto;
    animation: ghu-toast-in .28s ease;
    transition: opacity .25s ease, transform .25s ease;
}

.ghu-toast.is-hiding {
    opacity: 0;
    transform: translateX(12px);
}

.ghu-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.ghu-toast-body { flex: 1; min-width: 0; }
.ghu-toast-title { font-weight: 700; margin-bottom: 2px; }
.ghu-toast-message { color: #475569; }

.ghu-toast-success .ghu-toast-icon { background: #dcfce7; color: var(--gh-success); }
.ghu-toast-error .ghu-toast-icon { background: #fee2e2; color: var(--gh-danger); }
.ghu-toast-warning .ghu-toast-icon { background: #ffedd5; color: var(--gh-warning); }
.ghu-toast-info .ghu-toast-icon { background: var(--gh-primary-soft); color: var(--gh-brand); }

.ghu-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.ghu-toast-close:hover { color: #64748b; }

@keyframes ghu-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Confirm modal — shared professional dialog (GovHubUI.confirm)
   -------------------------------------------------------------------------- */
.ghu-confirm-modal {
    z-index: 10060;
}

.ghu-confirm-modal + .modal-backdrop {
    z-index: 10050;
    background: rgba(15, 23, 42, 0.55);
}

.ghu-confirm-dialog {
    width: 440px;
    max-width: calc(100vw - 32px);
    margin: 16px auto;
}

.ghu-confirm-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.ghu-confirm-body-wrap {
    position: relative;
    padding: 28px 28px 8px;
    text-align: center;
}

.ghu-confirm-close {
    position: absolute;
    top: 14px;
    right: 16px;
    margin: 0;
    opacity: 0.45;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    color: #64748b;
    text-shadow: none;
}

.ghu-confirm-close:hover {
    opacity: 0.85;
    color: #334155;
}

.ghu-confirm-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ghu-confirm-tone-info {
    background: linear-gradient(145deg, #e0f2fe 0%, #f0f9ff 100%);
    color: var(--gh-brand, #005276);
}

.ghu-confirm-tone-warning {
    background: linear-gradient(145deg, #ffedd5 0%, #fff7ed 100%);
    color: #c2410c;
}

.ghu-confirm-tone-danger {
    background: linear-gradient(145deg, #fee2e2 0%, #fef2f2 100%);
    color: #dc2626;
}

.ghu-confirm-tone-success,
.ghu-confirm-tone-submit {
    background: linear-gradient(145deg, #dcfce7 0%, #f0fdf4 100%);
    color: #15803d;
}

.ghu-confirm-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.ghu-confirm-message {
    margin: 0 auto;
    max-width: 360px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.ghu-confirm-message strong {
    color: #334155;
    font-weight: 600;
}

.ghu-confirm-footer {
    border-top: 1px solid #e2e8f0;
    padding: 18px 24px 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
    background: #fafbfc;
}

.ghu-confirm-footer .btn {
    min-width: 128px;
    border-radius: 12px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.ghu-confirm-modal .ghu-btn-cancel {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.ghu-confirm-modal .ghu-btn-cancel:hover,
.ghu-confirm-modal .ghu-btn-cancel:focus {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.ghu-confirm-modal .ghu-btn-confirm {
    background: linear-gradient(135deg, var(--do-teal) 0%, var(--do-teal-dark) 100%);
    border: 1px solid var(--do-teal-dark);
    color: #fff;
    box-shadow: 0 8px 18px var(--gh-primary-shadow);
}

.ghu-confirm-modal .ghu-btn-confirm:hover,
.ghu-confirm-modal .ghu-btn-confirm:focus {
    background: linear-gradient(135deg, var(--do-navy-mid) 0%, var(--do-navy) 100%);
    border-color: var(--do-navy);
    color: #fff;
}

.ghu-confirm-modal .ghu-btn-confirm.is-danger {
    background: linear-gradient(145deg, #dc2626 0%, #ef4444 100%);
    border-color: #dc2626;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

.ghu-confirm-modal .ghu-btn-confirm.is-danger:hover,
.ghu-confirm-modal .ghu-btn-confirm.is-danger:focus {
    background: linear-gradient(145deg, #b91c1c 0%, #dc2626 100%);
    border-color: #b91c1c;
}

.ghu-confirm-modal .ghu-btn-confirm.is-success {
    background: linear-gradient(145deg, #16a34a 0%, #22c55e 100%);
    border-color: #16a34a;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
}

.ghu-confirm-modal .ghu-btn-confirm.is-success:hover,
.ghu-confirm-modal .ghu-btn-confirm.is-success:focus {
    background: linear-gradient(145deg, #15803d 0%, #16a34a 100%);
    border-color: #15803d;
}

.ghu-prompt-modal .ghu-prompt-field {
    margin-top: 16px;
    text-align: left;
}

.ghu-prompt-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.ghu-prompt-label .ghu-required {
    color: #dc2626;
}

.ghu-prompt-input {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    resize: vertical;
    min-height: 96px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
}

.ghu-prompt-input:focus {
    border-color: var(--gh-brand, #005276);
    box-shadow: 0 0 0 3px rgba(0, 82, 118, 0.12);
}

.ghu-prompt-input.has-error {
    border-color: #dc2626;
}

.ghu-prompt-error {
    margin: 8px 0 0;
    color: #dc2626;
    font-size: 12px;
}

.ghu-confirm-modal .ghu-btn-confirm.is-warning {
    background: linear-gradient(145deg, #ea580c 0%, #f97316 100%);
    border-color: #ea580c;
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.22);
}

.ghu-confirm-modal .ghu-btn-confirm.is-warning:hover,
.ghu-confirm-modal .ghu-btn-confirm.is-warning:focus {
    background: linear-gradient(145deg, #c2410c 0%, #ea580c 100%);
    border-color: #c2410c;
}

@media (max-width: 480px) {
    .ghu-confirm-footer {
        flex-direction: column-reverse;
    }

    .ghu-confirm-footer .btn {
        width: 100%;
    }
}

/* Legacy selectors kept for backwards compatibility */
.ghu-confirm-modal .modal-header {
    display: none;
}

.ghu-confirm-modal .modal-body {
    padding: 0;
}

.ghu-confirm-modal .modal-footer {
    border-top: none;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Shared form polish inside governance modals
   -------------------------------------------------------------------------- */
.gdr-modal .form-control,
.gaa-modal .form-control,
.gev-modal .form-control,
.gbpb-modal .form-control,
.gmp-modal .form-control,
.ga-modal .form-control {
    border: 1px solid var(--gh-primary-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    background: var(--gh-primary-softer);
    box-shadow: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.gdr-modal .form-control:focus,
.gaa-modal .form-control:focus,
.gev-modal .form-control:focus,
.gbpb-modal .form-control:focus,
.gmp-modal .form-control:focus,
.ga-modal .form-control:focus {
    border-color: var(--gh-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--gh-primary-focus);
}

.gdr-modal label,
.gaa-modal label,
.gev-modal label,
.gbpb-modal label,
.gmp-modal label,
.ga-modal label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.gdr-modal label.error,
.gaa-modal label.error,
.gev-modal label.error {
    color: var(--gh-danger);
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
}

.gdr-modal .select2-container--default .select2-selection--single,
.gaa-modal .select2-container--default .select2-selection--single,
.gev-modal .select2-container--default .select2-selection--single,
.gmp-modal .select2-container--default .select2-selection--single {
    border: 1px solid var(--gh-primary-border);
    border-radius: 10px;
    min-height: 44px;
    background: var(--gh-primary-softer);
}

.gdr-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.gaa-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.gev-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.gmp-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 14px;
    color: var(--gh-navy);
    font-size: 14px;
}

.gdr-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
.gaa-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
.gev-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
.gmp-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 8px;
}

.gdr-modal .select2-container--default.select2-container--focus .select2-selection--single,
.gaa-modal .select2-container--default.select2-container--focus .select2-selection--single,
.gev-modal .select2-container--default.select2-container--focus .select2-selection--single,
.gmp-modal .select2-container--default.select2-container--focus .select2-selection--single,
.gdr-modal .select2-container--default.select2-container--open .select2-selection--single,
.gaa-modal .select2-container--default.select2-container--open .select2-selection--single,
.gev-modal .select2-container--default.select2-container--open .select2-selection--single,
.gmp-modal .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--gh-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--gh-primary-focus);
}

.gdr-modal .ghu-form-section,
.gaa-modal .ghu-form-section,
.gev-modal .ghu-form-section,
.gh-modal .ghu-form-section {
    margin-bottom: 20px;
    padding-bottom: 4px;
}

.gdr-modal .ghu-form-section-title,
.gaa-modal .ghu-form-section-title,
.gev-modal .ghu-form-section-title,
.gh-modal .ghu-form-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.gh-modal .ghu-form-section-title .fa {
    margin-right: 6px;
    color: var(--gh-primary);
}

/* --------------------------------------------------------------------------
   Skeleton loaders
   -------------------------------------------------------------------------- */
.ghu-skeleton-list { padding: 12px; }

.ghu-skeleton-item {
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: ghu-shimmer 1.4s ease infinite;
    height: 96px;
}

.ghu-skeleton-detail { padding: 24px; }

.ghu-skeleton-line {
    height: 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: ghu-shimmer 1.4s ease infinite;
}

.ghu-skeleton-line.lg { height: 28px; width: 70%; margin-bottom: 20px; }
.ghu-skeleton-line.sm { width: 40%; }
.ghu-skeleton-line.md { width: 55%; }

@keyframes ghu-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Mobile detail back
   -------------------------------------------------------------------------- */
.ghu-mobile-back {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--gh-brand);
    font-size: 14px;
    font-weight: 600;
    padding: 0 0 16px;
    cursor: pointer;
}

.ghu-mobile-back .fa { font-size: 12px; }

/* --------------------------------------------------------------------------
   Governance Hub page shell — consistent background
   -------------------------------------------------------------------------- */
[class*="governance-"][class*="-page"].content,
.governance-evidence-vault-page.content,
.governance-decisions-resolutions-page.content,
.governance-actions-accountability-page.content,
.governance-almanac-page.content,
.governance-meetings-papers-page.content,
.governance-board-paper-builder-page.content,
.governance-committees-page.content,
.governance-board-council-page.content {
    background: var(--gh-bg);
    min-height: calc(100vh - 120px);
    padding: 16px 18px 24px;
}

@media (max-width: 991px) {
    .governance-decisions-resolutions-page .gdr-layout.is-detail-open .gdr-list-panel,
    .governance-actions-accountability-page .gaa-layout.is-detail-open .gaa-list-panel {
        display: none;
    }
    .governance-decisions-resolutions-page .gdr-layout.is-detail-open .gdr-detail-panel,
    .governance-actions-accountability-page .gaa-layout.is-detail-open .gaa-detail-panel {
        min-height: 60vh;
    }
    .ghu-mobile-back.is-visible { display: inline-flex; }
    .ghu-toast-host { top: auto; bottom: 20px; right: 16px; left: 16px; max-width: none; }
}

/* --------------------------------------------------------------------------
   CTA alignment — icon + label spacing across all Governance Hub buttons
   -------------------------------------------------------------------------- */
[class*="governance-"] .btn,
[class*="governance-"] [class*="-btn-primary"],
[class*="governance-"] [class*="-btn-secondary"],
[class*="governance-"] [class*="-btn-ghost"],
[class*="governance-"] [class*="-btn-outline"],
[class*="governance-"] [class*="-btn-success"],
[class*="governance-"] [class*="-btn-danger"],
.gh-btn-primary,
.gh-btn-secondary,
.gh-btn-brand,
.gh-btn-ghost {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.35;
    vertical-align: middle;
    white-space: nowrap;
}

[class*="governance-"] .btn > i.fa,
[class*="governance-"] .btn > i.fas,
[class*="governance-"] [class*="-btn"] > i.fa,
.gh-btn-primary > i.fa,
.gh-btn-secondary > i.fa {
    margin: 0 !important;
    width: 1em;
    text-align: center;
    flex-shrink: 0;
}

[class*="governance-"] .btn.gh-is-loading,
[class*="governance-"] .btn.is-loading,
.gh-is-loading {
    opacity: 0.92;
    cursor: wait;
    pointer-events: none;
}

[class*="governance-"] .btn.gh-is-loading .fa-spinner,
.gh-is-loading .fa-spinner {
    margin: 0 !important;
}

/* Action text links (Edit agenda, + Add paper, etc.) */
.gh-action-link,
[class*="governance-"] .gmp-panel-link,
[class*="governance-"] .gdr-panel-link,
[class*="governance-"] .gc-panel-link {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gh-brand) !important;
    background: var(--gh-primary-soft);
    border: 1px solid var(--gh-primary-border);
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .15s ease, box-shadow .18s ease;
    cursor: pointer;
}

.gh-action-link:hover,
.gh-action-link:focus,
[class*="governance-"] .gmp-panel-link:hover,
[class*="governance-"] .gdr-panel-link:hover,
[class*="governance-"] .gc-panel-link:hover {
    color: #fff !important;
    background: var(--gh-primary);
    border-color: var(--gh-primary);
    box-shadow: 0 4px 12px var(--gh-primary-shadow);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.gh-action-link > i.fa,
[class*="governance-"] .gmp-panel-link > i.fa,
[class*="governance-"] .gdr-panel-link > i.fa {
    font-size: 12px;
    opacity: 0.92;
}

/* Panel header row alignment */
[class*="governance-"] .gmp-panel-head,
[class*="governance-"] .gdr-panel-head,
[class*="governance-"] .gc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Delete / danger controls */
.gh-delete-link,
[class*="governance-"] .gh-delete-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.gh-delete-link.btn-danger,
[class*="governance-"] a.text-danger.gh-delete-link {
    border-radius: 9px;
    padding: 6px 12px;
    transition: background .15s ease, color .15s ease;
}

[class*="governance-"] a.text-danger.gh-delete-link:hover {
    background: #fee2e2;
    text-decoration: none !important;
}

.gh-is-deleting,
[class*="governance-"] .is-removing {
    opacity: 0.55;
    pointer-events: none;
    position: relative;
}

.gh-is-deleting::after,
[class*="governance-"] .is-removing::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    border-radius: inherit;
}

/* --------------------------------------------------------------------------
   SweetAlert — Intellimis theme
   -------------------------------------------------------------------------- */
.sweet-alert {
    border-radius: 18px !important;
    padding: 28px 26px 22px !important;
    box-shadow: 0 24px 48px rgba(0, 82, 118, 0.2) !important;
    font-family: inherit !important;
}

.sweet-alert h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--gh-brand) !important;
    margin: 12px 0 10px !important;
    line-height: 1.35 !important;
}

.sweet-alert p {
    font-size: 15px !important;
    color: #475569 !important;
    line-height: 1.55 !important;
}

.sweet-alert .sa-icon.sa-warning {
    border-color: var(--gh-accent) !important;
}

.sweet-alert .sa-icon.sa-warning .body,
.sweet-alert .sa-icon.sa-warning .dot {
    background-color: var(--gh-accent) !important;
}

.sweet-alert button {
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    margin-top: 22px !important;
    min-width: 110px;
    box-shadow: none !important;
}

.sweet-alert button.confirm {
    background: linear-gradient(135deg, var(--do-teal) 0%, var(--do-teal-dark) 100%) !important;
    border-color: var(--do-teal-dark) !important;
    color: #fff !important;
}

.sweet-alert button.confirm:hover,
.sweet-alert button.confirm:focus {
    background: linear-gradient(135deg, var(--do-navy-mid) 0%, var(--do-navy) 100%) !important;
    border-color: var(--do-navy) !important;
}

.sweet-alert button.cancel {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.sweet-alert button.cancel:hover {
    background-color: #e2e8f0 !important;
}

/* --------------------------------------------------------------------------
   Unified Governance Hub modals — matches Upload Evidence Document pattern
   Apply class "gh-modal" on modal fade root
   -------------------------------------------------------------------------- */
.gh-modal .modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 82, 118, 0.18);
    overflow: hidden;
}

.gh-modal .modal-dialog.gh-modal-compact,
.gh-modal .modal-dialog.gev-success-dialog {
    width: 92% !important;
    max-width: 520px !important;
    margin: 30px auto !important;
}

.gh-modal .modal-dialog.gh-modal-wide,
.gh-modal .modal-dialog.gev-modal-wide,
.gh-modal .modal-dialog.modal-lg:not(.gh-modal-compact),
.gh-modal.gmp-modal-root .modal-dialog:not(.gh-modal-compact),
.gh-modal.ga-modal-root .modal-dialog:not(.gh-modal-compact),
.gh-modal.gc-modal-root .modal-dialog:not(.gh-modal-compact),
.gh-modal.gbc-modal-root .modal-dialog.gbc-committee-dialog,
.gh-modal.gbc-modal-root .modal-dialog.gbc-modal-dialog,
.gh-modal.gbc-modal-root .modal-dialog.gh-modal-wide,
.gh-modal.gaa-modal .modal-dialog.modal-lg {
    width: 92% !important;
    max-width: 960px !important;
    margin: 30px auto !important;
}

.gh-modal .modal-dialog.gbc-profile-dialog {
    width: 92% !important;
    max-width: 720px !important;
    margin: 30px auto !important;
}

/* Form layout — matches Upload Evidence Document (row + col-sm-6) */
.gh-modal .modal-body .form-group,
.gh-modal .modal-body .gmp-form-group,
.gh-modal .modal-body .gbc-form-group,
.gh-modal .modal-body .ga-form-group {
    margin-bottom: 16px;
}

.gh-modal .modal-body .row {
    margin-left: -10px;
    margin-right: -10px;
}

.gh-modal .modal-body .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.gh-modal .modal-body .form-group:last-child,
.gh-modal .modal-body .ga-form-group-last {
    margin-bottom: 0;
}

.gh-modal .modal-body .form-control,
.gh-modal .modal-body .gmp-input,
.gh-modal .modal-body .gbc-input,
.gh-modal .modal-body .ga-modal-body .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-height: 42px;
    box-shadow: none;
    font-size: 14px;
    color: var(--gh-text);
    background: #fff;
}

.gh-modal .modal-body .gbc-input::placeholder,
.gh-modal .modal-body .form-control::placeholder,
.gh-modal .modal-body textarea.gbc-input::placeholder,
.gh-modal .modal-body textarea.form-control::placeholder,
.gh-modal .modal-body .gbc-input::-webkit-input-placeholder,
.gh-modal .modal-body .form-control::-webkit-input-placeholder,
.gh-modal .modal-body textarea.gbc-input::-webkit-input-placeholder,
.gh-modal .modal-body textarea.form-control::-webkit-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.gh-modal .modal-body textarea.form-control,
.gh-modal .modal-body textarea.gmp-input,
.gh-modal .modal-body textarea.gbc-input {
    min-height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
}

.gh-modal .modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.gh-modal .gmp-form-grid,
.gh-modal .gbc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    margin-bottom: 0;
}

.gh-modal .select2-container--default .select2-selection--single {
    min-height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 10px;
}

.gh-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: var(--gh-brand);
    padding-left: 2px;
}

.gh-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
}

.gh-modal .select2-container--default.select2-container--focus .select2-selection--single,
.gh-modal .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--gh-primary);
    box-shadow: 0 0 0 4px var(--gh-primary-focus);
}

@media (max-width: 767px) {
    .gh-modal .gmp-form-grid,
    .gh-modal .gbc-form-grid {
        grid-template-columns: 1fr;
    }
}

.gh-modal .modal-header,
.gh-modal .gev-modal-header,
.gh-modal .gdr-modal-header,
.gh-modal .gmp-modal-header,
.gh-modal .gbc-modal-header,
.gh-modal .ga-modal-header,
.gh-modal .gc-meetings-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--gh-border);
    background: #fff;
    position: relative;
}

.gh-modal.gmp-modal-root .gmp-modal-header,
.gh-modal.gbc-modal-root .gbc-modal-header,
.gh-modal.ga-modal-root .ga-modal-header,
.gh-modal.gc-modal-root .gc-meetings-modal-header {
    background: #fff !important;
    padding: 22px 24px 16px !important;
    gap: 16px !important;
    border-bottom: 1px solid var(--gh-border) !important;
}

.gh-modal .modal-header .close,
.gh-modal .gmp-modal-header .close,
.gh-modal .gbc-modal-header .close,
.gh-modal .ga-modal-header .close {
    position: absolute;
    top: 16px;
    right: 18px;
    margin: 0;
    opacity: 0.45;
    font-size: 24px;
    font-weight: 300;
    z-index: 2;
}

.gh-modal .modal-header .close:hover {
    opacity: 0.85;
}

.gh-modal .gh-modal-header-text,
.gh-modal .gev-modal-header-text,
.gh-modal .gdr-modal-header-text,
.gh-modal .gmp-modal-header .gh-modal-header-text,
.gh-modal .gbc-modal-header .gh-modal-header-text,
.gh-modal .ga-modal-header .gh-modal-header-text,
.gh-modal .gc-meetings-modal-header .gh-modal-header-text {
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

.gh-modal .gmp-modal-header-icon,
.gh-modal .gbc-modal-header-icon,
.gh-modal .ga-modal-header-icon,
.gh-modal .gc-meetings-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--gh-brand) 0%, var(--gh-primary) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px var(--gh-brand-shadow);
}

.gh-modal .modal-title {
    font-weight: 700;
    font-size: 20px;
    color: var(--gh-brand);
    margin: 0 0 4px;
    line-height: 1.3;
}

.gh-modal .modal-title .fa {
    color: var(--gh-primary);
    margin-right: 8px;
}

.gh-modal .gh-modal-sub,
.gh-modal .gev-modal-sub,
.gh-modal .gdr-modal-sub,
.gh-modal .gmp-modal-sub,
.gh-modal .gbc-modal-sub,
.gh-modal .ga-modal-sub,
.gh-modal .gaa-modal-sub,
.gh-modal .gc-meetings-modal-sub {
    margin: 0;
    color: var(--gh-muted);
    font-size: 14px;
    line-height: 1.5;
}

.gh-modal .modal-body,
.gh-modal .gmp-modal-body,
.gh-modal .gbc-modal-body,
.gh-modal .ga-modal-body {
    padding: 20px 24px;
    background: #fff;
}

.gh-modal .modal-footer,
.gh-modal .gev-modal-footer,
.gh-modal .gdr-modal-footer,
.gh-modal .gmp-modal-footer,
.gh-modal .gbc-modal-footer,
.gh-modal .ga-modal-footer,
.gh-modal .gaa-modal .modal-footer {
    border-top: 1px solid var(--gh-border);
    padding: 16px 24px 20px;
    background: #fafbfd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gh-modal .gh-btn-cancel,
.gh-modal .gev-btn-cancel,
.gh-modal .gdr-btn-cancel,
.gh-modal .gmp-btn-cancel,
.gh-modal .gbc-btn-cancel,
.gh-modal .gaa-btn-outline,
.gh-modal .modal-footer .btn-default {
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    background: #fff !important;
    border: 1px solid var(--gh-border) !important;
    color: #334155 !important;
}

.gh-modal .gh-btn-cancel:hover,
.gh-modal .gev-btn-cancel:hover,
.gh-modal .gdr-btn-cancel:hover,
.gh-modal .gmp-btn-cancel:hover,
.gh-modal .gbc-btn-cancel:hover,
.gh-modal .modal-footer .btn-default:hover {
    background: var(--gh-bg) !important;
    border-color: #cbd5e1 !important;
}

.gh-modal .gh-modal-close,
.gh-modal .gev-modal-close,
.gh-modal .gdr-modal-close {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
}

.gh-modal .gh-info-banner,
.gh-modal .gev-info-banner,
.gh-modal .gdr-info-banner,
.gh-modal .gmp-info-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--gh-primary-soft);
    border: 1px solid var(--gh-primary-border);
    color: var(--gh-brand);
    font-size: 13px;
    line-height: 1.55;
    margin-top: 16px;
}

.gh-modal .gh-info-banner .fa,
.gh-modal .gev-info-banner .fa,
.gh-modal .gdr-info-banner .fa,
.gh-modal .gmp-info-box .fa {
    color: var(--gh-primary);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.gh-modal label.error {
    color: var(--gh-danger);
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

.gh-modal .form-control.error,
.gh-modal .select2-container--default .select2-selection--single.error {
    border-color: #fca5a5 !important;
}

.gh-modal .select2-container {
    width: 100% !important;
}

.gh-modal .gh-modal-loader,
.gh-modal .gdr-modal-loader,
.gh-modal .gaa-modal-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 18px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.gh-modal .gh-modal-loader.is-visible,
.gh-modal .gdr-modal-loader.is-visible,
.gh-modal .gaa-modal-loader.is-visible {
    display: flex;
}

.gh-modal .gh-modal-loader .fa-spinner,
.gh-modal .gdr-modal-loader .fa-spinner,
.gh-modal .gaa-modal-loader .fa-spinner {
    font-size: 24px;
    color: var(--gh-primary);
}

/* Lobibox — Intellimis theme */
.lobibox .lobibox-header {
    background: var(--gh-brand) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
}

.lobibox-notify-wrapper.large {
    font-family: inherit;
}

.lobibox-notify.notify-success {
    border-color: var(--gh-primary) !important;
}

.lobibox-notify.notify-error {
    border-color: #dc2626 !important;
}

.lobibox-notify .lobibox-notify-msg {
    font-size: 14px;
    line-height: 1.45;
}

.lobibox-notify .lobibox-notify-title {
    font-weight: 700;
    color: var(--gh-brand);
}

.lobibox .lobibox-footer .btn-primary,
.lobibox .lobibox-footer button[data-type="yes"] {
    background: var(--gh-primary) !important;
    border-color: var(--gh-primary) !important;
    color: #fff !important;
    border-radius: 8px;
}

.lobibox .lobibox-footer .btn-default,
.lobibox .lobibox-footer button[data-type="no"] {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 8px;
}

/* Shared paper audit history (Pack Assurance, Builder, Meetings modal) */
.gh-paper-audit-section {
    margin-top: 16px;
    border: 1px solid var(--gh-border, #e2e8f0);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.gh-paper-audit-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
}

.gh-paper-audit-toggle-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gh-brand, #005276);
}

.gh-paper-audit-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
}

.gh-paper-audit-chevron {
    color: #94a3b8;
    transition: transform .18s ease;
}

.gh-paper-audit-section.is-open .gh-paper-audit-chevron {
    transform: rotate(180deg);
}

.gh-paper-audit-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--gh-border, #e2e8f0);
}

.gh-paper-audit-timeline {
    position: relative;
    padding-left: 18px;
    margin-top: 14px;
    max-height: 320px;
    overflow-y: auto;
}

.gh-paper-audit-timeline::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #e2e8f0;
}

.gh-paper-audit-item {
    position: relative;
    padding: 0 0 16px 14px;
}

.gh-paper-audit-item:last-child {
    padding-bottom: 0;
}

.gh-paper-audit-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--gh-brand, #005276);
}

.gh-paper-audit-item-approved::before,
.gh-paper-audit-item-submitted_for_review::before,
.gh-paper-audit-item-resubmitted_for_review::before {
    border-color: #16a34a;
    background: #dcfce7;
}

.gh-paper-audit-item-returned_for_revision::before {
    border-color: #dc2626;
    background: #fee2e2;
}

.gh-paper-audit-item strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}

.gh-paper-audit-desc {
    margin: 0 0 6px;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.gh-paper-audit-meta {
    color: #94a3b8;
    font-size: 12px;
}

.gh-paper-audit-empty {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.gh-paper-audit-item-pack_certified::before {
    border-color: #1d4ed8;
    background: #dbeafe;
}

.gmp-pack-certified-note {
    color: #1d4ed8;
    font-weight: 600;
}

.gmp-modal-root .gh-paper-audit-section {
    margin-top: 0;
}
