/**
 * VAT Returns Module Styles
 * Professional styling for Oman VAT quarterly returns
 */

/* ============================================================================
   Period Info Banner
   ============================================================================ */
.period-info-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.period-info-banner i {
    font-size: 1.5rem;
}

/* ============================================================================
   Filter Panel & Groups - Enhanced Styling
   ============================================================================ */
.filter-panel {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(0, 137, 123, 0.08) 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 700;
    color: #667eea;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #00897b 100%);
    border-radius: 50%;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: #00897b;
    box-shadow: 0 4px 8px rgba(0, 137, 123, 0.2);
    background: #f0f9ff;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: #f0f9ff;
}

.filter-group .btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filter-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.filter-group .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* ============================================================================
   VAT Return Form Section
   ============================================================================ */
.vat-return-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.vat-return-form h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.vat-section {
    margin-bottom: 2rem;
}

.vat-section h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

/* ============================================================================
   VAT Boxes Grid
   ============================================================================ */
.vat-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.vat-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.vat-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.vat-box-label {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.vat-box-title {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
    line-height: 1.3;
}

.vat-box-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

/* Highlighted VAT boxes */
.vat-box-value.highlight-output {
    color: #dc3545;
    font-size: 1.75rem;
}

.vat-box-value.highlight-input {
    color: #28a745;
    font-size: 1.75rem;
}

/* Total boxes */
.vat-box.total-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #adb5bd;
}

.vat-box.total-box .vat-box-label {
    background: #495057;
}

/* Net VAT box - special styling */
.vat-box.net-vat-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 3px solid #ffc107;
    grid-column: span 1;
}

.vat-box.net-vat-box .vat-box-label {
    background: #ff9800;
}

.vat-box.net-vat-box .vat-box-value {
    font-size: 2rem;
    color: #ff6b6b;
}

.vat-box.net-vat-box.payable {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #e53935;
}

.vat-box.net-vat-box.payable .vat-box-value {
    color: #c62828;
}

.vat-box.net-vat-box.refundable {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #43a047;
}

.vat-box.net-vat-box.refundable .vat-box-value {
    color: #2e7d32;
}

/* ============================================================================
   Transaction Details Section
   ============================================================================ */
.vat-details-section {
    margin-top: 2rem;
}

.vat-details-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.details-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.details-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.details-card h3 i {
    color: var(--primary-color);
}

/* Table styling for transaction details */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

#outputVatTable,
#inputVatTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#outputVatTable thead,
#inputVatTable thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a67d8 100%);
    color: white;
}

#outputVatTable th,
#inputVatTable th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#outputVatTable tbody tr,
#inputVatTable tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

#outputVatTable tbody tr:hover,
#inputVatTable tbody tr:hover {
    background-color: #f8f9fa;
}

#outputVatTable td,
#inputVatTable td {
    padding: 0.75rem;
    color: var(--text-color);
}

#outputVatTable tfoot,
#inputVatTable tfoot {
    background: #f8f9fa;
    font-weight: bold;
    border-top: 3px solid var(--primary-color);
}

#outputVatTable tfoot td,
#inputVatTable tfoot td {
    padding: 1rem 0.75rem;
    font-size: 1rem;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem !important;
}

/* ============================================================================
   Badges for Transaction Types
   ============================================================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

.badge-standard {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-zero {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-exempt {
    background: #fff3e0;
    color: #e65100;
}

.badge-Invoice {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-Receipt {
    background: #e1f5fe;
    color: #0277bd;
}

.badge-Expense {
    background: #fce4ec;
    color: #c2185b;
}

/* ============================================================================
   Print Styles (for PDF export)
   ============================================================================ */
@media print {
    body {
        background: white;
    }
    
    .navbar,
    .filter-panel,
    .btn,
    button {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        margin: 0;
    }
    
    .vat-return-form,
    .details-card {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .period-info-banner {
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .vat-box {
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    thead {
        display: table-header-group;
    }
    
    tfoot {
        display: table-footer-group;
    }
}

/* ============================================================================
   Button Styles - Professional Action Buttons
   ============================================================================ */

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3a8a 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #00897b 0%, #26a69a 100%);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #00796b 0%, #009688 100%);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.35);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 137, 123, 0.2);
}

/* Icon styling in buttons */
.btn-primary i,
.btn-secondary i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-primary:hover i,
.btn-secondary:hover i {
    transform: scale(1.1);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */
@media (max-width: 768px) {
    .vat-boxes {
        grid-template-columns: 1fr;
    }
    
    .vat-return-form {
        padding: 1rem;
    }
    
    .details-card {
        padding: 1rem;
    }
    
    .vat-box-value {
        font-size: 1.25rem;
    }
    
    .vat-box-value.highlight-output,
    .vat-box-value.highlight-input {
        font-size: 1.5rem;
    }
    
    .vat-box.net-vat-box .vat-box-value {
        font-size: 1.75rem;
    }
    
    .period-info-banner {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    #outputVatTable,
    #inputVatTable {
        font-size: 0.8rem;
    }
    
    #outputVatTable th,
    #outputVatTable td,
    #inputVatTable th,
    #inputVatTable td {
        padding: 0.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 18px;
        font-size: 14px;
        gap: 8px;
    }

    .btn-primary i,
    .btn-secondary i {
        font-size: 14px;
    }

    .filter-panel {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .vat-box-title {
        font-size: 0.8rem;
        min-height: auto;
    }
    
    .table-container {
        font-size: 0.75rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 14px;
        font-size: 12px;
        gap: 6px;
    }

    .btn-primary i,
    .btn-secondary i {
        font-size: 12px;
    }

    .filter-panel {
        border-radius: 8px;
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .filter-group label {
        font-size: 0.85rem;
    }

    .filter-group select,
    .filter-group input {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .filter-group .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
