﻿/* ===== DAILYREPORT.CSS - DAILY REPORTS DASHBOARD COMPONENTS ONLY ===== */
/* Note: All CRUD card/grid/form layouts moved to create.css */
/* Only contains components unique to Daily Reports Dashboard that aren't covered by create.css */

/* ===== DAILY REPORTS DASHBOARD HEADER ===== */
.dailyreports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .dailyreports-header h1 {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1e293b;
    }

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== FILTERS BAR - UNIQUE TO REPORTS DASHBOARD ===== */
.filters-bar {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-form {
    width: 100%;
}

.filters-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto auto;
    gap: 16px;
    align-items: center;
}

/* ===== PERIOD TABS - DATE FILTERING COMPONENT ===== */
.period-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.period-tab {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .period-tab.active {
        background: white;
        color: #1e293b;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .period-tab:hover:not(.active) {
        background: rgba(255, 255, 255, 0.7);
    }

/* ===== DATE INPUTS - CUSTOM DATE RANGE SELECTION ===== */
.date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-separator {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

/* ===== HELP BUTTON - DASHBOARD SPECIFIC ===== */
.help-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    transition: all 0.2s ease;
}

    .help-btn:hover {
        background: #1e293b;
        color: white;
        border-color: #1e293b;
    }

/* ===== ACTIONS - FILTER CONTROLS ===== */
.actions {
    display: flex;
    gap: 8px;
}

/* ===== QUICK ACTIONS - SEASONAL NAVIGATION ===== */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-action {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

    .quick-action:hover {
        background: #1e293b;
        color: white;
        border-color: #1e293b;
        text-decoration: none;
    }

/* ===== MAIN GRID - DASHBOARD LAYOUT ===== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-bottom: 20px;
}

/* ===== CHARTS SECTION - DATA VISUALIZATION ===== */
.charts-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.charts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.charts-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.view-options {
    display: flex;
    gap: 4px;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: #f1f5f9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    transition: all 0.2s ease;
}

    .view-btn.active {
        background: white;
        color: #1e293b;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

.chart-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.chart-tab {
    padding: 6px 12px;
    border: none;
    background: #f1f5f9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    transition: all 0.2s ease;
}

    .chart-tab.active {
        background: #3b82f6;
        color: white;
    }

    .chart-tab:hover:not(.active) {
        background: #e2e8f0;
    }

.charts-section .chart-container {
    height: 400px;
    position: relative;
}

.chart-panel {
    display: none;
    height: 100%;
}

    .chart-panel.active {
        display: block;
    }

/* ===== METRICS SECTION - SIDEBAR METRICS ===== */
.metrics-section {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
}

.metrics-header {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.metrics-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.period-info {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

/* ===== REPORTS SECTION - REPORT LISTING ===== */
.reports-section {
    grid-column: 1 / -1;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: white;
    padding: 10px 20px;
    border-radius: 12px;
}

.reports-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
}

    .view-toggle .view-btn {
        padding: 6px 12px;
        border: none;
        background: transparent;
        border-radius: 4px;
        cursor: pointer;
        font-size: 11px;
        color: #64748b;
        transition: all 0.2s ease;
    }

        .view-toggle .view-btn.active {
            background: white;
            color: #1e293b;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }

/* ===== DASHBOARD SPECIFIC REPORT CARDS ===== */
/* These are unique to dashboard display, different from CRUD cards */
.dashboard-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dashboard-report-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .dashboard-report-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.dashboard-card-header {
    background: #e2e8f0;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dashboard-report-date {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    margin-bottom: 2px;
    line-height: 1.3;
}

.dashboard-account-name {
    font-size: 1em;
    font-weight: 500;
    color: #64748b;
}

.dashboard-card-metrics {
    padding: 16px;
}

.dashboard-card-actions {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dashboard-metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

    .dashboard-metric-row:last-child {
        margin-bottom: 0;
    }

.dashboard-metric {
    text-align: center;
}

.dashboard-metric-label {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-metric-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

    .dashboard-metric-value.primary {
        color: #3b82f6;
    }

    .dashboard-metric-value.success {
        color: #059669;
    }

    .dashboard-metric-value.warning {
        color: #d97706;
    }

    .dashboard-metric-value.error {
        color: #dc2626;
    }

/* ===== DASHBOARD METRICS GRID (SIDEBAR) ===== */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.dashboard-metric-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

    .dashboard-metric-card:hover {
        transform: translateY(-1px);
    }

    .dashboard-metric-card .dashboard-metric-label {
        font-size: 11px;
        color: #64748b;
        font-weight: 500;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .dashboard-metric-card .dashboard-metric-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 4px;
    }

.dashboard-metric-sub {
    font-size: 10px;
    color: #94a3b8;
}

/* ===== LIST VIEW STYLES - ALTERNATIVE REPORT DISPLAY ===== */
.dashboard-reports-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .dashboard-reports-grid.list-view .dashboard-report-card {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 12px 16px;
        gap: 30px;
    }

    .dashboard-reports-grid.list-view .dashboard-card-metrics {
        padding: 0;
        display: flex;
        gap: 30px;
        align-items: center;
    }

    .dashboard-reports-grid.list-view .dashboard-metric-row {
        display: flex;
        gap: 24px;
        margin: 0;
        align-items: center;
    }

    .dashboard-reports-grid.list-view .dashboard-metric {
        text-align: left;
        min-width: 80px;
    }

    .dashboard-reports-grid.list-view .dashboard-metric-label {
        margin-bottom: 2px;
    }

/* ===== COMPARISON MODAL - REPORT COMPARISON FUNCTIONALITY ===== */
.comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    max-width: 600px;
    margin: 5% auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
        color: #1e293b;
    }

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.1);
    }

.modal-body {
    padding: 0;
}

.modal-tabs {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.modal-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

    .modal-tab.active {
        background: white;
        color: #1e293b;
        border-bottom-color: #3b82f6;
        font-weight: 500;
    }

    .modal-tab:hover:not(.active) {
        background: rgba(255, 255, 255, 0.7);
    }

.tab-content {
    display: none;
    padding: 20px 24px;
    max-height: 400px;
    overflow-y: auto;
}

    .tab-content.active {
        display: block;
    }

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

    .tab-header p {
        margin: 0;
        color: #64748b;
        font-size: 14px;
    }

.selection-count {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 500;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .checkbox-item:hover {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.05);
    }

    .checkbox-item input[type="checkbox"] {
        margin-right: 10px;
        transform: scale(1.1);
    }

.checkbox-label {
    flex: 1;
}

    .checkbox-label strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
    }

    .checkbox-label small {
        color: #64748b;
        font-size: 12px;
    }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Button Compare Modal */
.btn-compare-cancel, .btn-compare-data {
    padding: 7px 14px;
    border: thin solid #eee;
    border-radius: 7px;
}

    .btn-compare-cancel:hover, .btn-compare-data:hover {
        background: #ddd;
    }

/* ===== PAGINATION SECTION - REPORT NAVIGATION ===== */
.pagination-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pagination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    gap: 0.5rem;
}

.records-info {
    font-weight: 500;
    color: #334155;
}

.comparison-info, .filter-info {
    font-style: italic;
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

    .pagination-btn:hover:not(.disabled) {
        background: #f3f4f6;
        border-color: #9ca3af;
        color: #111827;
    }

    .pagination-btn.disabled {
        background: #f9fafb;
        color: #9ca3af;
        cursor: not-allowed;
    }

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

    .page-btn:hover:not(.current) {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .page-btn.current {
        background: #3b82f6;
        border-color: #3b82f6;
        color: white;
        font-weight: 600;
    }

.page-ellipsis {
    padding: 0 0.5rem;
    color: #9ca3af;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

    .page-size-selector select {
        padding: 0.25rem 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        background: white;
        color: #374151;
    }

/* ===== DAILY REPORTS RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .charts-section {
        order: -1;
    }
}

@media (max-width: 768px) {
    .dailyreports-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .filters-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .period-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .date-inputs {
        justify-content: center;
    }

    .actions {
        justify-content: center;
    }

    .charts-section .chart-container {
        height: 240px;
    }

    .quick-actions {
        justify-content: center;
    }

    .charts-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .reports-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .modal-content {
        margin: 10px;
        max-width: none;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-report-date {
        font-size: 12px;
        line-height: 1.2;
    }

    .pagination-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-info {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .dashboard-reports-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .period-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .period-tab {
        text-align: center;
    }

    .date-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .chart-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .view-options,
    .view-toggle {
        justify-content: center;
    }
}

/* ===== DAILY REPORTS PRINT STYLES ===== */
@media print {
    .filters-bar,
    .quick-actions,
    .charts-header .view-options,
    .reports-header .view-toggle,
    .modal-content,
    .pagination-section {
        display: none;
    }

    .reports-section {
        margin-bottom: 0;
    }

    .charts-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .dashboard-report-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
