/* ==========================
   JD EMPOWERED KNOWLEDGE MEMBER DASHBOARD
========================== */

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

:root {
    --navy: #0b1f3a;
    --navy-light: #14345e;
    --gold: #d4af37;
    --gold-light: #f4e7b3;
    --background: #f4f6f9;
    --surface: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #e4e7ec;
    --shadow: 0 12px 32px rgba(16, 24, 40, 0.08);
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* ==========================
   MAIN LAYOUT
========================== */

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

/* ==========================
   SIDEBAR
========================== */

.dashboard-sidebar {
    position: sticky;
    top: 0;

    display: flex;
    flex-direction: column;

    height: 100vh;
    padding: 24px 18px;

    overflow-y: auto;

    background:
        linear-gradient(
            180deg,
            #08172d 0%,
            var(--navy) 55%,
            #102b50 100%
        );

    color: #ffffff;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 4px 8px 22px;
    margin-bottom: 14px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-logo {
    width: 54px;
    height: 54px;

    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand h1 {
    margin-bottom: 3px;

    font-size: 19px;
    line-height: 1.2;
}

.sidebar-brand p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-section-title {
    margin: 18px 10px 7px;

    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 44px;
    padding: 10px 12px;

    border-radius: 9px;

    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--gold);
    color: var(--navy);
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.10);

    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.sidebar-link.active .sidebar-icon {
    background: rgba(11, 31, 58, 0.12);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.sidebar-logout-button {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9px;

    background: transparent;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.sidebar-logout-button:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--navy);
}

.sidebar-home-link {
    display: block;

    margin-top: 12px;

    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.sidebar-home-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================
   CONTENT AREA
========================== */

.dashboard-content {
    min-width: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;

    min-height: 108px;
    padding: 24px 34px;

    border-bottom: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.94);
}

.dashboard-eyebrow,
.welcome-label,
.module-label,
.summary-label {
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dashboard-header h2 {
    margin: 5px 0;

    color: var(--navy);
    font-size: 27px;
    line-height: 1.2;
}

.dashboard-tagline {
    color: var(--muted);
    font-size: 14px;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-button {
    min-height: 40px;
    padding: 9px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #ffffff;
    color: var(--navy);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.notification-button:hover {
    border-color: var(--gold);
    background: #fffaf0;
}

.member-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: var(--navy);
    color: #ffffff;

    font-size: 13px;
    font-weight: 800;
}

.dashboard-main {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;
    padding: 30px 34px 42px;
}

/* ==========================
   WELCOME BANNER
========================== */

.dashboard-welcome-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;

    padding: 28px 30px;
    margin-bottom: 24px;

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fffaf0 100%
        );

    box-shadow: var(--shadow);
}

.dashboard-welcome-card h3 {
    margin: 6px 0 9px;

    color: var(--navy);
    font-size: 24px;
    line-height: 1.25;
}

.dashboard-welcome-card p:not(.welcome-label) {
    max-width: 760px;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.primary-dashboard-button,
.secondary-dashboard-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 16px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 800;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.primary-dashboard-button {
    flex-shrink: 0;

    border: 1px solid var(--navy);

    background: var(--navy);
    color: #ffffff;
}

.primary-dashboard-button:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--navy);

    transform: translateY(-1px);
}

.secondary-dashboard-button {
    border: 1px solid var(--navy);

    background: #ffffff;
    color: var(--navy);
}

.secondary-dashboard-button:hover {
    border-color: var(--gold);

    background: #fff8e1;
    color: var(--navy);

    transform: translateY(-1px);
}

/* ==========================
   SUMMARY CARDS
========================== */

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

    margin-bottom: 24px;
}

.summary-card {
    min-height: 154px;
    padding: 21px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);
    box-shadow: var(--shadow);
}

.summary-number {
    display: block;

    margin: 12px 0 17px;

    color: var(--navy);
    font-size: 34px;
    line-height: 1;
}

.summary-card a {
    color: var(--navy-light);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.summary-card a:hover {
    color: #aa8519;
    text-decoration: underline;
}

/* ==========================
   DASHBOARD MODULES
========================== */

.dashboard-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-module {
    min-height: 250px;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--surface);
    box-shadow: var(--shadow);
}

.large-module {
    grid-column: span 2;
}

.module-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    margin-bottom: 20px;
}

.module-heading h3 {
    margin-top: 4px;

    color: var(--navy);
    font-size: 20px;
}

.module-heading > a {
    color: var(--navy-light);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.module-heading > a:hover {
    color: #aa8519;
    text-decoration: underline;
}

.module-description {
    margin-bottom: 20px;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 185px;
    padding: 24px;

    border: 1px dashed #cfd4dc;
    border-radius: 12px;

    background: #fafbfc;

    text-align: center;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    margin-bottom: 12px;

    border-radius: 11px;

    background: var(--gold-light);
    color: var(--navy);

    font-weight: 800;
}

.empty-state h4 {
    margin-bottom: 6px;

    color: var(--navy);
    font-size: 17px;
}

.empty-state p {
    max-width: 520px;
    margin-bottom: 17px;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.quick-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.quick-link-list a {
    display: flex;
    align-items: center;

    min-height: 52px;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #fafbfc;
    color: var(--navy);

    font-size: 13px;
    font-weight: 700;
    text-decoration: none;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.quick-link-list a:hover {
    border-color: var(--gold);

    background: #fffaf0;

    transform: translateY(-1px);
}

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

.dashboard-footer {
    padding: 18px 34px 26px;

    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

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

@media (max-width: 1180px) {
    .dashboard-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-layout {
        display: block;
    }

    .dashboard-sidebar {
        position: static;

        height: auto;
        padding: 16px;
    }

    .sidebar-brand {
        padding-bottom: 14px;
    }

    .sidebar-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-section-title {
        grid-column: 1 / -1;
    }

    .sidebar-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;

        margin-top: 20px;
        padding-top: 16px;
    }

    .sidebar-home-link {
        display: flex;
        align-items: center;
        justify-content: center;

        margin-top: 0;
    }

    .dashboard-header {
        padding: 22px 24px;
    }

    .dashboard-main {
        padding: 24px;
    }

    .dashboard-welcome-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .sidebar-navigation {
        grid-template-columns: 1fr;
    }

    .sidebar-section-title {
        grid-column: auto;
    }

    .sidebar-footer {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .dashboard-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-main {
        padding: 18px 14px 28px;
    }

    .dashboard-welcome-card {
        padding: 22px 20px;
    }

    .dashboard-welcome-card h3 {
        font-size: 21px;
    }

    .dashboard-summary-grid,
    .dashboard-module-grid {
        grid-template-columns: 1fr;
    }

    .large-module {
        grid-column: auto;
    }

    .quick-link-list {
        grid-template-columns: 1fr;
    }

    .module-heading {
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-footer {
        padding: 16px;
    }
}

@media (max-width: 420px) {
    .dashboard-header h2 {
        font-size: 23px;
    }

    .dashboard-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .member-avatar {
        display: none;
    }

    .notification-button {
        width: 100%;
    }
}