@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Main global variables matching theme */
:root {
    --report-primary: #0d2d7c;
    --report-gradient: linear-gradient(135deg, rgb(2 37 102 / 89%) 0%, #2c7a9e 100%);
    --report-glass-bg: rgba(255, 255, 255, 0.45);
    --report-border: rgba(58, 148, 180, 0.15);
    --report-input-focus: rgba(44, 122, 158, 0.15);
    --report-shadow: 0 15px 40px rgba(13, 45, 124, 0.04);
    --report-text: #334155;
}

#module-ps_customreport-customreport #inner-wrapper {
    max-width: 95%;
}

#module-ps_customreport-customreport #wrapper {
    box-shadow: inherit;
}

#module-ps_customreport-customreport #iqitmegamenu-horizontal {
    margin: 0;
    padding: 0;
}

/* 1. REPORT CONTAINER CARDS */
.report-container {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--report-text);
    background: var(--report-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--report-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-top: 1.5rem;
    margin-bottom: 3.5rem;
    box-shadow: var(--report-shadow);
    animation: slideUpIn 0.5s ease-out forwards;
}

.report-container h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--report-primary);
    margin: 0 0 2rem 0;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.report-container h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--report-gradient);
    border-radius: 2px;
}

/* 2. FILTERS AND FORMS */
.report-container .report-header .report-form {
    box-sizing: border-box;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--report-border);
    border-radius: 20px;
}

.report-container .report-header .report-form > div {
    display: flex;
    flex-direction: column;
    margin-right: 0;
}

.report-container .report-header .report-form label {
    color: var(--report-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.report-container .report-header .report-form .input-wrapper {
    background-color: transparent !important;
    margin-right: 0;
}

.report-container .report-header .report-form input {
    background-color: white !important;
    border: 1px solid rgba(58, 148, 180, 0.2) !important;
    border-radius: 12px !important;
    color: var(--report-text);
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 100%;
}

.report-container .report-header .report-form input:focus {
    border-color: #2c7a9e !important;
    box-shadow: 0 0 0 4px var(--report-input-focus), inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    outline: none;
}

/* Modern Form Action Buttons */
.report-container .report-header .report-form button {
    box-sizing: border-box;
    border: none;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: white;
    background: var(--report-gradient);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(44, 122, 158, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-container .report-header .report-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 122, 158, 0.35);
}

.report-container .report-header .report-form button[type="button"] {
    background: rgba(58, 148, 180, 0.08) !important;
    border: 1px solid rgba(58, 148, 180, 0.25) !important;
    color: var(--report-primary) !important;
    box-shadow: none !important;
}

.report-container .report-header .report-form button[type="button"]:hover {
    background: var(--report-gradient) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(44, 122, 158, 0.25) !important;
}

/* 3. REPORT DATA TABLES (.report-table) */
.report-container .report-body {
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
}

.report-container .report-body .report-table {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0 10px;
    border: none !important;
    margin-top: 1rem;
}

.report-container .report-body .report-table tr th {
    padding: 6px;
    background-color: #eff6f9 !important;
    color: var(--report-primary) !important;
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    border: none !important;
    vertical-align: middle;
    transition: background-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    word-break: normal;
}

.report-container .report-body .report-table tr th:first-child {
    border-radius: 14px 0 0 14px;
}

.report-container .report-body .report-table tr th:last-child {
    border-radius: 0 14px 14px 0;
}

.report-container .report-body .report-table tr th.col-sortable {
    cursor: pointer;
}

.report-container .report-body .report-table tr th.col-sortable:hover {
    background-color: rgba(58, 148, 180, 0.22) !important;
}

.report-container .report-body .report-table tr th.col-type-NUMERIC, 
.report-container .report-body .report-table tr th.col-type-CURRENCY {
    text-align: right;
}

.report-container .report-body .report-table tr th > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.report-container .report-body .report-table tr th > div span {
    display: block;
}

.report-container .report-body .report-table tr th > div i {
    display: none;
    color: #2c7a9e;
    font-size: 0.85rem;
    margin-left: 8px;
}

.report-container .report-body .report-table tr th.NONE > div i.NONE,
.report-container .report-body .report-table tr th.ASC > div i.ASC,
.report-container .report-body .report-table tr th.DESC > div i.DESC {
    display: block;
}

/* Rows and Cells */
.report-container .report-body .report-table tbody tr {
    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(13, 45, 124, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpIn 0.4s ease-out cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger entrance delays for beautiful loads */
.report-container .report-body .report-table tbody tr:nth-child(1) { animation-delay: 0.04s; }
.report-container .report-body .report-table tbody tr:nth-child(2) { animation-delay: 0.08s; }
.report-container .report-body .report-table tbody tr:nth-child(3) { animation-delay: 0.12s; }
.report-container .report-body .report-table tbody tr:nth-child(4) { animation-delay: 0.16s; }
.report-container .report-body .report-table tbody tr:nth-child(5) { animation-delay: 0.20s; }
.report-container .report-body .report-table tbody tr:nth-child(6) { animation-delay: 0.24s; }
.report-container .report-body .report-table tbody tr:nth-child(7) { animation-delay: 0.28s; }
.report-container .report-body .report-table tbody tr:nth-child(8) { animation-delay: 0.32s; }
.report-container .report-body .report-table tbody tr:nth-child(9) { animation-delay: 0.36s; }
.report-container .report-body .report-table tbody tr:nth-child(10) { animation-delay: 0.40s; }

.report-container .report-body .report-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.32);
}

.report-container .report-body .report-table tr td {
    padding: 10px 12px;
    border: none !important;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--report-text);
    font-size: 0.88rem;
    font-weight: 500;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.report-container .report-body .report-table tr td:first-child {
    border-radius: 14px 0 0 14px;
    border-left: 4px solid transparent !important;
}

.report-container .report-body .report-table tr td:last-child {
    border-radius: 0 14px 14px 0;
}

.report-container .report-body .report-table tr td.col-type-NUMERIC, 
.report-container .report-body .report-table tr td.col-type-CURRENCY {
    text-align: right;
    font-weight: 600;
}

/* Beautiful Interactive Hover and Group Hovers */
.report-container .report-body .report-table tbody tr {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.report-container .report-body .report-table tbody tr:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 12px 28px rgba(13, 45, 124, 0.09) !important;
}

.report-container .report-body .report-table tbody tr:hover td {
    background-color: transparent !important;
    color: var(--report-primary) !important;
}

.report-container .report-body .report-table tbody tr:hover td:first-child {
    border-left: 4px solid var(--report-primary) !important;
}

.report-container .report-body .report-table tr.hovery td {
    background-color: rgba(44, 122, 158, 0.12) !important;
    color: var(--report-primary) !important;
}

/* Active / Inactive row first-two-column coloring */
.report-container .report-body .report-table tr.row-active td:first-child,
.report-container .report-body .report-table tr.row-active td:nth-child(2) {
    color: #1a7a4a !important;
    font-weight: 600;
    background-color: rgba(39, 174, 96, 0.10) !important;
}

.report-container .report-body .report-table tr.row-active td:first-child {
    border-left: 4px solid #27ae60 !important;
}

.report-container .report-body .report-table tr.row-inactive td:first-child,
.report-container .report-body .report-table tr.row-inactive td:nth-child(2) {
    color: #b03a2e !important;
    font-weight: 600;
    background-color: rgba(192, 57, 43, 0.08) !important;
}

.report-container .report-body .report-table tr.row-inactive td:first-child {
    border-left: 4px solid #c0392b !important;
}

/* Maintain coloring on hover for active/inactive rows */
.report-container .report-body .report-table tr.row-active:hover td:first-child,
.report-container .report-body .report-table tr.row-active:hover td:nth-child(2) {
    color: #1a7a4a !important;
    background-color: rgba(39, 174, 96, 0.18) !important;
}

.report-container .report-body .report-table tr.row-active:hover td:first-child {
    border-left: 4px solid #27ae60 !important;
}

.report-container .report-body .report-table tr.row-inactive:hover td:first-child,
.report-container .report-body .report-table tr.row-inactive:hover td:nth-child(2) {
    color: #b03a2e !important;
    background-color: rgba(192, 57, 43, 0.15) !important;
}

.report-container .report-body .report-table tr.row-inactive:hover td:first-child {
    border-left: 4px solid #c0392b !important;
}

/* Styling the Sum / Totals row */
.report-container .report-body .report-table tr:last-child td {
    background-color: rgba(58, 148, 180, 0.06) !important;
    color: var(--report-primary) !important;
    font-weight: 700 !important;
    border-radius: 0 !important;
}

.report-container .report-body .report-table tr:last-child td:first-child {
    border-radius: 14px 0 0 14px !important;
}

.report-container .report-body .report-table tr:last-child td:last-child {
    border-radius: 0 14px 14px 0 !important;
}

/* Empty states */
.report-container .report-body p {
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    color: var(--report-text);
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px dashed rgba(58, 148, 180, 0.2);
}


/* ========================================================
   4. CUSTOM PAGES TABLE STYLING (#auswertungTable)
   ======================================================== */
   
.form-group label {
    color: var(--report-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}

.form-group .form-control {
    background-color: white !important;
    border: 1px solid rgba(58, 148, 180, 0.2) !important;
    border-radius: 12px !important;
    color: var(--report-text);
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 100%;
}

.form-group .form-control:focus {
    border-color: #2c7a9e !important;
    box-shadow: 0 0 0 4px var(--report-input-focus), inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    outline: none;
}

button#exportCsv {
    border: none;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: white;
    background: var(--report-gradient) !important;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(44, 122, 158, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

button#exportCsv:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 122, 158, 0.35);
}

#auswertungTable {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0 10px;
    border: none !important;
    margin-top: 1.5rem;
    font-family: 'Outfit', sans-serif;
}

#auswertungTable thead th {
    padding: 10px 12px;
    background-color: #eff6f9 !important;
    color: var(--report-primary) !important;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    text-align: left;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    word-break: normal;
}

#auswertungTable thead th:first-child {
    border-radius: 14px 0 0 14px;
}

#auswertungTable thead th:last-child {
    border-radius: 0 14px 14px 0;
}

#auswertungTable tbody tr {
    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(13, 45, 124, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpIn 0.4s ease-out cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger delays for custom table rows */
#auswertungTable tbody tr:nth-child(1) { animation-delay: 0.04s; }
#auswertungTable tbody tr:nth-child(2) { animation-delay: 0.08s; }
#auswertungTable tbody tr:nth-child(3) { animation-delay: 0.12s; }
#auswertungTable tbody tr:nth-child(4) { animation-delay: 0.16s; }
#auswertungTable tbody tr:nth-child(5) { animation-delay: 0.20s; }

#auswertungTable tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.32);
}

#auswertungTable tr td {
    padding: 10px 12px;
    border: none !important;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--report-text);
    font-size: 0.88rem;
    font-weight: 500;
    vertical-align: middle;
    transition: all 0.3s ease;
}

#auswertungTable tr td:first-child {
    border-radius: 14px 0 0 14px;
    border-left: 4px solid transparent !important;
}

#auswertungTable tr td:last-child {
    border-radius: 0 14px 14px 0;
}

#auswertungTable tbody tr {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#auswertungTable tbody tr:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 12px 28px rgba(13, 45, 124, 0.09) !important;
}

#auswertungTable tbody tr:hover td {
    background-color: transparent !important;
    color: var(--report-primary) !important;
}

#auswertungTable tbody tr:hover td:first-child {
    border-left: 4px solid var(--report-primary) !important;
}


/* ========================================================
   5. GENERAL TYPOGRAPHY AND ANIMATION RESETS
   ======================================================== */

body {
    font-family: 'Outfit', sans-serif;
}

/* Keyframe animations */
@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
    .report-container {
        padding: 1.75rem;
    }
    
    .report-container .report-header .report-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-container .report-header .report-form button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .report-container h1 {
        font-size: 1.8rem;
    }
    
    .report-container .report-body .report-table tr th, 
    .report-container .report-body .report-table tr td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
}