/**
 * Policy Database Styles
 * Nigeria Mining Hub - Policy Database Component
 * Color Scheme: Orange/Yellow (matching main site)
 */

/* ============================================
   GLOBAL & LAYOUT
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HERO SECTION
============================================ */
.policy-hero {
    background-color: #000000;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.policy-db-hero {
    min-height: 420px;
    padding: 40px 20px;
    display: flex;
    align-items: center;
}

.policy-db-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.policy-db-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(241, 180, 52, 0.56) 70%
    );
    z-index: 1;
}

.policy-db-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.policy-db-hero__content {
    text-align: center;
}

.policy-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
}

.policy-hero p {
    font-size: 1.2rem;
    color: #fff;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   STATISTICS BAR
============================================ */
.stats-bar {
    padding: 32px 20px 36px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
    align-items: stretch;
}

.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 166px;
    text-align: center;
    padding: 28px 22px;
    border: 1px solid rgba(151, 27, 47, 0.14);
    background: linear-gradient(180deg, #fcf8f9 0%, #f7eef1 100%);
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(34, 22, 27, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(151, 27, 47, 0.28);
    background: linear-gradient(180deg, #fdf9fa 0%, #f5e9ee 100%);
    box-shadow: 0 18px 34px rgba(34, 22, 27, 0.08);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #971b2f;
    display: block;
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.8rem;
    color: #5b616b;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 600;
}

/* ============================================
   SEARCH & FILTERS
============================================ */
.search-filter-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee5d2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.policy-db-search-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.search-input-icon {
    position: absolute;
    left: 18px;
    font-size: 0.95rem;
    color: #971b2f;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 18px 12px 44px;
    border: 1px solid #d8c8a0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #ffffff;
    color: #22161b;
}

.search-input:focus {
    outline: none;
    border-color: #971b2f;
    box-shadow: 0 0 0 3px rgba(255, 192, 60, 0.12);
}

.btn-search,
.btn-reset,
.btn-export {
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
}

.btn-search {
    background: #ffc03c;
    color: #2d1c00;
    border-color: #971b2f;
    box-shadow: 0 6px 14px rgba(255, 192, 60, 0.18);
}

.btn-search:hover {
    background: #e3aa23;
    color: #4a1620;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 700;
    color: #5f1321;
    margin-bottom: 8px;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.filter-select {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #22161b;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #971b2f;
    box-shadow: 0 0 0 3px rgba(255, 192, 60, 0.12);
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.btn-reset {
    background: #ffffff;
    color: #971b2f;
    border-color: #d9c28f;
}

.btn-reset:hover {
    background: #fff1c7;
    border-color: #ffc03c;
}

.btn-export {
    background: #971b2f;
    color: white;
    border-color: #971b2f;
}

.btn-export:hover {
    background: #7f1628;
}

/* ============================================
   POLICIES TABLE/LIST
============================================ */
.policies-container {
    background: #fffdf8;
    border-radius: 18px;
    border: 1px solid #ead7a3;
    box-shadow: 0 18px 32px rgba(34, 22, 27, 0.08);
    overflow: hidden;
}

.policies-header {
    padding: 24px 28px;
    background: #fffaf0;
    border-bottom: 1px solid #ead7a3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.policies-header h2 {
    color: #22161b;
    font-size: 1.4rem;
    margin: 0;
}

.view-toggle {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #ead7a3;
    border-radius: 999px;
}

.view-btn {
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5b616b;
    font-weight: 600;
}

.view-btn.active {
    background: #ffc03c;
    color: #111827;
    border-color: #971b2f;
    box-shadow: 0 8px 18px rgba(255, 192, 60, 0.22);
}

.view-btn:hover:not(.active) {
    background: #fff1c7;
    color: #971b2f;
}

#policies-display {
    min-height: 220px;
    overflow-x: auto;
    background: #ffffff;
}

.policies-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.policies-table thead {
    background: #fffaf0;
    border-bottom: 1px solid #ead7a3;
}

.policies-table th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 700;
    color: #5f1321;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    user-select: none;
}

.policies-table th:hover {
    background: #fff3d6;
}

.policies-table th .sort-icon {
    margin-left: 6px;
    opacity: 0.9;
    color: #971b2f;
}

.policies-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.policies-table tbody tr:hover {
    background: #fffaf0;
}

.policies-table td {
    padding: 16px 18px;
    color: #2b1d23;
    vertical-align: middle;
}

.policies-table td:last-child {
    white-space: nowrap;
}

.policy-name {
    font-weight: 700;
    color: #22161b;
    line-height: 1.45;
}

.policy-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-high {
    background: #fde7ef;
    color: #971b2f;
    border-color: rgba(151, 27, 47, 0.14);
}

.badge-medium {
    background: #fff1c7;
    color: #8b5d00;
    border-color: rgba(255, 192, 60, 0.24);
}

.badge-low {
    background: #f6f1ea;
    color: #5b616b;
    border-color: rgba(91, 97, 107, 0.16);
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-draft {
    background: #fef3c7;
    color: #92400e;
}

.btn-view-details {
    padding: 7px 14px;
    background: #fff1c7;
    color: #971b2f;
    border: 1px solid #d9c28f;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-wrap: nowrap;
    min-width: max-content;
}

.btn-view-details:hover {
    background: #ffc03c;
    color: #3b2500;
    border-color: #971b2f;
}

/* ============================================
   CARD VIEW
============================================ */
.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 22px;
    padding: 28px;
}

.policy-card {
    background: #ffffff;
    border: 1px solid #ead7a3;
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(34, 22, 27, 0.05);
}

.policy-card:hover {
    border-color: #ffc03c;
    box-shadow: 0 18px 32px rgba(34, 22, 27, 0.1);
    transform: translateY(-2px);
}

.policy-card-header {
    margin-bottom: 16px;
}

.policy-card-title {
    font-size: 1.16rem;
    font-weight: 700;
    color: #22161b;
    margin-bottom: 12px;
    line-height: 1.35;
}

.policy-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.policy-card-summary {
    color: #5b616b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 4;
}

.policy-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #ead7a3;
    gap: 12px;
}

.stakeholder-count {
    font-size: 0.84rem;
    color: #5b616b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.policy-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #971b2f;
    font-weight: 700;
    white-space: nowrap;
}

.policy-db-empty-state {
    padding: 72px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 0.98rem;
}

/* ============================================
   POLICY DETAIL MODAL
============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 28px 16px;
    background: rgba(24, 17, 20, 0.78);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

#policy-modal .modal-content {
    background: #fffdf8;
    max-width: 920px;
    margin: 22px auto;
    border-radius: 18px;
    border: 1px solid rgba(151, 27, 47, 0.14);
    box-shadow: 0 26px 72px rgba(26, 17, 21, 0.28);
    position: relative;
    overflow: hidden;
}

#policy-modal .modal-header {
    background: linear-gradient(180deg, #971b2f 0%, #7f1726 100%);
    color: #fffdf8;
    padding: 32px 32px 26px;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid rgba(255, 192, 60, 0.24);
    text-align: center;
}

#policy-modal .modal-header h2 {
    font-size: clamp(1.55rem, 2.25vw, 2rem);
    margin: 0 auto;
    color: #fffdf8;
    line-height: 1.25;
    max-width: 22ch;
}

#policy-modal .modal-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    justify-content: center;
}

#policy-modal .policy-badge {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fffdf8;
    border-color: rgba(255, 255, 255, 0.18);
}

#policy-modal .badge-active {
    background: #fff1c7;
    color: #22161b;
    border-color: rgba(255, 192, 60, 0.3);
}

#policy-modal .badge-high {
    background: #fff1c7;
    color: #22161b;
    border-color: rgba(255, 192, 60, 0.3);
}

#policy-modal .badge-medium {
    background: rgba(255, 255, 255, 0.16);
    color: #fffdf8;
    border-color: rgba(255, 255, 255, 0.2);
}

#policy-modal .badge-low {
    background: rgba(255, 255, 255, 0.16);
    color: #fffdf8;
    border-color: rgba(255, 255, 255, 0.2);
}

#policy-modal .modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    background: rgba(255, 253, 248, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fffdf8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

#policy-modal .modal-close:hover {
    background: rgba(255, 192, 60, 0.22);
    border-color: rgba(255, 192, 60, 0.5);
}

#policy-modal .modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 192, 60, 0.24);
}

#policy-modal .modal-body {
    padding: 30px 32px 34px;
    max-height: min(74vh, 720px);
    overflow-y: auto;
}

#policy-modal .detail-section {
    margin-bottom: 18px;
    padding: 22px 24px;
    background: #fffaf0;
    border: 1px solid #ead7a3;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(34, 22, 27, 0.04);
}

#policy-modal .detail-section:last-child {
    margin-bottom: 0;
}

#policy-modal .detail-section h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #2b1d23;
    font-size: 1.05rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffc03c;
    line-height: 1.35;
}

#policy-modal .detail-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #971b2f;
    color: #fffdf8;
    font-size: 0.78rem;
    font-weight: 700;
}

#policy-modal .detail-section p {
    color: #3f3136;
    line-height: 1.75;
    margin: 0;
    white-space: pre-line;
}

#policy-modal .stakeholders-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

#policy-modal .stakeholder-item {
    background: #ffffff;
    border: 1px solid rgba(151, 27, 47, 0.14);
    border-radius: 14px;
    padding: 15px 16px;
    box-shadow: 0 6px 18px rgba(34, 22, 27, 0.04);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

#policy-modal .stakeholder-item:hover {
    background: #fff8e7;
    border-color: #ffc03c;
    box-shadow: 0 10px 24px rgba(255, 192, 60, 0.14);
}

#policy-modal .stakeholder-name {
    font-weight: 700;
    color: #22161b;
    display: block;
    margin-bottom: 0;
}

#policy-modal .external-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#policy-modal .external-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    color: #5f1321;
    text-decoration: none;
    padding: 12px 14px;
    background: #fff6dc;
    border: 1px solid rgba(151, 27, 47, 0.16);
    border-radius: 12px;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    word-break: break-word;
}

#policy-modal .external-link i {
    flex: 0 0 auto;
    color: #971b2f;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 2px;
}

#policy-modal .external-link span {
    min-width: 0;
}

#policy-modal .external-link:hover,
#policy-modal .external-link:focus-visible {
    color: #5f1321;
    background: #fff1c7;
    border-color: #971b2f;
    box-shadow: 0 10px 22px rgba(255, 192, 60, 0.14);
}

#policy-modal .external-link:focus-visible {
    outline: none;
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px;
    border-top: 1px solid #ead7a3;
    flex-wrap: wrap;
}

.page-btn {
    padding: 9px 16px;
    border: 1px solid #d9c28f;
    background: #fffaf0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #5f1321;
    font-weight: 600;
}

.page-btn:hover {
    border-color: #ffc03c;
    color: #971b2f;
    background: #fff1c7;
}

.page-btn.active {
    background: #ffc03c;
    color: #111827;
    border-color: #971b2f;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   ALERT MESSAGES
============================================ */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1rem;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* ============================================
   POLICY PAGE HELPERS
============================================ */
.policy-db-alert-offset {
    margin-top: 30px;
}

.policy-db-command {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.policy-db-note {
    margin-top: 10px;
}

.policy-db-link {
    color: #d97706;
    text-decoration: underline;
}

.policy-db-link:hover {
    color: #b45309;
}

.policy-db-link:focus-visible,
.policy-db-back-link:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 3px;
}

.policy-db-results-count {
    color: #6b7280;
    margin-top: 6px;
    font-size: 0.92rem;
}

.policy-db-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    position: relative;
    min-height: 30px;
}

.policy-db-back-link__icon {
    transition: fill 0.2s ease;
}

.policy-db-back-link__tooltip {
    display: none;
    position: absolute;
    left: 35px;
    top: 5px;
    background: #333333;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    pointer-events: none;
    z-index: 10;
}

.policy-db-back-link:hover .policy-db-back-link__icon,
.policy-db-back-link:focus-visible .policy-db-back-link__icon {
    fill: #666666;
}

.policy-db-back-link:hover .policy-db-back-link__tooltip,
.policy-db-back-link:focus-visible .policy-db-back-link__tooltip {
    display: inline-block;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .policy-db-hero {
        min-height: 360px;
        padding: 32px 20px;
    }

    .policy-hero h1 {
        font-size: 2rem;
    }

    .policy-hero p {
        font-size: 1rem;
    }
    
    .policies-table {
        font-size: 0.85rem;
    }
    
    .policies-table th,
    .policies-table td {
        padding: 10px;
    }
    
    .policies-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }

    .filter-actions {
        justify-content: stretch;
    }

    .btn-search,
    .btn-reset,
    .btn-export {
        width: 100%;
    }

    .policies-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .view-btn {
        flex: 1 1 0;
        justify-content: center;
    }

    #policies-display {
        overflow-x: auto;
    }

    .policies-grid {
        grid-template-columns: 1fr;
        padding: 22px 18px;
    }

    .policy-card {
        padding: 20px;
    }

    .policy-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-view-details {
        width: 100%;
        justify-content: center;
    }
    
    #policy-modal .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    #policy-modal .modal-header,
    #policy-modal .modal-body {
        padding-left: 24px;
        padding-right: 24px;
    }

    #policy-modal .detail-section {
        padding: 20px;
    }

    .policy-db-back-link__tooltip {
        left: 0;
        top: calc(100% + 8px);
    }
}

@media (max-width: 480px) {
    .policy-db-hero {
        min-height: 320px;
        padding: 28px 16px;
    }

    .search-filter-section,
    .policies-container {
        border-radius: 14px;
    }

    .search-filter-section {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .policies-header {
        padding: 20px 18px;
    }

    .policies-grid {
        padding: 18px 16px;
    }

    #policy-modal {
        padding: 20px 12px;
    }

    #policy-modal .modal-header,
    #policy-modal .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    #policy-modal .modal-header {
        padding-top: 26px;
        padding-bottom: 22px;
    }

    #policy-modal .detail-section {
        padding: 18px 16px;
        border-radius: 14px;
    }

    #policy-modal .detail-section h3 {
        align-items: flex-start;
        flex-direction: column;
    }

    #policy-modal .stakeholder-profiles-grid,
    #policy-modal .stakeholders-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LOADING STATE
============================================ */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ============================================
   STAKEHOLDER PROFILE CARDS
============================================ */
.stakeholder-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stakeholder-profile-card {
    background: #ffffff;
    border: 1px solid rgba(43, 29, 35, 0.14);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 8px 22px rgba(34, 22, 27, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: pointer;
}

.stakeholder-profile-card:hover {
    border-color: #ffc03c;
    box-shadow: 0 12px 28px rgba(255, 192, 60, 0.16);
    transform: translateY(-1px);
}

.stakeholder-card-header {
    margin-bottom: 10px;
}

.stakeholder-profile-name {
    color: #22161b;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}

.stakeholder-profile-name:visited {
    color: #22161b;
}

.stakeholder-profile-name:hover {
    color: #ffc03c;
    text-decoration: none;
}

.stakeholder-profile-name:focus-visible {
    outline: none;
    color: #ffc03c;
    text-decoration: none;
}

.stakeholder-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stakeholder-category {
    display: inline-block;
    background: #fff1c7;
    color: #5f1321;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(151, 27, 47, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
}

.view-all-link {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(151, 27, 47, 0.12);
    text-align: left;
}

.view-all-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5f1321;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.view-all-link a:hover {
    color: #ffc03c;
    text-decoration: none;
}

.view-all-link a:focus-visible {
    outline: none;
    color: #ffc03c;
    text-decoration: none;
}

/* Linked Policies in Stakeholder View */
.policy-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.policy-profile-card {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.policy-profile-card:hover {
    border-color: #ffc03c;
    box-shadow: 0 4px 12px rgba(255, 192, 60, 0.2);
    transform: translateY(-2px);
}

.policy-profile-name {
    color: #d97706;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
}

.policy-profile-name:hover {
    color: #b45309;
    text-decoration: underline;
}

.policy-profile-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.policy-meta-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}
