/*
 * BizFlow Reports Dashboard Styles
 * Complete styling for reports management
 */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Layout */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar (using existing styles) */
.sidebar {
    width: 220px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    padding: 1.5rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: -1px;
    margin-bottom: 0;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
    color: #000000;
    width: 100%;
    box-sizing: border-box;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-left-color: #000000;
    transform: translateX(5px);
    text-decoration: none;
}

.nav-item.active .nav-link {
    background-color: rgba(0, 0, 0, 0.15);
    border-left-color: #000000;
    transform: translateX(5px);
}

.nav-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    color: #000000;
    transition: transform 0.15s ease;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    transition: color 0.15s ease;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #000000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Reports Header */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title-section h1 {
    font-size: 3rem;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.page-subtitle {
    color: #888888;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.reports-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

.btn-secondary {
    background: #333333;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #555555;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

.btn-icon {
    font-size: 1rem;
}

/* Report Categories */
.report-categories {
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: #555555;
    border-color: #f1c40f;
}

.tab-btn.active {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    border-color: #f1c40f;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 3rem;
}

.quick-actions-section h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quick-action-card {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    border-color: #f1c40f;
}

.quick-action-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.quick-action-content {
    flex: 1;
}

.quick-action-content h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.quick-action-content p {
    color: #888888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
}

.section-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    background-color: #333333;
    border: 1px solid #555555;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #f1c40f;
}

.filter-select option {
    background-color: #333333;
    color: #ffffff;
}

/* Reports Table */
.reports-table-container {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333333;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #333333;
}

.reports-table th {
    background-color: #333333;
    font-weight: 500;
    color: #ffffff;
    font-size: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-table td {
    color: #ffffff;
    font-size: 1rem;
    vertical-align: middle;
}

.reports-table tbody tr {
    transition: background-color 0.15s ease;
}

.reports-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.reports-table tbody tr:last-child td {
    border-bottom: none;
}

/* Report Status Indicators */
.report-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    min-width: 80px;
}

.report-status.completed {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.report-status.generating {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.report-status.scheduled {
    background-color: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.report-status.failed {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
    font-weight: 500;
    min-width: 35px;
    text-align: center;
}

.action-btn.view {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.action-btn.download {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.action-btn.delete {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.action-btn:hover {
    transform: scale(1.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #555555;
    background-color: #333333;
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    min-width: 35px;
    text-align: center;
}

.page-btn:hover {
    background-color: #555555;
    border-color: #f1c40f;
}

.page-btn.active {
    background-color: #f1c40f;
    color: #000000;
    border-color: #f1c40f;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scheduled Reports Grid */
.scheduled-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.scheduled-report-card {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scheduled-report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.scheduled-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.scheduled-report-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.schedule-frequency {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.scheduled-report-details {
    color: #888888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.scheduled-report-actions {
    display: flex;
    gap: 0.5rem;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.template-card {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    border-color: #f1c40f;
}

.template-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.template-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.template-info h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.template-type {
    color: #888888;
    font-size: 0.9rem;
}

.template-description {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.template-usage {
    color: #f1c40f;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border: 1px solid #555555;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 1000px;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.15s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    background-color: #333333;
    border: 1px solid #555555;
    border-radius: 8px;
    padding: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.form-input option {
    background-color: #333333;
    color: #ffffff;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.checkbox-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    accent-color: #f1c40f;
}

.checkbox-item span {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333333;
}

/* Progress Modal */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #333333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background-color: #333333;
    border-radius: 6px;
    color: #888888;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.completed {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.step.active {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

/* Report Preview */
.report-preview-container {
    background-color: #000000;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #333333;
    min-height: 400px;
    color: #ffffff;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888888;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scheduled-reports-grid,
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        overflow-x: auto;
        padding: 1rem 0;
    }

    .nav-menu {
        display: flex;
        white-space: nowrap;
        padding: 0 1rem;
        gap: 0.25rem;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.5rem;
        min-width: 80px;
        text-align: center;
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .nav-item:hover,
    .nav-item.active {
        border-left: none;
        border-bottom-color: #000000;
        transform: translateY(-3px);
    }

    .nav-icon {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }

    .reports-header {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-actions {
        justify-content: stretch;
    }

    .reports-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .quick-actions-grid,
    .scheduled-reports-grid,
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .reports-table-container {
        overflow-x: auto;
    }

    .reports-table {
        min-width: 800px;
    }

    .page-title-section h1 {
        font-size: 2rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: center;
    }

    .quick-action-card {
        padding: 1rem;
    }

    .scheduled-report-card,
    .template-card {
        padding: 1rem;
    }

    .progress-steps {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step {
        padding: 0.75rem;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .reports-actions,
    .action-buttons,
    .pagination,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .reports-table-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .reports-table th,
    .reports-table td {
        border: 1px solid #ccc;
        padding: 0.5rem;
        color: #000;
    }

    .quick-action-card,
    .scheduled-report-card,
    .template-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {

    .quick-action-card,
    .scheduled-report-card,
    .template-card,
    .reports-table-container,
    .modal-content {
        border-width: 2px;
    }

    .report-status,
    .action-btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .quick-action-card,
    .scheduled-report-card,
    .template-card,
    .btn,
    .action-btn,
    .tab-btn {
        transition: none;
    }

    .quick-action-card:hover,
    .scheduled-report-card:hover,
    .template-card:hover,
    .btn:hover {
        transform: none;
    }

    .progress-fill {
        transition: none;
    }
}