:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --boost-color: #bd1c25;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --row-hover: #f1f5f9;
}

.text-muted {
    color: var(--text-muted);
}

.account-logo-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--border-color);
}

.account-logo-placeholder {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.account-logo-placeholder::after {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z' /%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 98%;
    margin: 0 auto;
    padding: 2rem;
}

/* Full View Table */
.table-card {
    padding: 0;
    overflow: hidden;
}

.full-view-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

.full-view-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 0.75rem;
    white-space: nowrap;
}

.full-view-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    word-break: break-word;
}

.dept-circles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100px;
}

.dept-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: help;
    border: 1px solid rgba(0,0,0,0.1);
}

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: #f1f5f9;
}

.full-view-table .badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.header-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.header-link:hover {
    color: var(--primary-color);
}

.header-link h3 {
    margin: 0;
    display: inline-block;
}

.header-link h3::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s;
}

.header-link:hover h3::after {
    opacity: 1;
}

/* Auth Pages (Login/MFA) */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.form-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-logo {
    max-width: 180px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.logo-text {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.form-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    text-decoration: none;
}

button:hover, .btn:hover {
    background-color: var(--primary-hover);
}

button.secondary, .btn.secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    width: auto;
}

button.secondary:hover, .btn.secondary:hover {
    background-color: var(--bg-color);
}

button.danger {
    background-color: var(--error-color);
}

button.danger:hover {
    filter: brightness(0.9);
}

button.small, .btn.small {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

button.success {
    background-color: var(--success-color);
}

button.success:hover {
    filter: brightness(0.9);
}

.btn-export {
    background-color: #27ae60 !important;
    color: white !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background-color: #219150 !important;
}

/* Dashboard Layout Improvements */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Side Menu */
.side-menu {
    width: 250px;
    background: var(--text-main);
    color: white;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1000;
}

.side-menu.collapsed {
    width: 60px;
}

.side-menu .logo-area {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
    min-height: 120px; /* Ensure enough height for logo even if text is missing */
    justify-content: center;
}

.side-menu .company-logo {
    max-width: 140px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.side-menu.collapsed .company-logo {
    max-width: 32px;
}

.side-menu .logo-area .logo-text {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.side-menu.collapsed .logo-area {
    padding: 1rem 0.5rem;
    min-height: 80px;
}

.side-menu.collapsed .logo-area .logo-text {
    display: none;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.menu-footer {
    margin-top: auto;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu.collapsed .menu-footer {
    justify-content: center;
    padding: 1rem 0;
}

.side-menu.collapsed .menu-toggle .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.nav-links {
    list-style: none;
    padding: 1rem 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-links li a:hover, .nav-links li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Modal Styles */
.modal-large {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-large .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 95%;
    width: 1200px;
    padding: 0;
}

.modal-large .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    margin-bottom: 0;
}

.modal-large .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.modal-large .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
    background: #f9fafb;
}

.modal-large .close-modal {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.modal-large .close-modal:hover {
    color: var(--text-main);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: modal-in 0.3s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: auto;
    padding: 0;
}

.close-modal:hover {
    color: var(--text-main);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.success { background: #dcfce7; color: #166534; }
.badge.error { background: #fee2e2; color: #991b1b; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.muted { background: #f1f5f9; color: #475569; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.nav-links li a .icon {
    width: 24px;
    margin-right: 1rem;
    text-align: center;
}

.side-menu.collapsed .nav-links li a {
    padding: 0.75rem 1.1rem;
}

.side-menu.collapsed .nav-links li a span:not(.icon) {
    display: none;
}

/* Main Content Adjustment */
.dashboard-content-wrapper {
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dashboard-content-wrapper.expanded,
.menu-collapsed-state .dashboard-content-wrapper {
    margin-left: 60px;
}

.dashboard-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between; /* Adjusted to accommodate elements on both sides */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Data List Sections */
.record-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.record-column {
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 1rem;
    height: 520px;
    display: flex;
    flex-direction: column;
}

.record-items-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for better appearance */
.record-items-container::-webkit-scrollbar {
    width: 6px;
}

.record-items-container::-webkit-scrollbar-track {
    background: transparent;
}

.record-items-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.record-items-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.column-header h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.column-count {
    background: var(--border-color);
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.record-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.record-item h4 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.record-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .record-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-header h1.logo-text {
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* SuperAdmin Top Nav */
.top-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.top-nav .nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
}

.top-nav .nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.top-nav button, .top-nav .btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    max-width: 98%; 
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.actions-bar a {
    text-decoration: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Layout Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2-col, .grid-3-col {
        grid-template-columns: 1fr;
    }
}

/* Action Cards */
.action-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.action-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

/* Notifications */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    min-width: 300px;
    max-width: 450px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out forwards;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notice-box {
    font-size: small;
    padding: 0.5rem 0.1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Search Results Dropdown */
.search-results {
    position: relative;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.search-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.search-item strong {
    display: block;
}

/* Insights Page Styles */
.loading-overlay {
    position: relative;
    min-height: 50px;
}
.loading-overlay::after {
    content: "Loading...";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    z-index: 5;
    border-radius: 0.5rem;
}
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Budget Management Styles */
.budget-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.budget-table th, .budget-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.budget-table th { background: #f8f9fa; font-weight: 600; }
.budget-input-wrapper { display: flex; align-items: center; gap: 5px; }
.budget-input { width: 100px; padding: 5px; border: 1px solid #ddd; border-radius: 4px; }
.btn-save-budget { background: none; border: none; color: #007bff; cursor: pointer; font-size: 1.1em; }
.btn-view-transactions { background: #6c757d; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.btn-view-transactions:hover { background: #5a6268; }
.btn-remove-budget { cursor: pointer; color: var(--error-color); }
#transactionsList { max-height: 60% !important; overflow-y: scroll;}

.budget-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); }
.budget-modal-content { max-height: 60% !important; overflow: hidden; background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 60%; border-radius: 8px; }
.budget-modal-content .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.budget-modal-content .close:hover { color: black; }

.budget-current-year { background: rgba(244,208,88,0.2);; }
.budget-year:hover { background: var(--row-hover) }

.transaction-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; }
.btn-save-inline { background-color: #2ecc71; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; margin-right: 5px; }
.btn-cancel-inline { background-color: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.chart-container {
    grid-column: span 2;
    min-height: 300px;
}
.award-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}
.btn-merge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: #10b981;
    color: white;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: opacity 0.2s;
}
.btn-merge:hover {
    opacity: 0.85;
}
.blurb-section {
    grid-column: span 2;
    line-height: 1.6;
}
.department-list, .theme-list, .market-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.dept-tag {
    background: #e2e8f0;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.personnel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.personnel-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-edit-personnel, .btn-remove-personnel, .btn-edit-result {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    width: auto;
    transition: color 0.2s;
}

.btn-edit-personnel:hover, .btn-edit-result:not(.disabled):hover {
    color: var(--primary-color);
    background: none;
}

.btn-edit-result.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-remove-personnel:hover {
    color: var(--error-color);
    background: none;
}

/* New Insights Page Styles */
.back-dashboard {
    text-decoration: none;
}

.award-header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.year-tag {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
}

.stat-value.success {
    color: var(--success-color);
}

.stat-description {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.win-rate-chart-container {
    height: 180px;
    margin: 1rem 0;
}

.fee-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.25rem;
}

.fee-amount {
    font-weight: 600;
}

/* Judges Feedback Section */
.judges-feedback-section {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.judges-feedback-section h3 {
    margin-bottom: 1rem;
}

.feedback-textarea-wrapper {
    position: relative;
    flex-grow: 1;
}

.feedback-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: #fdfdfd;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-save-feedback {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
}

.btn-save-feedback:hover {
    background-color: var(--primary-hover);
}

.btn-save-feedback:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header-actions h3 {
    margin: 0;
}

.btn-add-inline {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    width: auto;
}

.dept-tag-wrapper {
    display: inline-flex;
    align-items: center;
    background: #f0f4f8;
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.remove-dept-btn, .remove-theme-btn, .remove-market-btn {
    border: none;
    background: none;
    color: var(--error-color);
    cursor: pointer;
    margin-left: 0.5rem;
    padding: 0;
    font-size: 0.75rem;
    width: auto;
}

.remove-dept-btn:hover, .remove-theme-btn:hover, .remove-market-btn:hover {
    filter: brightness(0.8);
    background: none;
}

.documents-section {
    grid-column: span 2;
}

.btn-add-doc {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    width: auto;
}

.file-list {
    display: block;
}

.file-item-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.file-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon-circle {
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.file-info-name {
    font-weight: 600;
}

.file-info-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-only {
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: none;
    border: none;
    width: auto;
}

.btn-icon-only:hover {
    background: none;
    color: var(--text-main);
}

.btn-remove-file {
    color: var(--error-color);
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    width: auto;
}

.btn-remove-file:hover {
    background: none;
    filter: brightness(0.8);
}

.no-data-msg {
    text-align: center;
    padding: 2rem 0;
}

/* Modal Helper Classes */
.modal-centered {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content-small {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 400px;
    box-shadow: var(--shadow-lg);
}

.modal-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header-flex h2 {
    margin: 0;
    font-size: 1.5rem;
}

.form-field-group {
    margin-bottom: 1rem;
}

.form-field-group.last {
    margin-bottom: 1.5rem;
}

.form-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-field-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
}

.btn-full-width {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Dashboard Record Item Styles */
.record-item {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Documents Page Styles */
.search-container {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}
.search-input {
    flex: 4; /* Increased to make it larger than the button */
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
.search-btn {
    flex: 1; /* Fixed relative size */
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.clear-btn {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    background: #e5e7eb;
    color: #374151;
    border-radius: 8px;
    text-decoration: none;
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}
.file-icon {
    width: 48px;
    height: 48px;
    background: #f0f4f8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #2563eb);
    font-size: 1.25rem;
    flex-shrink: 0;
}
.file-details {
    overflow: hidden;
}
.file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1f2937;
}
.file-meta {
    font-size: 0.813rem;
    color: #6b7280;
}
.view-doc-btn {
    color: var(--primary-color, #2563eb);
    font-size: 1.2rem;
}
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    background: white;
    transition: background 0.2s;
}
.page-link.active {
    background: var(--primary-color, #2563eb);
    color: white;
    border-color: var(--primary-color, #2563eb);
}
.page-link:hover:not(.active) {
    background: #f3f4f6;
}
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}
.no-results i {
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Wizard Styles */
.wizard-container {
    padding: 2rem;
    max-width: 800px;
    margin: 1rem auto;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
}

.wizard-steps .step {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #9ca3af;
    position: relative;
}

.wizard-steps .step.active {
    color: #2563eb;
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Autosuggest Styles */
.autosuggest-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f9fafb;
    color: #2563eb;
}

/* Checkbox Grid Styles */
.filter-section {
    margin-bottom: 2rem;
}

.filter-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #4b5563;
}

.checkbox-item input {
    width: 1.1rem;
    height: 1.1rem;
}

/* Advanced Search */
.search-card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-main-input {
    flex: 1;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

#searchButton {
    width: auto;
    white-space: nowrap;
}

.search-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.filter-group h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.boost-small {
    font-size: 0.8rem;
    color: var(--boost-color) !important;
    font-weight: bold;
}

.boost-small-text {
    font-size: 0.8rem;
    font-weight: bold;
}

.personnel-section .personnel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.personnel-section .personnel-item:last-child {
    border-bottom: none;
}

.personnel-section .personnel-item p {
    margin: 0;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* Contact Boost Floating Icon */
.contact-boost-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--card-bg);
    border-radius: 50px;
    padding: 8px 8px 8px 8px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.contact-boost-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgb(0 0 0 / 0.15);
}

.contact-boost-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*margin-right: 10px;*/
    overflow: hidden;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-boost-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.contact-boost-text {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Modal Styles */
.boost-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.boost-modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.boost-modal-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.boost-modal-header h3 {
    margin: 0;
    color: var(--text-main);
}

.close-modal {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-main);
}

.boost-modal-body {
    padding: 1.5rem;
}

.boost-modal-body p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.boost-modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.boost-modal-body textarea:focus {
    border-color: var(--primary-color);
}

.boost-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.status-msg {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 6px;
    display: none;
    font-size: 0.9rem;
}

.status-msg.success {
    background: #ecfdf5;
    color: var(--success-color);
    border: 1px solid #10b98133;
}

.status-msg.error {
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #ef444433;
}

/* Insights Dashboard */
.insights-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--error-color);
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.chart-container {
    background: #fff;
    border-radius: 0.5rem;
}

/* Insights Page - Compact Filter Bar */
.insights-filter-card {
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
}

.insights-top-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.insights-year-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.insights-year-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.insights-year-select {
    width: 95px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    color: var(--text-main);
}

.insights-range-sep {
    padding-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.insights-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-sm-insight {
    width: auto;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

.insights-wins-inline {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.wins-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 500;
}

.wins-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.mt-2 {
    margin-top: 0.75rem;
}

.insights-filter-card .search-filters-grid {
    gap: 1.25rem;
    padding-top: 0.75rem;
    overflow-y: scroll;
    max-height: 160px;
}

/* Documents Page - Search Bar */
.doc-search-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.doc-search-bar .search-input {
    flex: 2;
    min-width: 200px;
}

/* Documents Page - File Card with Data Points */
.doc-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.doc-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.doc-datapoints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.doc-datapoint-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin-right: 0.25rem;
}

.doc-dept-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.doc-tag {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.doc-tag-theme {
    background: #ede9fe;
    color: #5b21b6;
}

.doc-tag-market {
    background: #dcfce7;
    color: #166534;
}

.doc-tag-writer {
    background: #dbeafe;
    color: #1e40af;
}

.file-award {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.doc-award-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.doc-award-link:hover {
    text-decoration: underline;
}

.doc-award-category {
    color: var(--text-muted);
}

.doc-award-category::before {
    content: '•';
    margin-right: 0.4rem;
}

.doc-award-year {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.05rem 0.5rem;
    border-radius: 1rem;
}

/* ==========================================================================
   Calendar of Events Styles
   ========================================================================== */

/* Calendar KPI Statistics */
.calendar-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calendar-stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.calendar-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.calendar-stat-icon.deadlines {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.calendar-stat-icon.awardings {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.calendar-stat-icon.total {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.calendar-stat-icon.upcoming {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.calendar-stat-info {
    display: flex;
    flex-direction: column;
}

.calendar-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
}

.calendar-stat-label {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Calendar Card Container */
.calendar-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Calendar Controls Header / Top Bar */
.calendar-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.calendar-nav-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: var(--row-hover);
    border-color: #cbd5e1;
    color: var(--primary-color);
}

.calendar-today-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-today-btn:hover {
    background: var(--row-hover);
    border-color: #cbd5e1;
}

.calendar-period-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    min-width: 190px;
    user-select: none;
}

.calendar-button-group {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.calendar-toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.calendar-toggle-btn:hover {
    color: var(--text-main);
}

.calendar-toggle-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Secondary Filter & Legend Row */
.calendar-secondary-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.legend-dot.deadline {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.legend-dot.awarding {
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.calendar-filter-toggle-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.calendar-filter-toggle-btn:hover,
.calendar-filter-toggle-btn.active {
    background: var(--row-hover);
    border-color: #cbd5e1;
    color: var(--primary-color);
}

/* Advanced Filter Panel */
.calendar-filters-panel {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

.calendar-filters-panel.open {
    display: block;
}

.calendar-filters-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-search-box {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.calendar-search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
}

.calendar-search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Month View Styles
   -------------------------------------------------------------------------- */
.calendar-month-view {
    width: 100%;
}

.calendar-weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.weekday-header-cell {
    background: #f8fafc;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.weekday-header-cell.weekend {
    background: #f1f5f9;
    color: #94a3b8;
}

.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.calendar-day-cell {
    background: #ffffff;
    min-height: 125px;
    padding: 0.4rem 0.45rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.15s ease;
    overflow: hidden;
}

.calendar-day-cell:hover {
    background: #fafafa;
}

.calendar-day-cell.other-month {
    background: #f8fafc;
    opacity: 0.6;
}

.calendar-day-cell.weekend {
    background: #fbfcfe;
}

.calendar-day-cell.is-today {
    background: #eff6ff !important;
}

.day-cell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.day-number {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-main);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day-cell.is-today .day-number {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.day-event-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.day-events-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
}

/* Event Badges (Pinned on Month & Week cells) */
.calendar-event-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.45rem;
    border-radius: 5px;
    font-size: 0.725rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    user-select: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-event-badge:hover {
    transform: translateX(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-badge-deadline {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.event-badge-deadline:hover {
    background: #fecaca;
    color: #7f1d1d;
}

.event-badge-awarding {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #2563eb;
}

.event-badge-awarding:hover {
    background: #bfdbfe;
    color: #1e3a8a;
}

.event-badge-past {
    opacity: 0.7;
    filter: grayscale(20%);
}

.event-badge-icon {
    font-size: 0.7rem;
    flex-shrink: 0;
}

.event-badge-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.event-dept-dots {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

.dept-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.calendar-more-badge {
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    margin-top: 0.15rem;
    transition: background 0.15s ease;
}

.calendar-more-badge:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Week View Styles
   -------------------------------------------------------------------------- */
.calendar-week-view {
    width: 100%;
}

.calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-week-day-col {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    overflow: hidden;
}

.calendar-week-day-col.is-today {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
    background: #ffffff;
}

.week-col-header {
    padding: 0.75rem 0.5rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.calendar-week-day-col.is-today .week-col-header {
    background: #eff6ff;
    border-bottom-color: #bfdbfe;
}

.week-col-dayname {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.week-col-date {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.15rem;
}

.calendar-week-day-col.is-today .week-col-date {
    color: var(--primary-color);
}

.week-col-events {
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
    overflow-y: auto;
}

.week-event-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.week-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.week-event-card.deadline {
    border-left-color: #ef4444;
}

.week-event-card.awarding {
    border-left-color: #2563eb;
}

.week-event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.week-event-type-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.week-event-type-tag.deadline {
    background: #fee2e2;
    color: #b91c1c;
}

.week-event-type-tag.awarding {
    background: #dbeafe;
    color: #1d4ed8;
}

.week-event-timing {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}

.week-event-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.week-event-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.week-event-dept-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.week-dept-pill {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
}

.week-event-link-hint {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.week-empty-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
    padding: 2rem 0.5rem;
}

/* --------------------------------------------------------------------------
   Year View Styles
   -------------------------------------------------------------------------- */
.calendar-year-view {
    width: 100%;
}

.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.year-month-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.year-month-card:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.year-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.year-month-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.15s ease;
}

.year-month-name:hover {
    color: var(--primary-color);
}

.year-month-event-count {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    background: #f1f5f9;
    border-radius: 12px;
    color: var(--text-muted);
}

.year-month-event-count.has-events {
    background: #eff6ff;
    color: var(--primary-color);
}

.year-mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.3rem;
}

.year-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.year-mini-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border-radius: 4px;
    color: var(--text-main);
    position: relative;
    cursor: default;
    transition: background 0.15s ease;
}

.year-mini-day.other-month {
    color: #cbd5e1;
}

.year-mini-day.is-today {
    font-weight: 700;
    color: var(--primary-color);
    background: #eff6ff;
}

.year-mini-day.has-deadline {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    cursor: pointer;
}

.year-mini-day.has-awarding {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    cursor: pointer;
}

.year-mini-day.has-both {
    background: linear-gradient(135deg, #fee2e2 50%, #dbeafe 50%);
    color: #1e293b;
    font-weight: 700;
    cursor: pointer;
}

.year-mini-day.has-deadline:hover,
.year-mini-day.has-awarding:hover,
.year-mini-day.has-both:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Upcoming List / Timeline View
   -------------------------------------------------------------------------- */
.calendar-upcoming-view {
    width: 100%;
}

.upcoming-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upcoming-item-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-left: 5px solid var(--primary-color);
    cursor: pointer;
}

.upcoming-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.upcoming-item-card.deadline {
    border-left-color: #ef4444;
}

.upcoming-item-card.awarding {
    border-left-color: #2563eb;
}

.upcoming-item-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 280px;
}

.upcoming-date-badge {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
}

.upcoming-item-card.deadline .upcoming-date-badge {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.upcoming-item-card.awarding .upcoming-date-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.upcoming-badge-day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.upcoming-badge-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.upcoming-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.upcoming-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.upcoming-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.upcoming-type-badge.deadline {
    background: #fee2e2;
    color: #b91c1c;
}

.upcoming-type-badge.awarding {
    background: #dbeafe;
    color: #1d4ed8;
}

.upcoming-timing-pill {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-muted);
}

.upcoming-award-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.upcoming-award-cat {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.upcoming-datapoints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.upcoming-item-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Day Events Drill-Down Modal
   -------------------------------------------------------------------------- */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.calendar-modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-modal-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.calendar-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.modal-event-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-event-card:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.modal-event-card.deadline {
    border-left-color: #ef4444;
}

.modal-event-card.awarding {
    border-left-color: #2563eb;
}

/* Empty State / Loading State */
.calendar-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.calendar-empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.calendar-loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .calendar-week-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav-section {
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .calendar-weekdays-header .weekday-header-cell {
        font-size: 0.65rem;
        padding: 0.5rem 0.2rem;
    }
    
    .calendar-day-cell {
        min-height: 85px;
        padding: 0.2rem;
    }
    
    .calendar-week-grid {
        grid-template-columns: 1fr;
    }

    .upcoming-item-card {
        flex-direction: column;
        align-items: stretch;
    }
}
