﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --primary-color: #9b3165;
    --primary-light: #b94d7f;
    --primary-dark: #7a2651;
    --border-color: #e0e0e0;
    --bg-light: #fafafa;
    
    --brand: #9b3165;
    --brand-light: #bc4b84;
    --brand-dim: rgba(155,49,101,0.08);
    --brand-border: rgba(155,49,101,0.18);
    --ink: #18181b;
    --ink-2: #3f3f46;
    --ink-3: #71717a;
    --ink-4: #a1a1aa;
    --surface: #ffffff;
    --surface-2: #fafaf9;
    --surface-3: #f4f4f5;
    --border: #e4e4e7;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ==================== LAYOUT ==================== */
.logo-svg {
    width: 45px;
    height: auto;
}

.logo-svg-navbar {
    width: 30px;
    height: auto;
    margin-bottom: 6px !important;
}

.brand-text {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .logo-svg {
        width: 55px;
    }

    .logo-svg-navbar {
        width: 35px;
        margin-bottom: 6px !important;
    }

    .brand-text {
        font-size: 0.9rem;
    }
}

.user-icon {
    color: var(--primary-color);
}

.nav-text {
    color: #333;
    font-size: 0.95rem;
}

.logout-link {
    color: var(--primary-color);
    font-weight: 500;
}

.logout-link:hover {
    color: color-mix(in srgb, var(--primary-color) 85%, #000 15%);
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
    .login-card {
        padding: 40px;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 8px;
}

@media (min-width: 480px) {
    .login-header h2 {
        font-size: 24px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.btn-signin {
    width: 100%;
    padding: 12px;
    background: #9b3165;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: #7a2651;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 49, 101, 0.3);
}

.footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: #94a3b8;
}

/* ==================== REPORTS PAGE ==================== */
.report-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    width: 100%;
    margin: 0;
    min-height: calc(100vh - 65px);
}

@media (min-width: 992px) {
    .report-container {
        flex-direction: row;
        gap: 0;
        padding: 0;
    }
}

.filters-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.filters-panel.mobile-open {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .filters-panel {
        position: sticky;
        top: 65px;
        width: 320px;
        min-width: 320px;
        height: calc(100vh - 65px);
        border-right: 1px solid #e2e8f0;
        border-bottom: none;
        transform: none;
        box-shadow: none;
        max-height: calc(100vh - 65px);
    }
}

.filter-group {
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .filter-group {
        margin-bottom: 20px;
    }
}

.filter-group label {
    display: block;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
}

@media (min-width: 992px) {
    .filter-group label {
        font-size: 13px;
    }
}

.checkbox-group {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #edf2f7;
}

@media (min-width: 992px) {
    .checkbox-group {
        margin-top: 25px;
        padding-top: 20px;
    }
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-size: 12px;
    color: #555;
}

@media (min-width: 992px) {
    .checkbox-item label {
        font-size: 13px;
    }
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.chart-panel {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: auto;
    overflow: hidden;
}

@media (min-width: 992px) {
    .chart-panel {
        padding: 20px;
        min-height: calc(100vh - 120px);
    }
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .chart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
}

.chart-header h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

@media (min-width: 768px) {
    .chart-header h2 {
        font-size: 20px;
    }
}

.chart-type-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .chart-type-selector {
        gap: 8px;
        flex-wrap: nowrap;
    }
}

.chart-actions-divider {
    width: 1px;
    background: #e2e8f0;
    margin: 0 4px;
}

.btn-expand {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-expand:hover {
    background: #f1f5f9;
    color: #9b3165;
    border-color: #e2e8f0;
}

.chart-panel, .single-chart-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.chart-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 30px 40px !important;
    border-radius: 0 !important;
    background: #f8fafc !important;
    display: flex;
    flex-direction: column;
}

.chart-fullscreen .chart-container-item,
.chart-fullscreen #chart-container {
    height: calc(100vh - 100px) !important;
    flex-grow: 1;
}

.chart-fullscreen .k-grid,
.chart-fullscreen .k-chart {
    height: 100% !important;
}

.k-animation-container,
.k-chart-tooltip-wrapper,
.k-chart-tooltip,
.k-tooltip {
    z-index: 1000000 !important;
}

.chart-type-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .chart-type-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

.chart-type-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chart-type-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#chart-container {
    width: 100% !important;
    height: 500px;
    min-height: 500px;
}

@media (min-width: 768px) {
    #chart-container {
        height: 600px;
        min-height: 600px;
    }
}

@media (min-width: 992px) {
    #chart-container {
        height: 100%;
        min-height: 500px;
    }
}

.chart-container-item, #chart-container {
    position: relative;
    min-height: 300px;
    width: 100%;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 4px;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #9b3165;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.k-grid-footer {
    background-color: #f8fafc;
    font-weight: 600;
    border-top: 2px solid #cbd5e1;
}

.k-grid-footer td {
    padding: 12px 8px !important;
    font-size: 14px;
}

.k-grid-footer .text-end {
    text-align: right !important;
}

@media screen and (max-width: 768px) {
    .k-grid-footer {
        font-size: 12px !important;
    }

    .k-grid-footer td {
        padding: 8px 4px !important;
    }
}

.btn-generate {
    width: 100%;
    padding: 14px 20px;
    background: #9b3165;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.2s ease;
}

.btn-text {
    white-space: nowrap !important;
    line-height: 1 !important;
}

.btn-generate:hover:not(:disabled) {
    background: #7a2651;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 49, 101, 0.2);
}

.btn-generate:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-spinner {
    display: none;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 2px solid white !important;
    border-radius: 50% !important;
    animation: btnSpin 1s linear infinite;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.btn-generate.is-loading .btn-spinner {
    display: inline-block !important;
}

@keyframes btnSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- THE GLOWING DOT INDICATOR --- */
.update-trigger {
    position: relative;
}

.update-trigger.needs-update::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background-color: #ec4899;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: pulse-glow-matchy 1.5s infinite;
    z-index: 2;
}

@keyframes pulse-glow-matchy {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(236, 72, 153, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

.update-trigger.needs-update::before {
    content: 'Filtrat janë ndryshuar! Klikoni për të aplikuar.';
    position: absolute;
    top: 50px;
    background-color: #1e293b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.update-trigger.needs-update:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==================== DASHBOARD PAGE ==================== */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: var(--surface);
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

@media (min-width: 992px) {
    .topbar {
        padding: 0 32px;
    }
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--ink-2);
    cursor: pointer;
    padding: 8px;
    margin-left: -8px;
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.topbar-brand-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-dim);
}

@media (max-width: 500px) {
    .brand-text {
        display: none;
    }
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    width: 100%;
    max-width: 400px;
    transition: all 0.2s ease;
}

.topbar-search:focus-within {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-dim);
}

.topbar-search input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    width: 100%;
}

.topbar-search input::placeholder {
    color: var(--ink-4);
}

.topbar-spacer.desktop-only {
    display: none;
    width: 200px;
}

@media (min-width: 992px) {
    .topbar-spacer.desktop-only {
        display: block;
    }
}

.main {
    display: flex;
    flex: 1;
    position: relative;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    width: 280px;
    max-width: 85vw;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;

    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    left: -100%;
    z-index: 999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.sidebar.mobile-open {
    left: 0;
    box-shadow: var(--shadow-md);
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none !important;
    }

    .sidebar {
        position: relative;
        left: 0 !important;
        top: auto;
        bottom: auto;
        height: 100%;
        width: 260px;
        transition: none;
        z-index: 90;
        box-shadow: none;
        padding: 24px 16px;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-4);
    padding: 4px 12px 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.sidebar-item.active {
    background: var(--brand-dim);
    color: var(--brand);
    font-weight: 600;
}

.sidebar-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-item svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sidebar-item:hover svg {
    opacity: 0.8;
}

.sidebar-item.active svg {
    opacity: 1;
    color: var(--brand);
}

.sidebar-badge {
    font-size: 11px;
    font-weight: 700;
    background: var(--surface-3);
    color: var(--ink-4);
    padding: 2px 8px;
    border-radius: 12px;
}

.sidebar-item.active .sidebar-badge {
    background: rgba(155,49,101,0.15);
    color: var(--brand);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    background: var(--surface-2);
}

@media (min-width: 768px) {
    .content {
        padding: 32px 40px;
    }
}

.module-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.module-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .content-header {
        margin-bottom: 32px;
    }
}

.content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .content-title {
        font-size: 28px;
    }
}

.content-subtitle {
    font-size: 14px;
    color: var(--ink-4);
    margin-top: 6px;
}

.module-banner {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .module-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 24px 32px;
    }
}

.module-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(155,49,101,0.25);
}

.module-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.module-banner-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(4px);
}

.module-banner-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.module-banner-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.module-banner-arrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 8px;
    align-self: flex-start;
}

@media (min-width: 768px) {
    .module-banner-arrow {
        background: transparent;
        padding: 0;
        align-self: center;
    }
}

.section-sep {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
}

.section-sep-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    white-space: nowrap;
}

.section-sep-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-sep-count {
    font-size: 12px;
    color: var(--ink-4);
    font-weight: 500;
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.reports-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 16px;
}

@media (min-width: 640px) {
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.report-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-dim) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.report-card:hover {
    border-color: var(--brand-border);
    box-shadow: 0 8px 24px rgba(155,49,101,0.12);
    transform: translateY(-3px);
}

.report-card:hover::after {
    opacity: 1;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand), var(--brand-light));
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 3px 0 0 3px;
}

.report-card:hover::before {
    opacity: 1;
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.report-card-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-dim);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    transition: all 0.25s ease;
}

.report-card:hover .report-card-icon {
    background: var(--brand);
    color: white;
    transform: scale(1.08) rotate(-3deg);
}

.report-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    transition: color 0.2s;
}

.report-card:hover .report-card-title {
    color: var(--brand);
}

.report-card-desc {
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.5;
   /* display: -webkit-box;*/
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-arrow {
    align-self: flex-end;
    width: 30px;
    height: 30px;
    background: var(--surface-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-4);
    transition: all 0.25s ease;
    border: 1px solid var(--border);
}

.report-card:hover .line-arrow {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
    transform: translateX(2px);
}

#search-results {
    display: none;
}

#search-results.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

mark {
    background: var(--brand-dim);
    color: var(--brand);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 600;
}

.empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    margin-top: 20px;
}

.empty svg {
    margin-bottom: 16px;
    color: var(--ink-4);
}

.empty h3 {
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty p {
    font-size: 14px;
    color: var(--ink-3);
}

.radio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

@media (min-width: 768px) {
    .filter-section-label {
        font-size: 12px;
    }
}

.k-radio:checked {
    background-color: #9b3165 !important;
}

.sidebar-nav-container {
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .sidebar-nav-container {
        margin-bottom: 20px;
    }
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #9b3165;
    font-size: 13px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .back-home-link {
        gap: 10px;
        font-size: 14px;
    }
}

.home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.back-home-link:hover .home-icon {
    transform: translateX(-1px);
}

.filters-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 10px 0 15px 0;
}

@media (min-width: 992px) {
    .filters-title {
        font-size: 12px;
        margin: 10px 0 20px 0;
    }
}

.text-end {
    text-align: right !important;
}

.k-grid {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.k-grid-header {
    background-color: #f8fafc;
}

.text-end {
    text-align: right !important;
}

.k-grid {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.k-grid-header {
    background-color: #f8fafc;
}

.k-grid::-webkit-scrollbar {
    height: 8px;
}

.k-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.k-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.k-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==================== MOBILE-SPECIFIC STYLES ==================== */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.mobile-filter-overlay.active {
    display: block;
    opacity: 1;
}

@media (min-width: 992px) {
    .mobile-filter-overlay {
        display: none !important;
    }
}

.mobile-filter-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(155, 49, 101, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:active {
    transform: scale(0.95);
}

.mobile-filter-close {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f3f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

.mobile-filter-close:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .mobile-filter-close {
        display: none;
    }
}

.mobile-apply-filters {
    display: block;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

@media (min-width: 992px) {
    .mobile-apply-filters {
        display: none;
    }
}

@media (max-width: 991px) {
    .k-dropdown, .k-datepicker {
        min-height: 44px;
    }

    .chart-type-btn,
    .btn-signin,
    .clickable-toggle {
        min-height: 44px;
    }

    body {
        overflow-x: hidden;
    }

    .filter-group > * {
        width: 100%;
    }

    .filters-panel .sidebar-nav-container {
        display: none;
    }

    .filters-panel-module .sidebar-nav-container {
        display: none;
    }

    .filters-panel h3 {
        margin-top: 0;
    }
}

.mobile-hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .mobile-hidden {
        display: block !important;
    }
}

.desktop-hidden {
    display: block !important;
}

@media (min-width: 768px) {
    .desktop-hidden {
        display: none !important;
    }
}

@media screen and (max-width: 768px) {
    .k-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .k-grid td,
    .k-grid th {
        padding: 8px 4px !important;
        font-size: 12px !important;
    }

    .k-grid-header th {
        font-size: 11px !important;
        white-space: normal !important;
        line-height: 1.2;
    }

    .k-grid colgroup col {
        min-width: 80px;
    }

    .k-grid td:first-child,
    .k-grid th:first-child {
        min-width: 120px;
        max-width: 150px;
        white-space: normal;
        word-wrap: break-word;
    }

    .k-grid-toolbar {
        padding: 8px !important;
        flex-wrap: wrap;
    }

    .k-grid-toolbar .k-button {
        margin: 4px !important;
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

    .k-grid-footer {
        font-size: 12px !important;
    }

    .k-grid-footer td {
        padding: 8px 4px !important;
    }
    
    .k-grid-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #f8fafc;
    }
}

@media (hover: none) and (pointer: coarse) {
    .k-grid td,
    .k-grid th {
        min-height: 44px;
    }

    .k-grid-toolbar .k-button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ==================== MODULE CARD (View All Reports) ==================== */
.module-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 8px 20px rgba(155, 49, 101, 0.25);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    border: none;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.module-card:hover::before {
    opacity: 1;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(155, 49, 101, 0.35);
}

.module-card-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.module-card-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.module-card:hover .module-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

.module-card-content {
    flex-grow: 1;
    margin-bottom: 25px;
}

.module-card-title {
    color: white;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.module-card-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
}

.module-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.module-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 13px;
    color: white;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.module-card-badge svg {
    color: white;
}

.module-card-arrow {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.module-card-arrow svg {
    width: 20px;
    height: 20px;
}

.module-card:hover .module-card-arrow {
    background: white;
    color: var(--primary-color);
    transform: translateX(5px);
}

@media (max-width: 767px) {
    .module-card {
        padding: 25px;
    }

    .module-card-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 20px;
    }

    .module-card-icon svg {
        width: 32px;
        height: 32px;
    }

    .module-card-title {
        font-size: 20px;
    }

    .module-card-description {
        font-size: 14px;
    }
}

/* ==================== MODULE REPORTS VIEW ==================== */
.charts-panel-wrapper {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .charts-panel-wrapper {
        padding: 20px;
    }
}

.module-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.module-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 768px) {
    .module-header h1 {
        font-size: 32px;
    }
}

#all-charts-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.single-chart-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .single-chart-wrapper {
        padding: 25px;
    }
}

.single-chart-wrapper .chart-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .single-chart-wrapper .chart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
}

.single-chart-wrapper .chart-title {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

@media (min-width: 768px) {
    .single-chart-wrapper .chart-title {
        font-size: 20px;
    }
}

.chart-container-item {
    width: 100% !important;
    height: 500px;
    min-height: 500px;
}

@media (min-width: 768px) {
    .chart-container-item {
        height: 550px;
        min-height: 550px;
    }
}

@media (min-width: 992px) {
    .chart-container-item {
        height: 600px;
        min-height: 600px;
    }
}

@media (max-width: 767px) {
    .single-chart-wrapper .k-chart .k-chart-legend {
        max-height: 280px !important;
        overflow-y: auto !important;
        padding: 12px 8px !important;
    }

    .single-chart-wrapper .k-chart .k-chart-legend-item {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
}

.filters-panel-module {
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-fixed-header {
    padding: 20px;
    background: #ffffff;
    z-index: 10;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.05);
}

.sidebar-title-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.sidebar-scroll-body {
    flex-grow: 1; 
    overflow-y: auto;
    padding: 20px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    text-align: center;
    padding: 40px;
    transition: all 0.3s ease;
}

.chart-placeholder-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: #9b3165;
}

.chart-placeholder h3 {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.chart-placeholder p {
    font-size: 14px;
    max-width: 300px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .chart-placeholder {
        padding: 20px;
        min-height: 300px;
    }
}

.filters-panel-module.mobile-open {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .filters-panel-module {
        position: sticky;
        top: 20px;
        width: 320px;
        min-width: 320px;
        height: calc(100vh - 40px);
        border-right: 1px solid #e2e8f0;
        background: white;
        transform: none;
        box-shadow: none;
        z-index: 10;
        border-radius: 12px;
    }

    .sidebar-fixed-header {
        padding: 20px;
    }

    .charts-panel-wrapper {
        flex: 1;
        min-width: 0;
    }
}

.filters-panel-module::-webkit-scrollbar {
    width: 6px;
}

.filters-panel-module::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 10px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9b3165 0%, #bc4b84 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(155, 49, 101, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(155, 49, 101, 0.45);
    background: linear-gradient(135deg, #7a2651 0%, #9b3165 100%);
}

@media (max-width: 768px) {
    .scroll-to-top {
        display: none !important;
    }
}