:root {
    --nav-height: 72px;
    --sidebar-width: 280px;
    --surface: #ffffff;
    --surface-muted: #f3f6fb;
    --border: #dbe4ef;
    --text: #1a2a3a;
    --text-muted: #5b6d82;
    --brand: #0d6efd;
    --brand-dark: #0a4fb8;
    --accent: #f59f00;
    --danger: #d6334a;
    --shadow-sm: 0 8px 24px rgba(16, 38, 59, 0.08);
    --shadow-md: 0 14px 36px rgba(16, 38, 59, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--text);
    line-height: 1.65;
    background:
        radial-gradient(circle at 100% -10%, rgba(13, 110, 253, 0.14), transparent 40%),
        radial-gradient(circle at -10% 110%, rgba(245, 159, 0, 0.09), transparent 35%),
        #eef3f8;
}

body.sidebar-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playfair Display", serif;
    color: #14293f;
}

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

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    width: 100%;
    min-height: var(--nav-height);
    padding: 0.75rem 1rem;
    color: #fff;
    background: linear-gradient(90deg, #0f2236, #173757 60%, #224b74);
    box-shadow: 0 8px 22px rgba(8, 24, 40, 0.28);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0;
    padding: 0;
}

.top-nav li {
    margin: 0;
}

.top-nav a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.top-nav a:hover,
.top-nav a:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.top-nav form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.top-nav input[type="text"] {
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 0.45rem 0.8rem;
    min-width: 180px;
    font-size: 0.9rem;
}

.top-nav input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.top-nav button,
.top-nav input[type="submit"] {
    border-radius: 999px;
}

.hamburger {
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.3rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.hamburger:hover,
.hamburger:focus {
    background: rgba(255, 255, 255, 0.22);
}

.user-menu {
    margin-left: auto;
    position: relative;
}

.user-menu .user-button {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.user-menu a.user-button {
    text-decoration: none;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    min-width: 200px;
    padding: 0.5rem;
    border-radius: 12px;
    background: #10263b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
}

.user-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.user-dropdown a {
    width: 100%;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    color: #fff;
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.user-menu.active .user-dropdown {
    display: block;
}

.main-content {
    display: flex;
    width: 100%;
    min-height: calc(100vh - var(--nav-height));
    padding-top: var(--nav-height);
}

.sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 1.25rem 1rem 1.75rem;
    color: #e7edf6;
    background: linear-gradient(180deg, #132f4a 0%, #0f243a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    z-index: 1050;
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.sidebar.hidden {
    transform: translateX(0);
}

.sidebar h3,
.sidebar h5 {
    font-family: "Montserrat", sans-serif;
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.3rem 0 0.9rem;
}

.sidebar ul {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
}

.sidebar li + li {
    margin-top: 0.35rem;
}

.sidebar a {
    color: #d9e5f4;
    display: inline-block;
    padding: 0.35rem 0;
}

.sidebar a:hover {
    color: #fff;
}

.sidebar .form-label {
    color: #d9e5f4;
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
}

.sidebar .form-control,
.sidebar .form-select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d8e1ec;
    font-size: 0.9rem;
}

.sidebar .btn {
    width: 100%;
}

.content-shell,
.content-shell.expanded {
    margin: 1rem 1rem 1.5rem calc(var(--sidebar-width) + 1rem);
    width: calc(100% - var(--sidebar-width) - 2rem);
    max-width: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 1.2rem;
}

.content-shell > :last-child {
    margin-bottom: 0;
}

.card {
    border: 1px solid #dce6f2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(12, 29, 46, 0.06);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.card-footer {
    background: #f9fbff;
    border-top: 1px solid #dce6f2;
}

.table {
    --bs-table-bg: transparent;
}

.table th {
    color: #19324a;
    font-weight: 700;
    white-space: nowrap;
}

.article {
    max-width: 860px;
    margin-inline: auto;
}

.article img {
    border-radius: 12px;
}

.article p,
.article li {
    font-size: 1.04rem;
    color: #30465e;
}

.article-content {
    margin-top: 1rem;
    padding: 1.2rem;
    border-radius: 14px;
    background: #fbfdff;
    border: 1px solid #e2ebf5;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 1.2rem;
}

.article-content blockquote {
    border-left: 4px solid var(--brand);
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    background: #eef4ff;
    border-radius: 0 10px 10px 0;
}

.author {
    margin-top: 1rem;
    color: #5a738d;
    font-style: italic;
}

.article-hero {
    border: 1px solid #dae6f5;
    border-radius: 16px;
    padding: 1.2rem;
    background:
        linear-gradient(130deg, #f6faff 0%, #fdf7ec 100%);
    margin-bottom: 1.2rem;
}

.article-hero__eyebrow {
    display: inline-block;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #285f9c;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}

.article-hero__meta {
    color: #54708d;
    font-size: 0.9rem;
}

.article-grid .card,
.related-grid .card {
    height: 100%;
}

.article-card__image-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #d8e5f4;
}

.article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__image {
    transform: scale(1.04);
}

.article-card__meta {
    font-size: 0.84rem;
    color: #6a8198;
    margin-bottom: 0.35rem;
}

.article-card__excerpt {
    color: #4a6279;
    margin-bottom: 0.85rem;
}

.article-cover {
    margin: 1rem auto 1.2rem;
    max-width: 860px;
}

.article-cover img {
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.growth-panel {
    padding: 1rem;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    background: #fbfdff;
}

.growth-panel__number {
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1;
    font-weight: 800;
    color: #0a4fb8;
}

.listing-card__image-wrap {
    display: block;
    height: 100%;
    min-height: 240px;
    background: #e6eef7;
}

.listing-card__image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.listing-card__price {
    padding: 0.75rem;
    border-radius: 10px;
    background: #fff8e5;
    color: #3f3314;
}

.listing-card__price p {
    margin-bottom: 0;
    color: #3f3314;
}

.empty-growth-state {
    padding: 1.25rem;
    border: 1px solid #dce6f2;
    border-radius: 14px;
    background: #fbfdff;
}

.footer {
    margin-top: auto;
    background: #0f2236;
    color: #fff;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    margin: 0.65rem 0 0;
    padding: 0;
}

.footer-links a {
    color: #f9d568;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff2c4;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 20, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1040;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.pagination {
    flex-wrap: wrap;
}

@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 250px;
    }

    .top-nav input[type="text"] {
        min-width: 150px;
    }

    .content-shell,
    .content-shell.expanded {
        margin-left: calc(var(--sidebar-width) + 0.75rem);
        width: calc(100% - var(--sidebar-width) - 1.5rem);
    }
}

@media (max-width: 991.98px) {
    .hamburger {
        display: inline-flex;
    }

    .top-nav {
        flex-wrap: wrap;
        gap: 0.65rem;
        padding-block: 0.65rem;
    }

    .top-nav ul {
        width: 100%;
        order: 3;
        padding-bottom: 0.2rem;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .top-nav li {
        flex: 0 0 auto;
    }

    .top-nav form {
        flex-wrap: nowrap;
    }

    .top-nav input[type="text"] {
        min-width: 145px;
    }

    .user-menu {
        margin-left: 0;
    }

    .main-content {
        padding-top: 108px;
    }

    .sidebar {
        width: min(80vw, 310px);
        transform: translateX(-110%);
        box-shadow: var(--shadow-md);
    }

    .sidebar.hidden {
        transform: translateX(-110%);
    }

    .sidebar:not(.hidden) {
        transform: translateX(0);
    }

    .content-shell,
    .content-shell.expanded {
        margin: 0.7rem;
        width: calc(100% - 1.4rem);
        padding: 0.95rem;
    }

    .article-content {
        padding: 0.95rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --nav-height: 66px;
    }

    .top-nav a {
        font-size: 0.89rem;
        padding: 0.34rem 0.62rem;
    }

    .top-nav input[type="text"] {
        min-width: 120px;
        max-width: 45vw;
    }

    .main-content {
        padding-top: 120px;
    }

    .content-shell,
    .content-shell.expanded {
        border-radius: 14px;
        margin: 0.55rem;
        width: calc(100% - 1.1rem);
        padding: 0.85rem;
    }

    .card-footer {
        display: grid;
        gap: 0.5rem;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .article-hero h1 {
        font-size: 1.65rem;
    }
}

@media (max-width: 575.98px) {
    .top-nav {
        padding-inline: 0.7rem;
    }

    .user-dropdown {
        min-width: 170px;
    }

    .footer-links {
        gap: 0.3rem 0.5rem;
    }

    .footer-links a {
        font-size: 0.84rem;
    }
}
