
/* ── Nunito – local ──────────────────────────────────────────────────── */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/nunito-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/nunito-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/nunito-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/nunito-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap; src:url('fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap; src:url('fonts/nunito-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 127, 168, 0.28) transparent;
}

/* Webkit — Chrome, Edge, Safari */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(77, 127, 168, 0.28);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 127, 168, 0.50);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

[x-cloak=""] {
    display: none;
}

input:focus,
select:focus {
    border-color: #4d7fa8 !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.bg-gradient {
    background: linear-gradient(to bottom, #EFF6FF, #FFFFFF)
}

.bg-blue1 {
    background-color: #04364A;
}

.bg-blue2 {
    background-color: #176B87;
}

.bg-blue3 {
    background-color: #005983;
}

.bg-blue4 {
    background-color: #EFF6FF !important;
}

.text-blue1 {
    color: #04364A !important;
}

.text-blue2 {
    color: #176B87;
}

.text-blue3 {
    color: #64CCC5;
}

.text-blue4 {
    color: #EFF6FF;
}

.bg-blue-fade {
    background-color: #EFF6FF !important;
}

.disabled-fade {
    background-color: rgb(225, 225, 225) !important;
    border-bottom: 1px solid rgb(243, 244, 246) !important;
}

.allow-input {
    background-color: white;
    cursor: initial;
}

.not-allow-input {
    background-color: rgb(243, 244, 246);
    cursor: not-allowed;
}

.tooltip-position {
    left: 100%;
    top: 50%;
    transform: translateX(10px) translateY(-50%);
}

.input-invalid-style {
    background-color: rgba(250, 128, 114, 0.2);
    border-color: rgba(250, 128, 114, 0.5);
}

.valid-control-class {
    background-color: #FFFFFF !important;
    border-color: rgba(229, 231, 235, 1) !important;
}

.invalid-control-class {
    background-color: rgba(250, 128, 114, 0.2) !important;
    border-color: rgba(250, 128, 114, 1) !important;
}

* {
    user-select: none;
    -webkit-user-select: none; /*IE,etc*/
    -moz-user-select: none; /*Mozzila Firefox*/
}

input::placeholder {
    text-transform: initial;
    font-size: 16px;
}

.app-overlay-header {
    background: #AAAAAA;
    opacity: .3;
    filter: Alpha(Opacity=30);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.current-page-border {
    border: 1px solid #64CCC5;
}

.pages a:hover {
    background-color: #EFF6FF;
}

.body-custom {
    background: linear-gradient(to bottom, #04364A, #EFF6FF, #176B87)
}

tr.selected, .table-hover-custom tbody tr:hover {
    background-color: #E7EDF3 !important;
}

.autocomplete-select-dropdown {
    overflow-y: auto;
    max-height: 250px;
}

.max-w-180 {
    max-width: 11.25rem;
}

#notifErrors {
    width: 26rem;
}

.error-info-link {
    color: #9B2C2C;
    text-decoration: none;
}

.error-info-link:hover {
    text-decoration: underline;
}

/***************************************************** NAVBAR *********************************************************/
.sigla {
    width: 411px;
    height: 84px;
    float: left;
    padding-left: 50px;
    padding-top: 5px;
}

.container_nav {
    width: 1000px;
    margin: 0 auto;
}

.container_page {
    width: 80%;
    margin: 0 auto;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
}


.gradient-background {
    background: linear-gradient(to top, #999999, #d9d9d9, #ffffff);
}

.title {
    font-family: Verdana, sans-serif;
}

.title h1 {
    text-shadow: -1px 4px 4px rgba(128, 128, 128, 0.7);
}

/*************************************************** NAVBAR END *******************************************************/

table tr:nth-child(odd) td {
    background-color: #EFF6FF !important;
}

table tr:nth-child(even) td {
    background-color: #FFFFFF !important;
}

.avizier-left-info {
    float: left;
    font-size: 1rem;
    padding-top: 5px;
    font-weight: bold;
    color: #8B0000;
}

.avizier-right-info {
    float: right;
    font-size: 0.8rem;
    padding-top: 8px;
    color: red;
    font-weight: 600;
    text-decoration: underline;
}

.container-footer:after { /*clear float*/
    content: "";
    display: table;
    clear: both;
}

.section-footer {
    float: left;
    width: 33.3333%;
    box-sizing: border-box;
}




.scroll-top-btn {
    position: fixed;
    bottom: 26px;
    right: 0;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    display: none;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease-in-out;
}

.scroll-top-btn:hover {
    background-color: #0056b3;
}

/* uniform font + size for controls */
#filterWrap .filter-control,
#filterWrap select,
#filterWrap input,
#filterWrap textarea {
    font-family: var(--font-sys);
    font-size: 15px;
    line-height: 1.4;
}

/* placeholder styling */
#filterWrap .filter-control::placeholder,
#filterWrap input::placeholder,
#filterWrap textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
    font-size: 15px;
    line-height: 1.4;
}

#filterWrap .filter-label,
#filterWrap .filter-heading,
#filterWrap .date-btn {
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 42px;
    padding: 0 1.2rem;
    border-radius: 8px;
    font-family: var(--font-sys);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition:
        background 0.14s ease,
        color 0.14s ease,
        border-color 0.14s ease,
        box-shadow 0.14s ease,
        transform 0.1s ease;
}

/* Primary — dominant, solid fill */
.btn-primary {
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    background: #176B87;
    border: 1.5px solid #176B87;
    box-shadow:
        0 1px 2px rgba(23, 107, 135, 0.12),
        0 4px 14px rgba(23, 107, 135, 0.18);
}

.btn-primary:hover {
    background: #125a74;
    border-color: #125a74;
    box-shadow:
        0 2px 4px rgba(23, 107, 135, 0.14),
        0 8px 22px rgba(23, 107, 135, 0.22);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: #0e4a60;
    border-color: #0e4a60;
    box-shadow: 0 1px 3px rgba(23, 107, 135, 0.12);
    transform: translateY(0);
}

.btn-primary:focus-visible {
    outline: 2px solid #176B87;
    outline-offset: 2px;
    box-shadow: none;
}

/* Secondary — recessed, outline, subordinate */
.btn-secondary {
    padding: 0 1rem;
    font-weight: 700;
    font-size: 0.82rem;
    color: #5a7a94;
    background: transparent;
    border: 1.5px solid #b0c8d8;
    box-shadow: none;
}

.btn-secondary:hover {
    color: #4d7fa8;
    border-color: #7a9ab5;
    background: rgba(77, 127, 168, 0.05);
    box-shadow: none;
    transform: none;
}

.btn-secondary:active {
    background: rgba(77, 127, 168, 0.10);
    border-color: #4d7fa8;
    color: #4d7fa8;
    transform: none;
}

.btn-secondary:focus-visible {
    outline: 2px solid #176B87;
    outline-offset: 2px;
}

/* Disabled */
.btn-primary:disabled,
.btn-primary[aria-disabled="true"],
.btn-secondary:disabled,
.btn-secondary[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Icon inside button */
.btn-primary .icon,
.btn-secondary .icon {
    display: block;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Active state shared */
.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
}

.filter-actions {
    padding-top: 1rem;
    border-top: 1px solid rgba(11, 37, 64, 0.04);
    margin-top: 0.5rem;
}

/* Base */
:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-2: #075985;
    --surface: #eef2f7;
    --danger: #dc2626;
    --radius: 12px;
    --container-gap: 1rem;
    --font-sys: 'Nunito', 'DM Sans', Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    --sticky-top: 0px;
}

.filter-banner {
    gap: 1rem;
    background: linear-gradient(90deg, #eef6ff, #f7fbff);
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 6px 18px rgba(9, 30, 66, 0.04);
}

.avizier-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}


.badge {
    background: #eef7ff;
    color: var(--accent-2);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary:active, .btn-secondary:active {
    transform: translateY(0);
}

.avizier-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.avizier-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.avizier-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #071433;
    margin: 0;
}

.avizier-meta {
    color: #64748b;
    font-size: 0.95rem;
}

.avizier-body {
    margin-top: 0.5rem;
    color: #0b2540;
    line-height: 1.45;
    transition: background-color 200ms ease, box-shadow 200ms ease;
}

.avizier-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
    border: 1px solid rgba(2, 6, 23, 0.04);
    cursor: pointer;
    transition: background-color 200ms ease, box-shadow 200ms ease;
}

#listWrap {
    gap: 0.3rem;
    margin-top: 0 !important;
}

.list-header-sticky {
    position: sticky;
    top: 4rem;
    z-index: 50;
    margin-top: 0.75rem;
    backdrop-filter: blur(6px);
}

.list-header-inner {
    background: linear-gradient(180deg, #eef3f8, #F5F5F5);
    padding: 0.55rem 0.55rem 1.3rem 1rem;
    border: 1px solid rgba(2, 6, 23, 0.04);
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    border-radius: 0 0 var(--radius, 10px) var(--radius, 10px);
    margin: 0;

}

.rnn-subtle {
    margin-top: 0.75rem;
}

.rnn-subtle-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.rnn-note {
    color: #64748b;
    font-size: 0.82rem;
}

.rnn-subtle-link {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(14, 63, 99, 0.06);
    color: #064e78;
    text-decoration: none;
    border: 1px solid rgba(6, 78, 120, 0.06);
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.03);
    transition: background-color .12s ease, transform .08s ease, box-shadow .12s ease;
}

.rnn-subtle-link:hover {
    background: rgba(6, 78, 120, 0.09);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05);
}

.list-header-title {
    flex: 1 1 auto;
    min-width: 0;
}

.list-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: #071433;
    white-space: nowrap; /* keeps on one line when space permits */
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-header-action {
    flex: 0 0 auto;
    margin-left: 0.5rem;
}

.rnn-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(2, 6, 23, 0.04);
    color: var(--accent-2);
    transition: all .12s;
    text-decoration: none;
}

.rnn-icon {
    width: 16px;
    height: 16px;
    display: block;
    stroke: currentColor;
}

.rnn-icon-link:hover {
    background: rgba(6, 78, 120, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.06);
}

.list-header-sticky {
    position: sticky;
    top: var(--sticky-top);
    z-index: 1;
    margin-bottom: 0.25rem;
    margin-top: 0.75rem;
    backdrop-filter: blur(6px);
}

.label-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle
}

.label-green {
    background: rgba(16, 185, 129, .15);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, .25)
}

.label-red {
    background: rgba(248, 113, 113, .15);
    color: #7f1d1d;
    border: 1px solid rgba(248, 113, 113, .25)
}

.label-gap {
    margin-left: .35rem
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-flex > div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-flex img {
    height: 84px;
    width: auto;
}

@media screen and (max-width: 1600px) {

    .text-base {
        font-size: 0.875rem !important;
        line-height: 1.25rem !important;
    }

    .text-lg {
        font-size: 1rem !important;
        line-height: 1.5rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.75rem !important;
    }

    .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }

    .text-3xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    .text-6xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .sm-max-w-12 {
        width: 3rem;
    }

    .sm-max-w-20 {
        width: 5rem;
    }

    .sm-max-w-24 {
        width: 6rem;
    }

    .sm-max-w-34 {
        width: 8.5rem;
    }

    .sm-max-w-38 {
        width: 9.5rem;
    }

    .sm-max-w-42 {
        width: 10.5rem;
    }

    .gap-6 {
        gap: 1rem !important;
    }

    .table-hover-custom td, th {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }


    th.w-68 {
        width: 12rem !important;
    }

    a.custom-button.px-6,
    button.custom-button.px-6 {
        padding: 0.5rem 1rem !important;
    }

    .cd-multi-steps li > * {
        font-size: 1.2rem !important;
    }

    .cd-multi-steps.text-top.count li > *::before,
    .cd-multi-steps.text-bottom.count li > *::before {
        height: 44px !important;
        width: 44px !important;
        line-height: 40px !important;
        font-size: 1.2rem !important;
    }

    input[type=checkbox],
    input[type=radio] {
        width: 1rem !important;
        height: 1rem !important;
    }

    .p-6 {
        padding: 1rem !important;
    }

    .p-8 {
        padding: 1.5rem !important;
    }

    .px-8 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .nav-menuitem {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .action-button {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        margin-bottom: 1rem;
    }

    .action-button svg {
        width: 3rem !important;
        height: 3rem !important;
    }

    .m-8 {
        margin: 1.5rem !important;
    }

    .unnpr img {
        width: 20rem;
        height: 17rem;
    }

    .hide-intro span {
        font-size: 5rem !important;
        line-height: 1 !important;
    }

    .hide-intro img {
        width: 10rem;
        height: 8.5rem;
    }
}

@media screen and (max-width: 1500px) {
    #notifErrors {
        width: 22rem;
    }
}

@media screen and (max-width: 1400px) {
    .homepage-content {
        left: 22%;
    }
}

@media (max-width: 768px) {
    /*breakpoint*/
    .section-footer {
        float: none;
        width: auto;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary {
        height: 46px;
    }
}

@media (max-width: 900px) {
    .avizier-card {
        padding: 1rem;
    }

    .avizier-title {
        font-size: 1rem
    }
}


@media (max-width: 720px) {
    .avizier-card {
        padding: 1rem;
    }

    .avizier-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .list-title {
        font-size: 1.15rem;
    }

    .rnn-icon-link {
        width: 30px;
        height: 30px;
    }

    .header-flex > div {
        flex: 1 1 100%;
        text-align: center;
    }

    .header-flex img {
        height: 64px;
    }

    #listWrap {
        gap: 0.4rem;
    }

    .avizier-card {
        padding: 0.5rem 0.75rem;
    }

    .avizier-title {
        font-size: 0.98rem;
    }

    .avizier-meta {
        font-size: 0.92rem;
    }
}


@media (max-width: 520px) {
    .rnn-subtle-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .rnn-subtle-link {
        width: 100%;
        justify-content: center;
    }

    .rnn-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .avizier-card {
        padding: 0.9rem;
    }
}


/* ══════════════════════════════════════════════════════════════════════════
   CITATIE PAGE – Professional redesign
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Entrance animations ─────────────────────────────────────────────── */

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.72); }
    to   { opacity: 1; transform: scale(1); }
}

.filter-section {
    animation: fadeSlideUp 0.38s ease both;
}

.list-section {
    animation: fadeSlideUp 0.38s ease 0.1s both;
}

/* ── Page ────────────────────────────────────────────────────────────── */

.page-bg {
    background: linear-gradient(160deg, #eef2f7 0%, #f4f7fb 60%, #edf1f7 100%);
}

.citatie-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.avizier-app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 54, 74, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
}

/* ── Flatpickr theme override ─────────────────────────────────────────── */

.flatpickr-calendar {
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(4, 54, 74, 0.14), 0 2px 8px rgba(4, 54, 74, 0.08) !important;
    border: 1px solid #d4dde8 !important;
    font-family: var(--font-sys) !important;
}

.flatpickr-months .flatpickr-month {
    background: #4d7fa8 !important;
    color: #fff !important;
    fill: #fff !important;
    border-radius: 9px 9px 0 0;
    height: 40px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
    top: 3px !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #64CCC5 !important;
}

/* Normalize header — flatpickr's default 135% makes the two selects
   render at different computed sizes depending on inheritance chain */
.flatpickr-current-month {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    padding-top: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 100% !important;
    left: 0 !important;
}

/* numInputWrapper — let the year select size it naturally */
.flatpickr-current-month .numInputWrapper {
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Shared styles — BOTH dropdowns look identical */
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-year-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.8)' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 5px center !important;
    background-size: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 5px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    outline: none !important;
    padding: 4px 22px 4px 8px !important;
    height: 26px !important;
    vertical-align: middle !important;
    transition: background-color 0.12s ease !important;
    margin: 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-year-select:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
}

/* Dropdown options — white background in the OS-rendered list */
.flatpickr-current-month .flatpickr-monthDropdown-months option,
.flatpickr-year-select option {
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 400 !important;
}

/* Hide native arrows that remain visible in some browsers */
.flatpickr-current-month .numInputWrapper span {
    display: none !important;
}

span.flatpickr-weekday {
    color: #4d7fa8 !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
}

.flatpickr-day {
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    color: #1e293b !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: #e8f0f7 !important;
    border-color: #e8f0f7 !important;
}

.flatpickr-day.today {
    border-color: #176B87 !important;
    font-weight: 700;
}

.flatpickr-day.today:hover {
    background: #176B87 !important;
    border-color: #176B87 !important;
    color: #fff !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #4d7fa8 !important;
    border-color: #4d7fa8 !important;
    color: #fff !important;
    font-weight: 700;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #94a3b8 !important;
}

.flatpickr-clear-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 6px 8px 8px;
    padding: 6px 0;
    background: none;
    border: 1px solid #d4dde8;
    border-radius: 6px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: var(--font-sys);
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.flatpickr-clear-btn:hover {
    background: #f8fafc;
    border-color: #176B87;
    color: #176B87;
}

/* ── Datepicker wrapper ────────────────────────────────────────────────── */

.flat-wrap {
    position: relative;
}

.date-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    line-height: 1;
    transition: color .12s ease;
}

.date-btn:hover {
    color: #176B87;
}

.date-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* ── Filter Card ──────────────────────────────────────────────────────── */

.filter-section {
    margin-bottom: 1rem;
}

.filter-card {
    background: #ffffff;
    border-radius: 14px;
    border-top: 4px solid #4d7fa8;
    box-shadow:
        0 4px 24px rgba(4, 54, 74, 0.07),
        0 1px 3px rgba(4, 54, 74, 0.04);
    padding: 1.5rem 1.75rem 1.25rem;
}

.filter-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8eef4;
}

.filter-card-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: #4d7fa8;
    margin: 0;
    letter-spacing: 0;
}

.filter-heading-icon {
    width: 19px;
    height: 19px;
    color: #176B87;
    flex-shrink: 0;
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem 1.2rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #526070;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-control {
    width: 100%;
    height: 40px;
    padding: 0 0.8rem;
    border: 1.5px solid #cfd8e3;
    border-radius: 8px;
    background: #f9fbfd;
    color: #1e293b;
    font-size: 0.875rem;
    font-family: var(--font-sys);
    line-height: 1.4;
    transition: border-color .14s ease, box-shadow .14s ease, background .1s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.filter-control:hover:not(:focus) {
    border-color: #a8bfce;
    background: #f4f8fc;
}

.filter-control:focus {
    outline: none;
    border-color: #176B87 !important;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.13);
}

input.filter-control:not(:placeholder-shown):not(:focus) {
    background: #eef6ff;
    border-color: rgba(77, 127, 168, 0.5);
}

.filter-control::placeholder {
    color: #9aaab8;
    font-size: 0.85rem;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

html.dark .select-wrap::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236a8aaa' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.filter-select {
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: none !important;
    padding-right: 2rem;
}

.filter-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid #e8eef4;
}

.filter-actions-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ── List Bar (sticky dark header) ───────────────────────────────────── */

.list-section {
    margin-top: 0;
}

.list-bar-wrap {
    position: sticky;
    top: 0;
    z-index: 30;
}

.list-bar-wrap.is-stuck .list-bar {
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 1px 6px rgba(0, 0, 0, 0.10);
}

.list-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #4d7fa8;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 4px 18px rgba(77, 127, 168, 0.20);
    transition: border-radius 0.1s ease;
}


.list-bar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    min-width: 0;
}

.list-bar-right {
    flex-shrink: 0;
}

.list-bar-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 400;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0;
}

.list-bar-status {
    display: flex;
    align-items: center;
}

.list-bar .label-pill {
    font-size: 0.76rem;
}

.rnn-icon-link--light {
    color: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.rnn-icon-link--light:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ── Filter status strip ─────────────────────────────────────────────── */

.list-status-strip {
    background: #ffffff;
    border-left: 4px solid #4d7fa8;
    border-right: 1px solid rgba(4, 54, 74, 0.09);
    padding: 0.45rem 1.25rem;
    display: flex;
    align-items: center;
}

/* ── Citation Cards ──────────────────────────────────────────────────── */

.citation-list {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    border-top: none;
    border-right: 1px solid rgba(4, 54, 74, 0.09);
    border-bottom: 1px solid rgba(4, 54, 74, 0.09);
    border-left: none;
}

#listWrap.citation-list {
    margin-top: 0 !important;
}

.citation-card {
    background: #ffffff;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #edf1f6;
    padding: 1.1rem 1.4rem 0.7rem 1.25rem;
    cursor: pointer;
    transition: background .18s ease, border-left-color .18s ease,
                box-shadow .18s ease, transform .18s ease;
    animation: fadeSlideUp 0.28s ease both;
    animation-delay: calc(min(var(--card-i, 0), 12) * 0.03s);
}

.citation-card:last-child {
    border-bottom: none;
}

.citation-card:hover {
    background: #e8f2fb;
    border-left-color: #4d7fa8;
    box-shadow: 0 4px 18px rgba(77, 127, 168, 0.13),
                0 1px 4px rgba(77, 127, 168, 0.08);
    transform: translateY(-2px);
    position: relative;
    z-index: 1;
}

.citation-card-body {
    color: #1a2840;
    font-size: 0.92rem;
    line-height: 1.7;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
}


/* ── Empty State ─────────────────────────────────────────────────────── */

.citation-empty {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    padding: 3.5rem 2rem;
    text-align: center;
    border: 1px solid rgba(4, 54, 74, 0.07);
    border-top: none;
}

.citation-empty-icon {
    width: 52px;
    height: 52px;
    color: #b0bec9;
    margin: 0 auto 0.85rem;
    display: block;
}

.citation-empty-text {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* ── Scroll-up Button ────────────────────────────────────────────────── */

.scroll-up-btn {
    position: fixed;
    bottom: 4rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4d7fa8;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 16px rgba(77, 127, 168, 0.28);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background .14s ease, transform .12s ease, box-shadow .12s ease;
    z-index: 100;
    padding: 0;
}

.scroll-up-btn.is-visible {
    display: flex;
    animation: popIn 0.2s ease both;
}

.scroll-up-btn:hover {
    background: #3f6e96;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(77, 127, 168, 0.32);
}

.scroll-up-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #f8fafc, #ffffff, #f8fafc);
    border-top: 1px solid rgba(77, 127, 168, 0.28);
    box-shadow: 0 -4px 20px rgba(77, 127, 168, 0.07), 0 -1px 3px rgba(0, 0, 0, 0.03);
    z-index: 50;
    font-family: var(--font-sys);
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1.5rem;
}

.app-footer-left,
.app-footer-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.72rem;
    color: #78909c;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.app-footer-version {
    font-weight: 700;
    color: #4d7fa8;
    letter-spacing: 0.03em;
    font-size: 0.72rem;
}

.app-footer-sep {
    color: #b0bec5;
    font-weight: 300;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0 0.1rem;
}

.app-footer-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
    display: block;
}

.app-footer-link {
    font-weight: 700;
    color: #4d7fa8;
    text-decoration: none;
    letter-spacing: 0.02em;
    font-size: 0.72rem;
    transition: color 0.14s ease;
}

.app-footer-link:hover {
    color: #176B87;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

@media (max-width: 520px) {
    .app-footer-inner {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.4rem 1rem;
        align-items: center;
        text-align: center;
    }

    .app-footer-left,
    .app-footer-right {
        justify-content: center;
    }
}

/* ── Dark Mode Toggle Button ─────────────────────────────────────────── */

.dark-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: 1.5px solid #cfd8e3;
    color: #64748b;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    -webkit-user-select: none;
    user-select: none;
}

.dark-toggle-btn:hover {
    background: rgba(77, 127, 168, 0.08);
    border-color: #4d7fa8;
    color: #4d7fa8;
}

.dark-toggle-icon {
    width: 17px;
    height: 17px;
    display: block;
}

.dark-toggle-sun { display: none; }
html.dark .dark-toggle-sun { display: block; }
html.dark .dark-toggle-moon { display: none; }

html.dark .dark-toggle-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #93b8d4;
}

html.dark .dark-toggle-btn:hover {
    background: rgba(77, 127, 168, 0.18);
    border-color: #4d7fa8;
    color: #b8d4ea;
}

/* ── Dark Mode ───────────────────────────────────────────────────────── */

html.dark {
    color-scheme: dark;
}

html.dark,
html.dark body,
html.dark div.min-h-screen.bg-gray-50 {
    background-color: #0e1a26 !important;
    color: #d8e6f0;
}

html.dark .page-bg {
    background: linear-gradient(160deg, #0e1a26 0%, #112233 60%, #0d1e2e 100%);
}


html.dark .app-footer {
    background: linear-gradient(to right, #0e1a26, #111e2b, #0e1a26);
    border-top-color: rgba(77, 127, 168, 0.35);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35), 0 -1px 3px rgba(0, 0, 0, 0.15);
}

html.dark .app-footer-left,
html.dark .app-footer-right {
    color: #5a7a90;
}

html.dark .app-footer-sep {
    color: #2a3f52;
}

html.dark .app-footer-version {
    color: #5b9fc0;
}

html.dark .app-footer-link {
    color: #5b9fc0;
}

html.dark .app-footer-link:hover {
    color: #82c4e0;
}

html.dark .filter-card {
    background: #162132;
    border-top-color: #4d7fa8;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

html.dark .filter-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.dark .filter-card-title {
    color: #82b4d3;
}

html.dark .filter-heading-icon {
    color: #4d7fa8;
}

html.dark .filter-label {
    color: #6a8aaa;
}

html.dark .filter-control {
    background: #1a2c3e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #d8e6f0;
}

html.dark .filter-control:hover:not(:focus) {
    border-color: rgba(77, 127, 168, 0.28);
    background: #1d2f42;
}

html.dark input.filter-control:not(:placeholder-shown):not(:focus) {
    background: #1c3248;
    border-color: rgba(77, 127, 168, 0.45);
}

html.dark .filter-control:focus {
    background: #1e3248 !important;
    border-color: #4d7fa8 !important;
    box-shadow: 0 0 0 3px rgba(77, 127, 168, 0.18) !important;
}

html.dark .filter-control::placeholder {
    color: #3e566a;
}

html.dark .flatpickr-calendar {
    background: #162132 !important;
    border-color: rgba(77, 127, 168, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    color-scheme: dark;
}

html.dark .flatpickr-months .flatpickr-month {
    background: #1e4060 !important;
}

html.dark .flatpickr-current-month .flatpickr-monthDropdown-months,
html.dark .flatpickr-year-select {
    color-scheme: dark;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

html.dark .flatpickr-weekdays {
    background: #1a2d40 !important;
}

html.dark span.flatpickr-weekday {
    background: #1a2d40 !important;
    color: #7fb3d3 !important;
}

html.dark .flatpickr-days {
    border-color: rgba(77, 127, 168, 0.15) !important;
}

html.dark .dayContainer {
    background: #162132 !important;
}

html.dark .flatpickr-day {
    color: #c8dcea !important;
}

html.dark .flatpickr-day:hover,
html.dark .flatpickr-day:focus {
    background: #1e3a55 !important;
    border-color: #1e3a55 !important;
}

html.dark .flatpickr-day.today {
    border-color: #4d7fa8 !important;
}

html.dark .flatpickr-day.today:hover {
    background: #4d7fa8 !important;
    border-color: #4d7fa8 !important;
    color: #fff !important;
}

html.dark .flatpickr-day.selected,
html.dark .flatpickr-day.selected:hover {
    background: #4d7fa8 !important;
    border-color: #4d7fa8 !important;
    color: #fff !important;
}

html.dark .flatpickr-day.prevMonthDay,
html.dark .flatpickr-day.nextMonthDay {
    color: #3a5570 !important;
}

html.dark .flatpickr-day.flatpickr-disabled {
    color: #2a3f52 !important;
}

html.dark .flatpickr-clear-btn {
    border-color: rgba(77, 127, 168, 0.3);
    color: #6a8aaa;
    background: rgba(77, 127, 168, 0.05);
}

html.dark .flatpickr-clear-btn:hover {
    background: rgba(77, 127, 168, 0.12);
    border-color: #4d7fa8;
    color: #93b8d4;
}

html.dark .valid-control-class {
    background-color: #1a2c3e !important;
    border-color: rgba(77, 127, 168, 0.35) !important;
}

html.dark .filter-actions-row {
    border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark .btn-primary {
    background: #176B87;
    border-color: #176B87;
}

html.dark .btn-primary:hover {
    background: #125a74;
    border-color: #125a74;
}

html.dark .btn-secondary {
    color: #82b4d3;
    border-color: rgba(77, 127, 168, 0.4);
    background: rgba(77, 127, 168, 0.08);
}

html.dark .btn-secondary:hover {
    color: #a8cfe8;
    border-color: rgba(77, 127, 168, 0.65);
    background: rgba(77, 127, 168, 0.15);
}

html.dark .rnn-subtle-link {
    background: rgba(77, 127, 168, 0.1);
    color: #82b4d3;
    border-color: rgba(77, 127, 168, 0.18);
}

html.dark .rnn-subtle-link:hover {
    background: rgba(77, 127, 168, 0.2);
    color: #a8cfe8;
}

html.dark .list-bar {
    background: #1e4060;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

html.dark .list-status-strip {
    background: #162132;
    border-left-color: #4d7fa8;
    border-right-color: rgba(255, 255, 255, 0.07);
}

html.dark .label-green {
    background: rgba(52, 211, 153, 0.18);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.4);
}

html.dark .label-red {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.4);
}

html.dark .citation-list {
    border-color: rgba(255, 255, 255, 0.07);
}

html.dark .citation-card {
    background: #1d3045;
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.dark .citation-card:hover {
    background: #243a54;
    border-left-color: #4d7fa8;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28),
                0 1px 4px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
    position: relative;
    z-index: 1;
}

html.dark .citation-card-body {
    color: #ccdde8;
}

/* Brighten inline-colored text (red, etc.) from th:utext content */
html.dark .citation-card-body [style] {
    filter: brightness(1.75) saturate(1.15);
}

html.dark .citation-empty {
    background: #162132;
    border-color: rgba(255, 255, 255, 0.07);
}

html.dark .citation-empty-text {
    color: #6a8aaa;
}

html.dark .citation-empty-icon {
    color: #2a4a64;
}

html.dark .scroll-up-btn {
    background: #1e4060;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html.dark .scroll-up-btn:hover {
    background: #2a5070;
}

html.dark * {
    scrollbar-color: rgba(77, 127, 168, 0.35) transparent;
}

html.dark *::-webkit-scrollbar-thumb {
    background: rgba(77, 127, 168, 0.35);
}

html.dark *::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 127, 168, 0.55);
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-card {
        padding: 1.1rem 1rem 0.9rem;
    }

    .citatie-layout {
        padding: 0.75rem 0.5rem 3.5rem;
    }

    .filter-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions-buttons {
        width: 100%;
    }

    .list-bar {
        border-radius: 8px 8px 0 0;
        padding: 0.5rem 1rem;
    }

    .list-status-strip {
        padding: 0.4rem 1rem;
    }

    .list-bar-title {
        font-size: 1.05rem;
    }

    .citation-card {
        padding: 0.85rem 1rem 0.6rem;
    }

    .scroll-up-btn {
        bottom: 3.5rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 520px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-card {
        padding: 1rem 0.85rem 0.85rem;
        border-radius: 10px;
    }

    .filter-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-actions-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .filter-actions-buttons .btn-primary,
    .filter-actions-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .rnn-subtle-link {
        width: 100%;
        justify-content: center;
    }

    .list-bar {
        padding: 0.5rem 0.85rem;
    }

    .list-status-strip {
        padding: 0.4rem 0.85rem;
    }

    .list-bar-left {
        gap: 0.5rem;
    }

    .list-bar-title {
        font-size: 1rem;
        white-space: normal;
    }

    .citation-card {
        padding: 0.75rem 0.85rem 0.55rem;
    }

    .citation-card-body {
        font-size: 0.875rem;
    }

    .scroll-up-btn {
        bottom: 3.5rem;
        right: 0.75rem;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 400px) {
    .flatpickr-calendar {
        width: calc(100vw - 1.5rem) !important;
        left: 0.75rem !important;
    }

    .flatpickr-day {
        max-width: 100% !important;
    }

    .filter-card-title {
        font-size: 1rem;
    }
}

