/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-default: #e0e0e0;
    --gradient-start: #0b4a7d;
    --gradient-end: #12680c;
    --card-bg: #ffffff;
    --hover-bg: #f0f4f8;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    
    /* Enhanced date picker variables */
    --date-picker-bg: linear-gradient(145deg, #ffffff, #f8f9fa);
    --date-picker-border: #e0e0e0;
    --date-picker-border-hover: var(--gradient-start);
    --date-picker-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --date-picker-shadow-hover: 0 8px 25px rgba(30, 58, 138, 0.15), 0 4px 10px rgba(0,0,0,0.1);
    --date-picker-shadow-focus: 0 0 0 4px rgba(30, 58, 138, 0.15), 0 8px 25px rgba(30, 58, 138, 0.2);
    
    /* Animation variables */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

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

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-light);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-text-fill-color: var(--text-primary);
}

h1:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease, -webkit-text-fill-color 0s;
}
h1:not(:hover) {
    -webkit-text-fill-color: var(--text-primary);
    background-clip: initial;
    transition: all 0.3s ease, -webkit-text-fill-color 0s;
}

.main-nav {
    display: flex;
    gap: 2rem;
    margin-top: 0;
    align-items: left;
}

.nav-tab {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    -webkit-text-fill-color: var(--text-primary);
    font-weight: 500;
}


.nav-tab:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease, -webkit-text-fill-color 0s;
}

.nav-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    background: linear-gradient(var(--card-bg), var(--card-bg)), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 2px solid transparent;
}
.nav-tab:not(.active):not(:hover) {
    -webkit-text-fill-color: var(--text-secondary);
    background-clip: initial;
    transition: all 0.3s ease, -webkit-text-fill-color 0s;
}
.nav-tab.active:hover {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: linear-gradient(var(--card-bg), var(--card-bg)), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}


.nav-tab-dropdown .dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 12px; /* Fixed width to prevent layout shift */
    text-align: center;
}

/* Remove the transform that causes movement */
.nav-tab-dropdown .nav-tab:hover .dropdown-arrow,
.nav-tab-dropdown .nav-dropdown-menu.show ~ .nav-tab .dropdown-arrow {
    transform: rotate(180deg);
}

/* Ensure the nav container has stable width */
.main-nav {
    display: flex;
    gap: 2rem;
    margin-top: 0;
    align-items: center; /* Changed from left to center */
    width: auto; /* Ensure it doesn't force width changes */
}

/* Make sure dropdown doesn't affect parent width */
.nav-tab-dropdown {
    position: relative;
    display: inline-block;
    white-space: nowrap; /* Prevent text wrapping that could cause shifts */
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg); /* White background */
    border: 2px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}
.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item:hover {
    background: #f5f5f5;
    color: #333333;
}

.nav-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.nav-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.header-separator {
    height: 1px;
    background-color: var(--border-default);
}

/* Main Content */
main {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    padding-top: 2rem; /* Added padding here */
    padding-bottom: 2rem; /* Added padding here */
}

.mobile-nav-container {
    display: none;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: var(--hover-bg);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-line:not(:last-child) {
    margin-bottom: 4px;
}

/* Hamburger Animation */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 6rem 0 2rem 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateX(0);
}

/* Mobile Navigation Items */
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.mobile-nav-item:hover {
    background: var(--hover-bg);
    border-left-color: var(--gradient-start);
}

.mobile-nav-item.active {
    background: linear-gradient(90deg, rgba(11, 74, 125, 0.1), transparent);
    border-left-color: var(--gradient-start);
    color: var(--gradient-start);
    font-weight: 600;
}

.mobile-nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-nav-text {
    flex: 1;
    text-align: left;
}

/* Mobile Navigation Group (for Documents submenu) */
.mobile-nav-group {
    border-left: 4px solid transparent;
}

.mobile-nav-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav-group:hover .mobile-nav-group-header {
    background: var(--hover-bg);
}

.mobile-nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.mobile-nav-group.expanded .mobile-nav-arrow {
    transform: rotate(180deg);
}

.mobile-nav-submenu {
    max-height: 0;
    overflow: hidden;
    background: var(--hover-bg);
    transition: max-height 0.3s ease;
}

.mobile-nav-group.expanded .mobile-nav-submenu {
    max-height: 200px;
}

.mobile-nav-subitem {
    display: block;
    width: 100%;
    padding: 0.75rem 3rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.mobile-nav-subitem:hover {
    background: rgba(11, 74, 125, 0.1);
    color: var(--gradient-start);
}

.mobile-nav-subitem.active {
    color: var(--gradient-start);
    font-weight: 600;
}

/* Mobile User Section Styles */
.mobile-user-section {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(11, 74, 125, 0.05), rgba(18, 104, 12, 0.05));
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 1rem;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-default);
}

.mobile-user-icon {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    color: white;
}

.mobile-user-text {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-user-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.mobile-user-action:hover {
    background: var(--hover-bg);
    border-color: var(--gradient-start);
    color: var(--gradient-start);
}

.mobile-user-action:last-child {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.mobile-user-action:last-child:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
}

.mobile-nav-separator {
    height: 1px;
    background: var(--border-default);
    margin: 0 1.5rem 1rem 1.5rem;
}

/* Make desktop user menu hidden on mobile */
.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    /* Hide desktop navigation and user menu */
    .desktop-nav,
    .desktop-only {
        display: none;
    }
    
    /* Show mobile navigation */
    .mobile-nav-container {
        display: block;
    }
    
    /* Adjust header layout for mobile - hamburger replaces user menu position */
    .header-main {
        justify-content: space-between;
        flex-direction: row; /* Ensure it stays horizontal */
        align-items: center; /* Keep vertical alignment */
    }
    
    /* Adjust mobile nav width for user section */
    .mobile-nav {
        width: 320px;
        padding-top: 4rem;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        width: 100%;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.4rem;
    }
}

/* Ensure body doesn't scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}


/* Overview Tab */
.overview-container {
    max-width: 1300px;
    margin: 0 auto;
}

.intro-section {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    /* Replaced box-shadow with a border for a cleaner, more consistent look */
    border: 1px solid var(--border-default);
}

.intro-section h2 {
    margin-bottom: 0.2rem;
    color: var(--gradient-start);
}



.info-list {
    list-style-position: inside;
    margin: 1rem 0;
}

.info-list li {
    margin: 0.5rem 0;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    gap: 0.15rem;
}

/* Card Styles */
.document-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
    cursor: pointer;
}

.document-card:hover {
    border-color: transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-medium);
}

.document-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.document-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.institution-highlight {
    color: var(--gradient-start);
    font-weight: 500;
}

.document-summary {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.more-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.more-button:hover {
    opacity: 0.9;
}

.about-section {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-default);
    text-align: center;
}


/* Stakeholders Tab */
.stakeholders-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    height: calc(100vh - 200px);
}

.stakeholders-sidebar {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--border-default); /* Added for consistency */
}

.search-filter-container {
    margin-bottom: 1rem;
}

.search-bar {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-default);
    border-radius: 20px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border: 2px solid transparent;
    background: linear-gradient(white, white), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.filter-dropdown {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid var(--border-default);
    border-radius: 20px;
    background-color: white;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.person-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.person-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.person-item:hover {
    background-color: var(--hover-bg);
    border-color: var(--gradient-start);
}

.person-item.active {
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.person-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
}

.person-info {
    flex: 1;
}

.person-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.person-party {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 15px;
    color: white;
    opacity: 0.9;
}


.person-party.party-kok { background-color: #006288; color: white; }
.person-party.party-sdp { background-color: #ff5a5a; color: white; }
.person-party.party-ps { background-color: #6fb4fc; color: var(--text-primary); }
.person-party.party-kesk { background-color: #099327; color: white; }
.person-party.party-vihr { background-color: #8fce29; color: var(--text-primary); }
.person-party.party-vas { background-color: #e22a73; color: white; }
.person-party.party-rkp { background-color: #ffdc5d; color: var(--text-primary); }
.person-party.party-kd { background-color: #923de8; color: white; }
.person-party.party-liike { background-color: #cf83c8; color: white; }
.person-party.party- { background-color: rgb(125, 123, 121); color: white; }
.person-party.party-tv { background-color: #7A7A7A; color: white; }
.person-party.party-eduskuntaryhmä.timo.vornanen { background-color: #7A7A7A; color: white; }



/* Person Details */
.person-details-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    overflow-y: auto;
    border: 1px solid var(--border-default);
}

.person-profile {
    display: flex;
    gap: 2rem;
    margin-bottom: 0rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-default);
}
.profile-summary {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.profile-summary .summary-headline {
    font-weight: bold;
    color: #333;
    display: block;
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
}

.profile-summary .summary-headline:first-child {
    margin-top: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    object-position: center 20%;
    flex-shrink: 0;
    box-shadow: var(--shadow-medium);
    border: 4px solid white;
}

.profile-info h2 {
    margin-bottom: 0.75rem;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-info p {
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 400;
}
.profile-info .person-party {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Profile info layout with assistant data on the right */
.profile-info-row {
    display: flex;
    justify-content: space-between;
    gap: 20rem;
    align-items: flex-start;
}

.profile-info-left {
    flex: 1;
    max-width: 55%;
}

.profile-info-right {
    flex: 0 0 auto;
    min-width: 220px;
    max-width: 250px;
    padding: 0.75rem 1rem;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 6px;
    border: 2px solid transparent;
    background-image: linear-gradient(145deg, #ffffff, #f8f9fa), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 4rem;
    margin-left: auto;
}

.profile-info-right h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-info-right p {
    margin: 0.3rem 0;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.profile-info-right strong {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .profile-info-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-info-left {
        max-width: 100%;
    }
    
    .profile-info-right {
        min-width: unset;
        width: 100%;
        margin-top: 1rem;
        margin-left: 0;
    }
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--gradient-start);
}

.info-section {
    margin-bottom: 1.5rem;
}

.collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.collapsible.expanded::before {
    transform: rotate(90deg);
}

.collapsible-content {
    display: none;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.collapsible-content.show {
    display: block;
}



.speech-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.speech-content {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

.speech-content.show {
    display: block;
}

.info-section .filters-row {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.info-section .filters-row > div {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Make speeches filters smaller while keeping the same style */
.info-section .filter-select {
    min-width: 160px !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
    transform: none !important;
    border-radius: 12px !important;
}

.info-section .filter-select:hover {
    transform: translateY(-1px) !important;
}

.info-section .filter-select:focus {
    transform: translateY(-1px) scale(1.01) !important;
}

.info-section .filter-apply-button {
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
    border-radius: 12px !important;
    letter-spacing: 0.5px !important;
    transform: none !important;
}

.info-section .filter-apply-button:hover {
    transform: translateY(-2px) !important;
}

.info-section .filter-apply-button:active {
    transform: translateY(0px) !important;
}

.info-section .load-more-btn {
    margin: 1rem auto 0 !important;
    padding: 0.6rem 1.5rem !important;
    font-size: 0.85rem !important;
    border-radius: 16px !important;
}




/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 2px;
    margin: 10px 0;
}

/* Enhanced Profile Tabs with larger, bolder text and correct gradient */
.profile-tab-button {
    flex: 1;
    padding: 5px 20px; /* Increased padding */
    background: white;
    border: 2px solid var(--border-default);
    border-radius: 8px 8px 8px 8px;
    font-weight: 600; /* Much bolder */
    font-size: 1.0rem; /* Larger text */
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.profile-tab-button.active {
    color: var(--text-primary);
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) border-box;
    border: 2px solid transparent;
}

.profile-tab-button:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--gradient-start);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Signed Documents Filters */
.signed-docs-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.signed-docs-filter-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid var(--border-default); /* Use CSS variable instead of hard-coded */
    border-radius: 8px;
    color: var(--text-primary); /* Use primary text color instead of grey */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600; /* Increased for better visibility */
    font-size: 0.85rem;
}

.signed-docs-filter-btn.active {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) border-box;
    border: 2px solid transparent;
    color: var(--text-primary);
    font-weight: 700; /* Slightly bolder when active */
}

.signed-docs-filter-btn:hover:not(.active) {
    background: var(--hover-bg);
    border-color: var(--gradient-start);
    color: var(--text-primary);
}

/* Signed Documents List */
#signed-documents-list,
#speeches-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem; /* Add space between items */
}

.signed-document-item,
.speech-item {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
    cursor: pointer;
}

.signed-document-item:hover,
.speech-item:hover {
    border-color: transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-medium);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.document-number {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.document-date {
    color: #888;
    font-size: 0.9em;
}

.signed-document-item .document-title,
.speech-header .speech-title {
    font-size: 1rem; /* Unified font size */
    font-weight: 400; /* Unified font weight */
    color: var(--text-primary);
}
.speech-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0.75rem;
    border-radius: 4px;
    position: relative;
}

.speech-header:hover {
    background-color: #f5f5f5;
}

.speech-header::after {
    content: "▼";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    color: var(--gradient-end);
    font-size: 0.8em;
}

.pdf-section {
    border: none;
    background: transparent;
    margin: 0.75rem 0;
    padding: 0;
    text-align: left;
}

.pdf-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-fast);
    box-shadow: none;
}

.pdf-button:hover {
    background: linear-gradient(var(--card-bg), var(--card-bg)), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 1px solid transparent;
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.pdf-icon {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.pdf-button:hover .pdf-icon {
    opacity: 1;
}

@media (max-width: 768px) {
    .pdf-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .pdf-icon {
        font-size: 0.85rem;
    }
}

/* When content is expanded, rotate the arrow */
.speech-content.show + .speech-header::after {
    transform: translateY(-50%) rotate(180deg);
}

.signed-document-item .document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem; /* Space for items and lines */
    font-size: 0.85rem;
    color: var(--text-secondary);
    align-items: center;
}

.signed-document-item .document-meta > span:not(:last-child)::after {
    content: '|';
    margin-left: 0.75rem;
    color: var(--border-default);
}
.document-type {
    text-transform: capitalize;
}

.document-role {
    font-weight: 500;
}

.document-role.primary {
    color: var(--gradient-end);
}

.document-role.co-signee {
    color: #1e1592;
}

/* Section separator */
.section-separator {
    border: none;
    height: 1px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    margin: 20px 0;
}

/* Document Lists */
.documents-container {
    max-width: 1800px;
    margin: 0 auto;
}

/* New Filter Styles - Compact Horizontal Layout */
.documents-filters-container {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filters-row {
    display: flex;
    gap: 1rem; /* Reduced gap slightly for more space */
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap; 
}

/* Add this to your styles.css file */
.search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.search-row .search-bar {
    flex: 1;
    max-width: 1200px; /* Add this line to limit the width */
    height: 40px;
    padding: 0.65rem 1rem;
    border: 2px solid var(--date-picker-border);
    border-radius: 16px;
    background: var(--date-picker-bg);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    box-shadow: var(--date-picker-shadow);
    backdrop-filter: blur(10px);
}

.search-row .search-bar:focus {
    outline: none;
    border: 2px solid transparent;
    background: linear-gradient(white, white), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.search-row .filter-apply-button {
    min-width: 80px;
    height: 40px;
    white-space: nowrap;
}

/* Ensure all filter-apply-button elements have consistent sizing */
.filter-apply-button {
    height: 40px;
    padding: 0.75rem 2rem; /* Keep existing padding */
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Contact buttons - specific styling separate from filter buttons */
.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.contact-buttons .filter-apply-button {
    /* Override the mobile responsive styles for contact buttons */
    width: auto !important;
    padding: 0.75rem 2rem !important;
    font-size: 0.95rem !important;
    min-width: auto !important;
}

/* DATE RANGE for Flatpickr */
.flatpickr-calendar {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-medium);
    font-family: inherit;
    width: auto;
}

.flatpickr-months .flatpickr-month {
    color: var(--text-primary);
    fill: var(--text-primary);
    height: 40px;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background-color: var(--hover-bg);
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
}

.flatpickr-current-month .numInputWrapper {
    font-weight: 600;
}

.flatpickr-weekdays {
    background: transparent;
}

span.flatpickr-weekday {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.flatpickr-day {
    color: var(--text-primary);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.flatpickr-day:hover {
    background: var(--hover-bg);
    border-color: var(--hover-bg);
}

.flatpickr-day.today {
    border-color: var(--gradient-start);
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange {
    background: var(--gradient-start);
    border-color: var(--gradient-start);
    color: white;
    box-shadow: none;
}

.flatpickr-day.inRange {
    background: rgba(30, 58, 138, 0.1);
    border-color: transparent;
    box-shadow: -5px 0 0 rgba(30, 58, 138, 0.1), 5px 0 0 rgba(30, 58, 138, 0.1);
    color: var(--text-primary);
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    background: none;
    color: var(--text-secondary);
    opacity: 0.4;
}


/* Enhanced Filter Styles */
.filter-select {
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    border: 2px solid var(--date-picker-border);
    border-radius: 16px;
    background: var(--date-picker-bg);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    flex: 0 1 auto;   /* flex change */ 
    min-width: 180px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%231e3a8a' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    transition: var(--transition-smooth);
    box-shadow: var(--date-picker-shadow);
    backdrop-filter: blur(10px);
}

.filter-select:hover {
    border-color: var(--date-picker-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--date-picker-shadow-hover);
}

.filter-select:focus {
    outline: none;
    border: 2px solid transparent;
    background: var(--date-picker-bg), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end)),
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-origin: border-box;
    background-clip: padding-box, border-box, padding-box;
    background-position: center, center, right 1.25rem center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    box-shadow: var(--date-picker-shadow-focus);
    color: var(--text-primary);
    transform: translateY(-2px) scale(1.02);
}

.filter-apply-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3), 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    align-self: center;
    position: relative;
    overflow: hidden;
}

.filter-apply-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.filter-apply-button:hover::before {
    left: 100%;
}

.filter-apply-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.4), 0 6px 15px rgba(0,0,0,0.15);
}

.filter-apply-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3), 0 3px 8px rgba(0,0,0,0.1);
}



.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background-color: var(--border-default);
    border-radius: 8px;
    overflow: hidden;
}

.document-list-item {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
    cursor: pointer;
}

.document-list-item:hover {
    border-color: transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-medium);
}

.load-more-btn {
    margin: 2rem auto;
    display: block;
    background: none;
    border: 2px solid var(--gradient-start);
    color: var(--gradient-start);
    padding: 0.75rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-color: transparent;
}

.password-requirements {
    background: #f6f6f6; /* soft grey background */
    border-left: 4px solid #222; /* black accent */
    color: #222; /* dark text */
    padding: 10px 12px;
    margin: 8px 0 12px 0;
    border-radius: 4px;
    font-size: 0.95rem;
}
.password-requirements .requirements-title {
    margin: 0 0 6px 0;
    font-weight: 600;
}
.password-requirements ul {
    margin: 0;
    padding-left: 18px;
}
.password-requirements li {
    margin: 4px 0;
    color: #333;
    line-height: 1.3;
}

/* User Menu Styles */
.user-menu {
    position: relative;
    margin-left: 2em;
}

.user-menu-button {
    background: linear-gradient(var(--card-bg), var(--card-bg)), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.user-menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.15), 0 4px 10px rgba(0,0,0,0.1);
}

.user-icon {
    font-size: 1.2rem;
    color: var(--gradient-start);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--border-default);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--card-bg);
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.1));
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px;
}

.user-menu-item:first-child {
    margin-top: 8px;
}

.user-menu-item:last-child {
    margin-bottom: 8px;
}

.user-menu-item:hover {
    background: linear-gradient(135deg, rgba(11, 74, 125, 0.1), rgba(18, 104, 12, 0.1));
    color: var(--gradient-start);
}

.menu-icon {
    font-size: 1rem;
    opacity: 0.8;
}


/* Enhanced Quickview Overview Styles with Collapsible Functionality */
.quickview-section {
    margin: 1rem 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.quickview-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.quickview-title:hover {
    color: var(--gradient-start);
}

.quickview-party-group {
    margin: 0.5rem 0 1rem 0;
}
 
.quickview-party-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #34495e;
    padding-left: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.quickview-party-title:hover {
    color: var(--gradient-start);
}

.quickview-title .collapse-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--gradient-start);
    font-weight: bold;
}

.quickview-party-title .collapse-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--gradient-start);
    font-weight: bold;
}

.quickview-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.quickview-items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-left: 2rem;
    transition: all 0.3s ease;
}

.quickview-item {
    padding: 0.25rem 0;
    border: none;
    border-radius: 0;
    cursor: default;
    transition: none;
    background: transparent;
}

.quickview-item:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.quickview-item-content {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.quickview-date {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 400;
    min-width: 55px;
    flex-shrink: 0;
}

.quickview-title-text {
    flex: 1;
    font-weight: 400;
    color: #2c3e50;
    line-height: 1.2;
    font-size: 0.85rem;
}

.quickview-party {
    font-size: 0.75rem;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-weight: 500;
    color: white;
    flex-shrink: 0;
    display: inline-block;
}

/* Party colors for quickview (matching your existing party color scheme) */
.quickview-party.party-kok { background-color: #006288; color: white; }
.quickview-party.party-ps { background-color: #ffde00; color: #000; }
.quickview-party.party-sdp { background-color: #ff5a5a; color: white; }
.quickview-party.party-kesk { background-color: #099327; color: white; }
.quickview-party.party-vihr { background-color: #8fce29; color: #000; }
.quickview-party.party-vas { background-color: #e22a73; color: white; }
.quickview-party.party-rkp { background-color: #ffdc5d; color: #000; }
.quickview-party.party-kd { background-color: #923de8; color: white; }
.quickview-party.party-liik { background-color: #cf83c8; color: white; }
.quickview-party.institution-eduskunta { background-color: #7A7A7A; color: white; }

/* Add colors for government institutions */
.quickview-party.institution-tasavallan-presidentti { background-color: #2c3e50; color: white; }
.quickview-party.institution-valtioneuvosto { background-color: #34495e; color: white; }
/* Fallback for any institution without specific styling */
.quickview-party.institution { background-color: #7f8c8d; color: white; }

/* Current Stage Inline Display - Balanced Visibility */
.current-stage-inline {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-top: 0.75rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, rgba(11, 74, 125, 0.08), rgba(18, 104, 12, 0.06));
    border-left: 3px solid var(--gradient-start);
    border-radius: 4px;
}

.current-stage-inline strong {
    color: var(--gradient-start);
    font-weight: 600;
}

.quickview-hoo {
    font-size: 1.2rem; /* Reduced from 1.5rem */
    font-weight: 600;
    margin-bottom: 0.75rem; /* Reduced from 1rem */
    color: var(--gradient-start);
}

/* Responsive design for compact quickview */
@media (max-width: 768px) {
    .quickview-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem; /* Reduced from 0.25rem */
    }
    
    .quickview-date {
        min-width: auto;
        font-size: 0.75rem; /* Reduced from 0.8rem */
    }
    
    .quickview-items {
        margin-left: 0.75rem; /* Reduced from 1rem */
    }
    
    .quickview-party-title {
        padding-left: 0.25rem; /* Reduced from 0.5rem */
    }
    
    .quickview-title {
        font-size: 1rem; /* Reduced for mobile */
    }
    
    .quickview-party-title {
        font-size: 0.85rem; /* Reduced for mobile */
    }
}

/* Loading state for quickview */
#quickview-section .loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Compact Weekly Calendar Layout for Upcoming Meetings */
.upcoming-meetings-section {
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-default);
}

.upcoming-meetings-section h3 {
    margin: 0 0 0.75rem 0;
    color: var(--gradient-start);
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-default);
}

/* Weekly grid - 5 columns for Mon-Fri */
.meetings-week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    min-height: 120px;
}

/* Individual day column - compact by default, larger if has meetings */
.week-day-column {
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    min-height: 60px;
}

.week-day-column.has-meetings {
    min-height: 120px;
}

.week-day-column.today {
    background: linear-gradient(145deg, rgba(11, 74, 125, 0.02), rgba(18, 104, 12, 0.02));
    border: 1px solid rgba(11, 74, 125, 0.1);
}

/* Day header - horizontal layout for day name and number */
.day-header-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 0.35rem;
    border-radius: 4px;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.today .day-header-compact {
    background: linear-gradient(135deg, rgba(11, 74, 125, 0.1), rgba(18, 104, 12, 0.1));
}

.today .day-number {
    color: var(--gradient-start);
}

/* Meetings container for each day */
.day-meetings {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.25rem;
}

/* Individual meeting item - very compact like quickview */
.meeting-item-compact {
    padding: 0.3rem 0.4rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.2s ease;
    cursor: default;
}

.meeting-item-compact:hover {
    background: var(--hover-bg);
    border-color: rgba(11, 74, 125, 0.1);
}

/* Time display - monospace like quickview date */
.meeting-time-compact {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

/* Committee name - main text like quickview title */
.meeting-committee-compact {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* No meetings message - minimal */
.no-meetings-compact {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.5rem 0.25rem;
    opacity: 0.5;
}

/* Make empty days even more compact */
.week-day-column.no-meetings .day-header-compact {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.15rem;
}

.week-day-column.no-meetings .day-meetings {
    padding: 0;
}

/* Loading and error states */
.no-meetings-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1.5rem;
    grid-column: 1 / -1;
    background: transparent;
    border: 1px dashed var(--border-default);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .meetings-week-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .upcoming-meetings-section {
        padding: 0.75rem;
    }
    
    .day-header-compact {
        padding: 0.3rem 0.4rem;
        gap: 0.25rem;
    }
    
    .day-name {
        font-size: 0.7rem;
    }
    
    .day-number {
        font-size: 0.85rem;
    }
    
    .meeting-committee-compact {
        font-size: 0.7rem;
    }
    
    .meeting-time-compact {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .meetings-week-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .day-header-compact {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.25rem;
    }
    
    .day-name {
        font-size: 0.65rem;
    }
    
    .day-number {
        font-size: 0.8rem;
    }
}

/* Change Password Modal Styles */
.change-password-modal {
    max-width: 500px;
    padding: 2.5rem;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.change-password-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-default);
    border-radius: 12px;
    background: var(--card-bg);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border: 2px solid transparent;
    background: var(--card-bg), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3), 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-default);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--gradient-start);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments for user menu */
@media (max-width: 768px) {
    .user-menu-dropdown {
        right: -10px;
        min-width: 180px;
    }
    
    .change-password-modal {
        padding: 1.5rem;
        margin: 10% auto;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.modal-header h2 {
    margin-bottom: 0.5rem;
}

.modal-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-section {
    margin: 1.5rem 0;
}

.modal-section h3 {
    color: var(--gradient-start);
    margin-bottom: 0.75rem;
}

.keyword-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 0.25rem;
}

.stage-item {
    background-color: var(--hover-bg);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.voting-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.vote-item {
    text-align: center;
    padding: 1rem;
    border-radius: 4px;
}

.vote-item.yes { background-color: #d4edda; color: #155724; }
.vote-item.no { background-color: #f8d7da; color: #721c24; }
.vote-item.empty { background-color: #e2e3e5; color: #383d41; }
.vote-item.absent { background-color: #fff3cd; color: #856404; }

.vote-count {
    font-size: 2rem;
    font-weight: bold;
}

.vote-label {
    font-size: 0.9rem;
}

/* Simplified hanke styling */
.hanke-status {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.hanke-tunnus {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gradient-start);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.stage-item {
    background-color: var(--hover-bg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border-left: 4px solid var(--gradient-start);
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stage-achieved {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stage-pending {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.person-item-detail {
    background-color: var(--card-bg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
}

.person-name-role {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.person-role {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.person-dates {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.document-item-detail {
    background-color: var(--card-bg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
}

.document-item-detail:hover {
    border-color: var(--gradient-start);
    box-shadow: var(--shadow-light);
}

.document-link {
    color: var(--gradient-start);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.document-link:hover {
    text-decoration: underline;
}

.document-meta-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.doc-type {
    background-color: var(--hover-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.doc-author, .doc-date {
    font-size: 0.85rem;
}

.hanke-keywords-modal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.keyword-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.link-item {
    margin-bottom: 0.75rem;
}

.link-item .more-button {
    display: inline-block;
    margin: 0;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.select-prompt {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}
@media (max-width: 1200px) {
    .filters-row {
        flex-wrap: wrap;
        gap: 1.25rem;
    }

    .filter-select {
        min-width: 180px;
    }
}

/* Responsive adjustments for modal content */
@media (max-width: 768px) {
    .person-name-role {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .person-dates {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .document-meta-detail {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stakeholders-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .stakeholders-sidebar {
        max-height: 300px;
    }
    
    .documents-filters-container {
        padding: 1.5rem;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
        width: 100%;
        padding: 1rem 3rem 1rem 1.25rem;
    }
    
    .filter-apply-button {
        width: 100%;
        padding: 1rem 2.5rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Quick mobile fixes for index page */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .header-main {
        gap: 1rem;
    }
    
    .header-left {
        gap: 0.75rem;
    }
    
    .header-left img.logo {
        height: 50px !important;
    }
    
    .header-left h1 {
        font-size: 1.3rem !important;
    }
    
    .header-left h2 {
        font-size: 0.9rem !important;
    }
    
    .main-nav .filter-apply-button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-nav {
        align-self: flex-end;
    }
}

/* Unified Documents Styles */
.primary-filters {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.primary-filters .search-row {
    margin-bottom: 1rem;
}

.primary-filters .filters-row {
    gap: 1rem;
}

.filter-clear-button {
    background-color: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid var(--border-default);
    padding: 0.65rem 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.filter-clear-button:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--date-picker-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--date-picker-shadow-hover);
}

/* Active Filters */
/* Active filters inline display */
.active-filters-container {
    margin-top: 0.75rem;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    border-left: none;
}

.active-filters-label {
    display: none; /* Hide the label for cleaner inline display */
}

.filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) transparent;
}

.filter-chips::-webkit-scrollbar {
    height: 4px;
}

.filter-chips::-webkit-scrollbar-track {
    background: transparent;
}

.filter-chips::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 2px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    background-color: var(--gradient-start);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-chip .remove-chip {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    transition: transform 0.2s ease;
}

.filter-chip .remove-chip:hover {
    transform: scale(1.2);
}

.filter-chip .remove-chip:hover {
    opacity: 0.7;
}

/* Secondary Filters */
/* Filter Icon Button - Compact secondary filters toggle */
.filter-icon-button {
    padding: 0.65rem;
    background: var(--date-picker-bg);
    border: 2px solid var(--date-picker-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: var(--date-picker-shadow);
}

.filter-icon-button svg {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.filter-icon-button:hover {
    border-color: var(--date-picker-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--date-picker-shadow-hover);
}

.filter-icon-button.active {
    border: 2px solid transparent;
    background: linear-gradient(white, white), 
                linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.filter-icon-button.active svg {
    color: var(--primary-color);
}

.secondary-filters {
    position: relative;
}

.secondary-filters-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-bg);
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 400px;
    max-width: 500px;
}

.secondary-filters-content.expanded {
    display: block;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Multi-select Styles */
.multi-select-container {
    position: relative;
}

.multi-select {
    position: relative;
    width: 100%;
}

.multi-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border: 1px solid var(--border-default);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multi-select-header:hover {
    border-color: var(--gradient-start);
}

.multi-select.active .multi-select-header {
    border-color: var(--gradient-start);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.multi-select-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.multi-select-placeholder.has-selection {
    color: var(--text-primary);
}

.multi-select-arrow {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.multi-select.active .multi-select-arrow {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--gradient-start);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
}

.multi-select.active .multi-select-dropdown {
    display: block;
}

.multi-select-actions {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    gap: 0.5rem;
}

.select-all-btn, .clear-all-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-all-btn {
    background-color: var(--gradient-start);
    color: white;
    border: none;
}

.select-all-btn:hover {
    background-color: var(--gradient-end);
}

.clear-all-btn {
    background-color: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.clear-all-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.multi-select-options {
    padding: 0.25rem 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 0.5rem;
}

.multi-select-option:hover {
    background-color: var(--bg-secondary);
}

.multi-select-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.multi-select-option label {
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    flex: 1;
    font-size: 0.85rem;
}

/* Unified Document Card */
.unified-document-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 0.15rem;
}

.unified-document-card:hover {
    border-color: transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-medium);
}

.unified-document-card .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.unified-document-card .card-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.unified-document-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.unified-document-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.unified-document-card .card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.unified-document-card .card-meta-separator {
    color: var(--border-default);
}

.unified-document-card .card-institution {
    color: var(--gradient-start);
    font-weight: 500;
}

.unified-document-card .card-summary {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.unified-document-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.unified-document-card .card-tag {
    padding: 0.2rem 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.unified-document-card .card-tag.topic-tag {
    background-color: var(--gradient-start);
    color: white;
}

.unified-document-card .card-tag.status-tag {
    background-color: var(--gradient-end);
    color: white;
}

.unified-document-card .more-button {
    margin-top: 0.5rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .secondary-filters-content {
        padding: 0.75rem;
    }

    .filter-group {
        margin-bottom: 0.75rem;
    }

    .multi-select-dropdown {
        max-height: 250px;
    }

    .primary-filters .filters-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-chips {
        gap: 0.25rem;
    }

    .filter-chip {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .unified-document-card {
        padding: 1rem;
    }

    .unified-document-card .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .unified-document-card .card-meta-item {
        width: 100%;
    }
}