/**
 * Accounting Report Admin Styles
 */

/* General Styles */
.accounting-report-wrap {
    margin: 20px 20px 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.ar-page-title {
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ar-page-title .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #030ffc;
}

/* Statistics Cards */
.ar-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ar-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(3, 15, 252, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 2px solid #03f4fc;
}

.ar-stat-card:hover {
    box-shadow: 0 4px 12px rgba(3, 15, 252, 0.2);
    transform: translateY(-2px);
    border-color: #030ffc;
}

.ar-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #030ffc 0%, #03f4fc 100%);
}

.ar-stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: white;
}

.ar-stat-content {
    flex: 1;
}

.ar-stat-content h3 {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.ar-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    line-height: 1;
}

.ar-stat-change {
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

.ar-stat-change.positive {
    color: #030ffc;
}

.ar-stat-change.negative {
    color: #ff0000;
}

/* Charts Row */
.ar-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.ar-chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.ar-chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.ar-chart-card canvas {
    max-height: 300px;
}

/* Activity Card */
.ar-activity-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.ar-activity-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

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

.ar-activity-item td {
    padding: 16px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.ar-activity-item:last-child td {
    border-bottom: none;
}

.ar-activity-badge {
    width: 100px;
}

.ar-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.ar-badge-donation {
    background: #d1fae5;
    color: #059669;
}

.ar-badge-expense {
    background: #fee2e2;
    color: #dc2626;
}

.ar-activity-description {
    font-size: 14px;
    color: #1e293b;
}

.ar-activity-description small {
    color: #64748b;
    font-size: 12px;
}

.ar-activity-amount {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    white-space: nowrap;
}

.ar-activity-status {
    text-align: right;
    width: 120px;
}

.ar-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.ar-status-completed {
    background: #03f4fc;
    color: #000000;
}

.ar-status-approved {
    background: #030ffc;
    color: white;
}

.ar-status-pending {
    background: #fef3c7;
    color: #d97706;
}

.ar-status-rejected {
    background: #ff0000;
    color: white;
}

.ar-status-active {
    background: #030ffc;
    color: white;
}

.ar-status-inactive {
    background: #666666;
    color: white;
}

/* Tables */
.ar-table-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(3, 15, 252, 0.1);
    border: 2px solid #03f4fc;
}

.ar-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ar-table-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.ar-table-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ar-filter-input,
.ar-filter-select,
.ar-filter-date {
    padding: 10px 16px;
    border: 2px solid #03f4fc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.ar-filter-input:focus,
.ar-filter-select:focus,
.ar-filter-date:focus {
    border-color: #030ffc;
    box-shadow: 0 0 0 3px rgba(3, 15, 252, 0.1);
}

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

.ar-data-table thead {
    background: linear-gradient(135deg, #030ffc 0%, #03f4fc 100%);
    color: white;
}

.ar-data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ar-data-table tbody tr {
    border-bottom: 1px solid #03f4fc;
    transition: background 0.2s;
}

.ar-data-table tbody tr:hover {
    background: rgba(3, 244, 252, 0.1);
}

.ar-data-table td {
    padding: 16px;
    font-size: 14px;
    color: #000000;
}

/* Buttons */
.ar-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ar-btn-primary {
    background: #030ffc;
    color: white;
}

.ar-btn-primary:hover {
    background: #0208c9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 15, 252, 0.3);
}

.ar-btn-success {
    background: #03f4fc;
    color: #000000;
}

.ar-btn-success:hover {
    background: #02c4cc;
}

.ar-btn-danger {
    background: #ff0000;
    color: white;
}

.ar-btn-danger:hover {
    background: #cc0000;
}

.ar-btn-secondary {
    background: #666666;
    color: white;
}

.ar-btn-secondary:hover {
    background: #000000;
}

.ar-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Action Buttons */
.ar-actions {
    display: flex;
    gap: 8px;
}

.ar-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ar-action-view {
    background: #03f4fc;
    color: #000000;
}

.ar-action-view:hover {
    background: #02c4cc;
    transform: scale(1.1);
}

.ar-action-edit {
    background: #030ffc;
    color: white;
}

.ar-action-edit:hover {
    background: #0208c9;
    transform: scale(1.1);
}

.ar-action-delete {
    background: #ff0000;
    color: white;
}

.ar-action-delete:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Modal */
.ar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.ar-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ar-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(3, 15, 252, 0.3);
    border: 3px solid #03f4fc;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ar-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #03f4fc;
}

.ar-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.ar-modal-close {
    background: #ff0000;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.ar-modal-close:hover {
    background: #cc0000;
    transform: rotate(90deg);
}

.ar-form-group {
    margin-bottom: 20px;
}

.ar-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.ar-form-label.required:after {
    content: ' *';
    color: #ff0000;
}

.ar-form-input,
.ar-form-select,
.ar-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #03f4fc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.ar-form-input:focus,
.ar-form-select:focus,
.ar-form-textarea:focus {
    border-color: #030ffc;
    box-shadow: 0 0 0 3px rgba(3, 15, 252, 0.1);
}

.ar-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.ar-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ar-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #03f4fc;
}

/* Confirm Dialog */
.ar-confirm-dialog {
    padding: 24px;
    max-width: 400px;
}

.ar-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 12px 0;
}

.ar-confirm-message {
    font-size: 14px;
    color: #666666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* Success/Error Messages */
.ar-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ar-message-success {
    background: #03f4fc;
    color: #000000;
    border: 2px solid #030ffc;
}

.ar-message-error {
    background: #ff0000;
    color: white;
    border: 2px solid #cc0000;
}

.ar-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .ar-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ar-stats-container {
        grid-template-columns: 1fr;
    }
    
    .ar-form-row {
        grid-template-columns: 1fr;
    }
    
    .ar-table-filters {
        flex-direction: column;
    }
    
    .ar-data-table {
        font-size: 12px;
    }
    
    .ar-data-table th,
    .ar-data-table td {
        padding: 10px 8px;
    }
}

/* Loading Spinner */
.ar-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: ar-spin 0.8s linear infinite;
}

@keyframes ar-spin {
    to { transform: rotate(360deg); }
}

/* Toggle Switch */
.ar-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.ar-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ar-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.ar-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ar-toggle input:checked + .ar-toggle-slider {
    background-color: #3b82f6;
}

.ar-toggle input:checked + .ar-toggle-slider:before {
    transform: translateX(24px);
}

/* === v7 ADDITIONS === */

/* Cashbook styles */
.ar-cashbook-table { font-size: 12px !important; }
.ar-cashbook-table th, .ar-cashbook-table td { padding: 5px 7px !important; }

/* Financial statement tables */
.ar-fp-table, .ar-activities-table { border-collapse: collapse; width: 100%; }
.ar-fp-table th, .ar-fp-table td, .ar-activities-table th, .ar-activities-table td { 
    padding: 8px 12px; border-bottom: 1px solid #eee; 
}
.ar-fp-grand-total td { 
    background: #03f4fc; 
    font-weight: 700; 
    font-size: 14px; 
    border-top: 3px double #000; 
}

/* Report header */
.ar-report-header { text-align: center; }

/* Notes page */
.ar-note-section h4 { 
    background: #f0f0f0; 
    padding: 10px 15px; 
    border-left: 4px solid #030ffc; 
    margin: 0 0 15px; 
    font-size: 14px; 
    text-transform: uppercase; 
}

/* Settings tabs */
.ar-settings-tabs { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 0; 
    border-bottom: 2px solid #03f4fc; 
    padding-bottom: 0;
}
.ar-tab-btn { 
    padding: 10px 20px; 
    border: 2px solid #03f4fc; 
    background: #fff; 
    color: #000; 
    cursor: pointer; 
    border-radius: 8px 8px 0 0; 
    font-weight: 600; 
    transition: all 0.2s; 
    border-bottom: none;
}
.ar-tab-btn.active { background: #03f4fc; color: #000; }

/* Category rows in settings */
.ar-cat-row { 
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
    padding: 12px; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    background: #fafafa; 
}
.ar-cat-name { flex: 0 0 280px; }
.ar-cat-books { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; padding-top: 8px; }
.ar-check-label { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 12px; 
    cursor: pointer; 
    white-space: nowrap; 
    padding: 3px 8px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    background: white; 
}
.ar-check-label:has(input:checked) { 
    background: rgba(3,244,252,0.2); 
    border-color: #03f4fc; 
}
.ar-btn-sm { padding: 5px 8px !important; font-size: 12px !important; }

/* Wizard cards */
.ar-wizard-card { border: 2px solid #03f4fc; border-radius: 12px; padding: 15px; background: #fff; transition: all 0.2s; }
.ar-wizard-card:hover { box-shadow: 0 4px 12px rgba(3,15,252,0.15); }

/* Print styles for all financial statements */
@media print {
    .accounting-report-wrap .ar-table-card:first-of-type { display: none !important; }
    .ar-page-title { display: none !important; }
    .ar-btn { display: none !important; }
    body { font-size: 11px; }
    .ar-fp-grand-total td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Section headers in cashflow/activities */
.ar-cf-section-header td, .ar-act-section-header td {
    background: #f8f8f8 !important;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px !important;
    border-top: 2px solid #03f4fc;
    color: #030ffc;
}

/* Green export button */
.ar-btn-success {
    background: linear-gradient(135deg, #00aa44, #00cc55);
    color: #fff !important;
    border: none;
}
.ar-btn-success:hover {
    background: linear-gradient(135deg, #009933, #00bb44);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,170,68,0.3);
}
/* Ratios table */
#ratiosResultTable th, #ratiosResultTable td { padding: 8px 10px; font-size: 12px; }
#ratiosResultTable tbody tr:hover { background: rgba(3,244,252,0.08) !important; }
