/* ============================= */
/* GLOBAL RESET + BASE */
/* ============================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-soft: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #8d6e00;
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --container: 1160px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
}

.container {
    width: min(92%, var(--container));
    margin: 0 auto;
}

/* ============================= */
/* TYPOGRAPHY */
/* ============================= */

h1, h2, h3, h4 {
    line-height: 1.2;
    color: var(--text);
}

p {
    color: var(--text-soft);
}

/* ============================= */
/* BUTTONS */
/* ============================= */

.btn-primary,
.btn-secondary,
.button-link,
.form-actions button,
.filter-actions button,
.review-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.button-link {
    background: #94a3b8;
    color: #fff;
}

.filter-actions button,
.form-actions button {
    background: var(--primary);
    color: #fff;
}

.filter-actions button:hover,
.form-actions button:hover {
    background: var(--primary-dark);
}

.review-actions button {
    color: #fff;
}

.btn-approve {
    background: var(--success);
}

.btn-reject {
    background: var(--danger);
}

.btn-revision {
    background: #475569;
}

.review-actions button:disabled,
.form-actions button:disabled,
.filter-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ============================= */
/* HEADER */
/* ============================= */

.site-header-modern {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-modern {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1rem;
    color: var(--text);
}

.brand-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.site-nav a {
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.site-nav a:hover {
    background: #f1f5f9;
    color: var(--text);
}

.nav-link.active {
    background: #eff6ff;
    color: var(--primary-dark);
}

.nav-link-button {
    background: var(--primary);
    color: #fff !important;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.16);
}

.nav-link-button:hover {
    background: var(--primary-dark) !important;
    color: #fff !important;
}

.nav-user {
    display: inline-flex;
    flex-direction: column;
    padding: 8px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.1;
}

.nav-user small {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-strong);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 2px;
}

/* ============================= */
/* GENERIC LAYOUT */
/* ============================= */

.page-section {
    padding: 44px 0 56px;
}

section {
    margin-bottom: 64px;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 2vw, 2.1rem);
    margin-bottom: 10px;
}

.section-heading p {
    color: var(--text-muted);
    max-width: 780px;
}

/* ============================= */
/* HERO / HOMEPAGE */
/* ============================= */

.hero {
    background: #eef2f7;
    padding: 70px 0;
    text-align: center;
}

.hero-enhanced {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(135deg, #f8fafc, #eef2ff);
    padding: 90px 0 78px;
    text-align: left;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 42px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.hero-copy .hero-lead,
.hero-lead {
    color: var(--text-soft);
    font-size: 1.08rem;
    max-width: 760px;
    margin-bottom: 22px;
}

.hero p {
    margin-bottom: 24px;
    color: var(--text-soft);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.hero-search {
    margin-top: 10px;
}

.search-bar {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 280px;
    padding: 15px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    font-size: 0.98rem;
}

.search-bar input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.25);
}

.search-bar button {
    padding: 14px 22px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    min-width: 120px;
}

.search-bar button:hover {
    background: var(--primary-dark);
}

.hero-panel {
    display: block;
}

.hero-preview-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 26px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.hero-preview-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.preview-badge {
    font-size: 0.76rem;
    background: #dbeafe;
    color: var(--primary-dark);
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 700;
}

.preview-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-preview-card h3 {
    font-size: 1.7rem;
    margin-bottom: 8px;
}

.preview-meaning {
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 14px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.preview-grid strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.preview-grid p {
    color: var(--text-soft);
}

.preview-note {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================= */
/* TRUST STRIP */
/* ============================= */

.trust-strip {
    background: transparent;
    padding: 12px 0 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.trust-item {
    background: var(--surface);
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.trust-item h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.trust-item p {
    color: var(--text-muted);
}

/* ============================= */
/* HOMEPAGE STATS */
/* ============================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: var(--surface);
    padding: 26px 22px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-card p {
    color: var(--text-muted);
    font-weight: 600;
}

/* ============================= */
/* PATHWAYS / FEATURED / STEPS */
/* ============================= */

.pathway-grid,
.featured-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pathway-card,
.featured-card,
.step-card,
.mission-card,
.cta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.pathway-card {
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pathway-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pathway-card h3 {
    margin-bottom: 10px;
}

.pathway-card p {
    color: var(--text-muted);
}

.featured-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.featured-card-top {
    display: flex;
    justify-content: flex-start;
}

.featured-badge {
    font-size: 0.74rem;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
}

.featured-card h3 {
    font-size: 1.35rem;
}

.featured-meaning {
    color: var(--text);
    font-weight: 600;
}

.featured-meta {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.featured-summary {
    color: var(--text-muted);
}

.featured-link {
    margin-top: auto;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

.step-card {
    padding: 24px;
}

.step-number {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.step-card h3 {
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-muted);
}

.mission-card {
    padding: 30px;
}

.mission-card p {
    max-width: 920px;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 40px;
    text-align: center;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
}

.cta-card h2,
.cta-card p {
    color: #fff;
}

.cta-card .hero-actions {
    justify-content: center;
    margin-top: 20px;
}

.cta-card .btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.cta-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ============================= */
/* FAQ */
/* ============================= */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
}

.faq-item p {
    margin-top: 10px;
    color: var(--text-muted);
}

/* ============================= */
/* LEGACY CATEGORIES / FEATURED */
/* ============================= */

.categories,
.featured {
    margin: 40px auto;
}

.categories h2,
.featured h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 28px;
    text-align: center;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.name-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.name-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 0.6fr;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid #eef2f7;
    align-items: center;
}

.name-row:last-child {
    border-bottom: none;
}

.name-col.strong {
    font-weight: 700;
}

.name-col a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

/* ============================= */
/* BROWSE / DETAILS */
/* ============================= */

.breadcrumb {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-soft);
    text-decoration: none;
}

.detail-hero {
    margin-bottom: 24px;
}

.detail-hero h1 {
    font-size: clamp(2rem, 2.5vw, 2.6rem);
    margin-bottom: 10px;
}

.detail-meaning {
    font-size: 1.1rem;
    color: var(--text-soft);
}

.browse-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

.filters-panel,
.results-panel,
.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.filters-panel h2,
.results-panel h2,
.detail-card h2,
.detail-card h3 {
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a {
    text-decoration: none;
    color: var(--text-soft);
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.pagination a.active-page {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.detail-main,
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============================= */
/* REVIEW DASHBOARD */
/* ============================= */

.review-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.review-sidebar h2,
.review-main h2 {
    margin-bottom: 16px;
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-item {
    display: block;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-muted);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.pending-item:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.pending-item-active {
    border-color: #93c5fd;
    background: #eff6ff;
}

.review-block {
    margin-top: 18px;
}

.review-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* ============================= */
/* AUTH / FORMS */
/* ============================= */

.auth-card {
    max-width: 560px;
    margin: 0 auto;
}

.submission-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-actions {
    margin-top: 10px;
}

/* ============================= */
/* ALERTS */
/* ============================= */

.alert {
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid;
    box-shadow: var(--shadow-sm);
}

.alert ul {
    margin-left: 18px;
}

.alert-error {
    background: #fff3f3;
    border-color: #ef9a9a;
    color: #7a1f1f;
}

.alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

/* ============================= */
/* HISTORY / LOGS */
/* ============================= */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: var(--surface-muted);
}

.history-item p {
    margin-bottom: 8px;
}

.history-item p:last-child {
    margin-bottom: 0;
}

/* ============================= */
/* BADGES */
/* ============================= */

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.badge-approved {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.badge-pending {
    background: #fff8e1;
    color: var(--warning);
    border: 1px solid #fde68a;
}

.badge-rejected {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.badge-revision {
    background: #ede7f6;
    color: #4527a0;
    border: 1px solid #c4b5fd;
}

/* ============================= */
/* DIFF / MERGE UI */
/* ============================= */

.diff-block {
    margin-bottom: 20px;
}

.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.diff-old {
    background: #fff1f2;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #fecdd3;
}

.diff-new {
    background: #ecfdf5;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}

.diff-old strong,
.diff-new strong {
    display: block;
    margin-bottom: 6px;
}

.merge-options {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
}

.merge-options label {
    display: block;
    margin-bottom: 8px;
}

/* ============================= */
/* TABLES */
/* ============================= */

.merge-history-table-wrapper {
    overflow-x: auto;
}

.merge-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.merge-history-table th,
.merge-history-table td {
    border: 1px solid var(--border);
    padding: 12px;
    vertical-align: top;
    text-align: left;
}

.merge-history-table th {
    background: #f8fafc;
    color: var(--text);
}

/* ============================= */
/* FOOTER */
/* ============================= */

.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 28px 0;
    margin-top: 60px;
    text-align: center;
}

.site-footer a {
    text-decoration: none;
    color: var(--text-soft);
    margin: 0 10px;
}

.site-footer a:hover {
    color: var(--primary);
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a,
    .nav-link,
    .nav-user {
        width: 100%;
    }

    .hero-grid,
    .trust-grid,
    .stats-grid,
    .pathway-grid,
    .featured-grid,
    .steps-grid,
    .browse-layout,
    .detail-layout,
    .review-layout,
    .detail-grid,
    .preview-grid,
    .diff-grid {
        grid-template-columns: 1fr;
    }

    .search-bar input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .name-row {
        grid-template-columns: 1fr;
    }

    .hero-enhanced {
        padding: 72px 0 56px;
    }

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

    .cta-card {
        padding: 28px 20px;
    }
}


/* FOOTER UPGRADE */

.site-footer-modern {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid var(--border);
    margin-top: 72px;
    padding-top: 42px;
    padding-bottom: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.footer-brand-link strong {
    display: block;
    line-height: 1.1;
}

.footer-brand-link small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.footer-mission {
    max-width: 360px;
    color: var(--text-muted);
}

.footer-column h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
    color: var(--primary);
    transform: translateX(2px);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-note {
    max-width: 520px;
}

@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}



/*Dashboard style */

.dashboard-hero {
    margin-bottom: 34px;
}

.dashboard-section {
    margin-bottom: 42px;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.dashboard-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.dashboard-stat-card h3 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.dashboard-stat-card p {
    color: var(--text-muted);
    font-weight: 600;
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.dashboard-action-card {
    display: block;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.dashboard-action-card h3 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.1rem;
}

.dashboard-action-card p {
    color: var(--text-muted);
}

.dashboard-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 1100px) {
    .dashboard-stats-grid,
    .dashboard-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .dashboard-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-stats-grid,
    .dashboard-quick-actions {
        grid-template-columns: 1fr;
    }
}


/* =============Admin Review pass================ */
/* ============================= */
/* ADMIN REVIEW UPGRADE */
/* ============================= */

.review-sidebar {
    max-height: 75vh;
    overflow-y: auto;
}

.pending-item {
    display: block;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.pending-item strong {
    display: block;
}

.pending-item small {
    color: var(--text-muted);
}

.pending-item:hover {
    background: #f1f5f9;
}

.pending-item-active {
    background: #eff6ff;
    border-color: #93c5fd;
}

.review-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-block {
    margin-top: 16px;
}

/* ==============REVIEW SUGGESTIONS UI UPGRADE polish====== */

.review-layout-enhanced {
    align-items: start;
}

.review-sidebar-enhanced {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.queue-count {
    display: inline-flex;
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--primary-dark);
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

.pending-item-enhanced {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-item-enhanced span {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.pending-item-enhanced small {
    color: var(--text-muted);
}

.review-main-enhanced {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.suggestion-summary-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.panel-heading {
    margin-bottom: 16px;
}

.panel-heading p {
    color: var(--text-muted);
}

.diff-header {
    margin-bottom: 10px;
}

.empty-merge-note {
    padding: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    background: var(--surface-muted);
}

.empty-merge-note p + p {
    margin-top: 6px;
}

.contributor-notes-box {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.review-links {
    margin-bottom: 18px;
}

.merge-options-enhanced {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
}

.merge-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    margin-bottom: 0 !important;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.merge-option-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.merge-option-item input {
    width: auto;
    margin: 0;
}

.merge-option-item span {
    color: var(--text);
    font-weight: 600;
}

.review-actions-enhanced {
    margin-top: 18px;
}

@media (max-width: 980px) {
    .review-sidebar-enhanced {
        position: static;
        max-height: none;
    }

    .merge-options-enhanced {
        grid-template-columns: 1fr;
    }
}


/* ==============manaGE USErs polish====== */
/* ============================= */
/* ADMIN TABLE */
/* ============================= */

.table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
}

.admin-table tr:hover {
    background: #f9fafb;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.inline-form button {
    padding: 8px 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.inline-form button:hover {
    background: var(--primary-dark);
}

/* role badges */

.badge-contributor {
    background: #e0f2fe;
    color: #075985;
}

.badge-editor {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-admin {
    background: #fee2e2;
    color: #991b1b;
}


/* ============================= */
/* NAME PAGE POLISH */
/* ============================= */

.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.editorial-tools {
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
}

.editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.editorial-desc {
    color: var(--text-muted);
    margin-bottom: 14px;
}

.editorial-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-editor {
    background: #ede9fe;
    color: #5b21b6;
}

.review-links a,
.detail-card a {
    text-decoration: none;
}

.review-links a:hover,
.detail-card a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .action-bar,
    .editorial-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================= */
/* HOMEPAGE REFINEMENT LAYER */
/* ============================= */

section {
    margin-bottom: 84px;
}

.section-heading {
    margin-bottom: 36px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    margin-bottom: 12px;
}

.section-heading p {
    color: var(--text-muted);
    max-width: 760px;
    font-size: 1rem;
}

/* HERO REFINEMENT */

.hero-enhanced {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(135deg, #f8fafc, #eef2ff);
    padding: 110px 0 88px;
    text-align: left;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.hero-copy .hero-lead,
.hero-lead {
    color: var(--text-soft);
    font-size: 1.12rem;
    max-width: 720px;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-trust {
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-preview-card {
    border-radius: 20px;
    padding: 28px;
}

/* BUTTON REFINEMENT */

.btn-secondary {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid #0f172a;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-contrast {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    font-weight: 700;
}

.btn-contrast:hover {
    background: #1e293b;
    border-color: #1e293b;
}

.btn-contrast-light {
    background: #ffffff !important;
    color: var(--primary-dark) !important;
    border: 1px solid #ffffff !important;
    font-weight: 700;
}

.btn-contrast-light:hover {
    background: #eaf1ff !important;
    color: var(--primary-dark) !important;
}

/* GRID SPACING */

.trust-grid,
.stats-grid,
.pathway-grid,
.featured-grid,
.steps-grid {
    gap: 24px;
}

/* CARD REFINEMENT */

.trust-item,
.pathway-card,
.featured-card,
.step-card,
.mission-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.trust-item {
    padding: 24px;
}

.trust-item h3 {
    margin-bottom: 10px;
}

.pathway-card {
    padding: 24px;
}

.pathway-card h3 {
    margin-bottom: 12px;
    font-size: 1.18rem;
}

.pathway-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.featured-card {
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 230px;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.featured-card h3 {
    font-size: 1.5rem;
    margin-top: 2px;
}

.featured-meaning {
    color: var(--text);
    font-weight: 700;
}

.featured-summary {
    color: var(--text-muted);
    line-height: 1.7;
}

.featured-link {
    margin-top: auto;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

.step-card {
    padding: 26px;
    border-radius: 16px;
}

.step-number {
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.mission-card {
    padding: 34px;
}

/* FAQ REFINEMENT */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.faq-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    padding: 18px 20px;
    position: relative;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-weight: 700;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 20px 18px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.75;
}

/* FINAL CTA REFINEMENT */

.cta-card {
    padding: 52px 36px;
    border-radius: 20px;
}

.cta-card h2 {
    margin-bottom: 10px;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 760px;
    margin: 0 auto;
}

.cta-card .hero-actions {
    justify-content: center;
    margin-top: 24px;
}

/* RESPONSIVE TWEAKS */

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-enhanced {
        padding: 86px 0 68px;
    }
}

@media (max-width: 768px) {
    section {
        margin-bottom: 68px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .cta-card {
        padding: 36px 22px;
    }

    .hero-copy .hero-lead,
    .hero-lead {
        font-size: 1.02rem;
    }
}

/* ============sign up page refinement================= */
/* AUTH IMPROVEMENTS */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
}

.toggle-password:hover {
    opacity: 1;
}

.password-strength,
.password-match {
    font-size: 0.85rem;
    margin-top: 6px;
}

.password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

.full-width {
    width: 100%;
}


/* AUTH POLISH */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    user-select: none;
}

.toggle-password:hover {
    opacity: 1;
}

.password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

.full-width {
    width: 100%;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.auth-inline-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-inline-link:hover {
    text-decoration: underline;
}


/* ============================= */
/* PREMIUM AUTH UI */
/* ============================= */

.auth-hero-block {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.auth-shell {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 24px;
    align-items: stretch;
    max-width: 1120px;
    margin: 0 auto;
}

.auth-shell-single {
    grid-template-columns: 1fr;
    max-width: 640px;
}

.auth-panel-intro,
.auth-card-premium {
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.auth-panel-intro {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid var(--border);
    padding: 28px;
}

.auth-panel-intro h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.auth-panel-intro p {
    color: var(--text-soft);
}

.auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}

.auth-feature-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
}

.auth-feature-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.auth-feature-item span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-card-premium {
    padding: 26px;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.auth-inline-link {
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.72;
    user-select: none;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1rem;
}

.toggle-password:hover {
    opacity: 1;
}

.password-strength,
.password-match {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

.password-hint {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
}

.auth-footer p {
    color: var(--text-soft);
}

.full-width {
    width: 100%;
}

.alert-info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* PREMIUM LIGHT DASHBOARD UI */
/* ============================= */

.dashboard-shell {
    width: min(94%, 1320px);
    margin: 0 auto;
    padding: 34px 0 72px;
    color: var(--text);
}

.dashboard-shell,
.dashboard-shell * {
    box-sizing: border-box;
}

/* Page background remains light and premium */
body.dashboard-page,
.dashboard-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 26%),
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, 0.05), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

/* Hero */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: 34px 30px;
    border-radius: 28px;
    border: 1px solid #dbe7f5;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.08), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f6f9ff 55%, #f2f6fd 100%);
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(15, 23, 42, 0.03);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.40), rgba(255,255,255,0));
}

.dashboard-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.55fr 0.95fr;
    gap: 28px;
    align-items: center;
}

.dashboard-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-dark);
    border: 1px solid #bfdbfe;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dashboard-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.dashboard-hero p {
    max-width: 760px;
    margin-bottom: 18px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
}

.dashboard-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.dashboard-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hero-mini-card {
    padding: 20px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.88);
    border: 1px solid #dbe5f1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(6px);
}

.hero-mini-card__label {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.hero-mini-card__value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
}

.quick-action-btn--primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.quick-action-btn--primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.quick-action-btn--secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.quick-action-btn--secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 22px;
    align-items: start;
}

.dashboard-stack {
    display: grid;
    gap: 22px;
}

/* Panels */
.panel {
    background: rgba(255,255,255,0.92);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.05),
        0 2px 8px rgba(15, 23, 42, 0.02);
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.panel__subtle {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.panel__body {
    padding: 20px;
}

/* Metrics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    min-height: 132px;
    padding: 20px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    text-align: left;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.stat-card__label {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-card__value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.stat-card__hint {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Activity and nav cards */
.activity-list,
.link-list,
.users-mini-list {
    display: grid;
    gap: 12px;
}

.activity-item,
.link-item,
.user-mini {
    display: block;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.activity-item:hover,
.link-item:hover,
.user-mini:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.activity-item__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.activity-item__title,
.user-mini__name {
    font-weight: 800;
    color: var(--text);
}

.activity-item__meta,
.user-mini__meta {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* Insight boxes */
.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.insight-box {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.insight-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.insight-box span {
    color: var(--text-soft);
    line-height: 1.65;
    font-size: 0.93rem;
}

/* Empty state */
.empty-state {
    padding: 22px 18px;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: var(--text-muted);
    line-height: 1.75;
}

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.status--approved {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status--pending {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status--rejected {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status--neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.section-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

/* Responsive */
@media (max-width: 1100px) {
    .dashboard-hero__grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .dashboard-shell {
        padding: 24px 0 56px;
    }

    .dashboard-hero {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .dashboard-hero__stats,
    .stats-grid,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .panel__head,
    .panel__body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-action-btn {
        width: 100%;
    }

    .activity-item__top,
    .user-mini {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============further polish of premium dashboard ui================= */
/* ============================= */
/* NEXT-LEVEL DASHBOARD ENHANCEMENTS */
/* ============================= */

.dashboard-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.dashboard-stack {
    display: grid;
    gap: 22px;
}

.users-mini-list {
    display: grid;
    gap: 12px;
}

.user-mini {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
}

.user-mini__name {
    font-weight: 800;
    color: var(--text);
}

.user-mini__meta {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.section-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

@media (max-width: 720px) {
    .user-mini {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================= */


/* ============================= */
/* AUTHORITY PAGE */
/* ============================= */

.authority-page .authority-subtitle {
    margin-top: 6px;
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-soft);
}

.authority-summary-panel {
    margin-bottom: 22px;
}

.authority-summary {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
}

.authority-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
}

.authority-grid {
    align-items: start;
}

.authority-page .activity-item__meta {
    line-height: 1.8;
}

.authority-page .hero-mini-card__value {
    word-break: break-word;
}

@media (max-width: 720px) {
    .authority-page .authority-subtitle,
    .authority-summary,
    .authority-content {
        font-size: 0.98rem;
    }
}

/* ============================= */
/* BROWSE PAGE */
/* ============================= */

.browse-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.browse-filter-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.browse-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.browse-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.browse-card__top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.browse-card__title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    line-height: 1.3;
}

.browse-card__title a {
    color: var(--text);
    text-decoration: none;
}

.browse-card__title a:hover {
    color: var(--primary-dark);
}

.browse-card__meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.browse-badge {
    padding: 7px 12px;
    font-size: 0.82rem;
    background: #f8fafc;
}

.browse-card__summary {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.browse-card__details {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.7;
}

.browse-card__footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.browse-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.browse-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.browse-page-current {
    color: var(--text-muted);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .browse-filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .browse-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .browse-filters-grid {
        grid-template-columns: 1fr;
    }

    .browse-card__footer {
        flex-direction: column;
    }

    .browse-card__footer .quick-action-btn {
        width: 100%;
    }
}


/* ===== DIFF SYSTEM ===== */

.diff-added {
  background: #dcfce7;
  color: #166534;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 500;
}

/* optional subtle animation */
.diff-added {
  animation: fadeInDiff 0.4s ease;
}

@keyframes fadeInDiff {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.submit-shell {
  background: linear-gradient(180deg, #f8fbff, #f4f7fb);
  padding: 40px 0 60px;
}

.submit-wrap {
  max-width: 1000px;
  margin: auto;
  padding: 0 16px;
}

.submit-hero {
  margin-bottom: 24px;
}

.submit-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 10px;
}

.submit-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: #0f172a;
}

.submit-subtitle {
  color: #64748b;
  line-height: 1.7;
}

.submit-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

textarea {
  min-height: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.submit-actions {
  margin-top: 20px;
}

.name-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.name-title {
  font-size: 2rem;
  font-weight: 900;
}

.name-meaning {
  color: #64748b;
}

.meta-pills span {
  background: #eef2ff;
  padding: 6px 12px;
  border-radius: 999px;
  margin-right: 8px;
}

.info-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}