:root {
    --app-primary: #155eef;
    --app-primary-dark: #0f3fa8;
    --app-surface: #ffffff;
    --app-background: #f4f7fb;
    --app-border: #dfe5ee;
    --app-text: #172033;
    --app-muted: #667085;
    --app-content-width: 1440px;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    background: var(--app-background);
    color: var(--app-text);
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(110deg, var(--app-primary-dark), var(--app-primary));
    box-shadow: 0 0.25rem 1rem rgb(15 63 168 / 18%);
    z-index: 1030;
}

.app-header .navbar {
    --bs-navbar-padding-y: 0.65rem;
}

.app-header .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-header .nav-link {
    border-radius: 0.5rem;
    padding-inline: 0.8rem !important;
}

.app-header .nav-link.active {
    background: rgb(255 255 255 / 16%);
    font-weight: 600;
}

.app-logo {
    border-radius: 0.55rem;
}

.app-main {
    min-height: calc(100vh - 4rem);
}

.app-main > .container,
.app-main > .container-fluid,
.app-main .container-xl {
    max-width: var(--app-content-width);
}

.app-main > .container-fluid {
    margin-inline: auto;
}

.app-messages {
    max-width: var(--app-content-width);
}

.app-sidebar {
    --bs-offcanvas-width: min(88vw, 22.5rem);
    border-right: 1px solid var(--app-border);
    min-height: calc(100vh - 4rem);
}

.app-sidebar .offcanvas-body {
    overflow-y: auto;
}

.app-sidebar .sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.feed-search {
    position: relative;
}

.feed-search-results {
    left: 0;
    max-height: 20rem;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 1040;
}

.app-main .card {
    border-color: var(--app-border);
    box-shadow: 0 0.125rem 0.375rem rgb(23 32 51 / 4%);
}

.article-toolbar {
    background: linear-gradient(
        to bottom,
        var(--app-background) 82%,
        rgb(244 247 251 / 0%)
    );
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    padding-top: 0.5rem;
    position: sticky;
    top: 4rem;
    z-index: 1020;
}

.article-search-form {
    padding: 0.625rem;
}

.article-search-layout {
    align-items: stretch;
    display: flex;
    gap: 0.625rem;
}

.article-search-query {
    flex: 1 1 auto;
    min-width: 0;
}

.article-search-form .material-icons {
    font-size: 1.15rem;
}

.article-filter-bar {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.5rem 0.125rem 0.125rem;
    scrollbar-width: thin;
}

.article-filter-bar .btn {
    flex: 0 0 auto;
}

.article-list-heading {
    padding-inline: 0.125rem;
}

.article-card {
    margin-bottom: 0.875rem;
    overflow: hidden;
    padding: 1rem 1.125rem;
    transition: padding 160ms ease, margin 160ms ease;
}

.article-title-zone {
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 0.625rem;
}

.article-title-link {
    display: block;
    line-height: 1.35;
    padding: 0.125rem 0 0.625rem;
}

.article-title-link:hover,
.article-title-link:focus-visible {
    color: var(--app-primary-dark);
    text-decoration: underline !important;
    text-underline-offset: 0.2em;
}

.article-meta {
    align-items: center;
    color: var(--app-muted);
    display: flex;
    flex-wrap: nowrap;
    font-size: 0.825rem;
    gap: 0.375rem 0.875rem;
    margin-bottom: 0.625rem;
    min-width: 0;
}

.article-meta-item {
    align-items: center;
    display: inline-flex;
    gap: 0.25rem;
    min-width: 0;
    white-space: nowrap;
}

.article-meta-item .material-icons {
    flex: 0 0 auto;
    font-size: 1rem;
}

.article-source,
.article-author {
    max-width: 38%;
}

.article-date {
    flex: 0 0 auto;
}

.article-summary {
    display: -webkit-box;
    line-height: 1.55;
    margin-bottom: 0.75rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.article-footer .material-icons {
    font-size: 1.1rem;
}

.article-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.article-tag-editor > .card {
    background: var(--bs-light-bg-subtle);
    box-shadow: none;
}

.subscription-card,
.subscription-card .card-body,
#flux-table,
#flux-wrapper {
    max-width: 100%;
    min-width: 0;
}

.subscription-table-wrapper {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

.subscription-feed-name {
    min-width: 12rem;
    overflow-wrap: anywhere;
}

.theme-flux-toolbar {
    max-width: 42rem;
}

.theme-flux-list {
    max-height: 32rem;
    overflow-y: auto;
}

.theme-flux-item {
    align-items: flex-start;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    gap: 0.65rem;
    margin: 0;
    padding: 0.65rem 0.85rem;
}

.theme-flux-item:last-child {
    border-bottom: 0;
}

.theme-flux-item:has(.form-check-input:checked) {
    background-color: var(--bs-primary-bg-subtle);
}

.theme-flux-item .form-check-label {
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.theme-flux-item .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0.2rem 0 0;
}

#flux-wrapper .pagination {
    flex-wrap: wrap;
}

.login-page {
    background-color: #dbeafe;
}

.login-main {
    align-items: center;
    background-image:
        linear-gradient(90deg, rgb(7 22 48 / 28%), rgb(7 22 48 / 4%)),
        url("../../images/rss/login_bg-2.jpg");
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: rgb(255 255 255 / 94%);
    border: 0;
    border-radius: 1rem;
    max-width: 25rem;
    width: 100%;
}

.login-brand-icon {
    border-radius: 0.75rem;
    height: 3rem;
    width: 3rem;
}

.app-log-output {
    background: #101828;
    border-radius: 0.75rem;
    color: #d1fadf;
    max-height: 65vh;
    overflow: auto;
    padding: 1rem;
    white-space: pre-wrap;
}

@media (min-width: 768px) {
    .login-main {
        justify-content: flex-start;
        padding: 3rem;
    }
}

@media (max-width: 991.98px) {
    .app-header .navbar-collapse {
        padding-top: 0.75rem;
    }

    .app-account-menu {
        padding-block: 0.75rem 0.25rem;
    }

    .app-account-menu > .btn {
        justify-content: center;
        width: 100%;
    }

    .app-account-menu .dropdown-menu {
        position: static;
        width: 100%;
    }

    .app-sidebar {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    #content {
        padding: 0.75rem !important;
    }

    .article-toolbar {
        top: 3.85rem;
    }

    .article-card {
        padding: 0.875rem;
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .article-source,
    .article-author {
        max-width: calc(50% - 0.5rem);
    }

    .article-date {
        width: 100%;
    }
}

@media (max-width: 399.98px) {
    .article-search-query .form-control {
        min-width: 0;
    }

    .article-source,
    .article-author {
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .app-sidebar .offcanvas-body {
        overflow: visible;
    }
}
