﻿.tax-page {
    --tax-primary: #2563eb;
    --tax-primary-dark: #1d4ed8;
    --tax-text: #172033;
    --tax-muted: #748096;
    --tax-border: #e2e8f0;
    --tax-background: #f6f8fc;
    --tax-danger: #dc2626;
    padding: 24px;
    min-height: 100vh;
    background: var(--tax-background);
    color: var(--tax-text);
}

    .tax-page *,
    .tax-modal-backdrop * {
        box-sizing: border-box;
    }

.tax-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .tax-page-header h2 {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 5px;
        font-size: 26px;
        font-weight: 750;
        color: var(--tax-text);
    }

        .tax-page-header h2 i {
            color: var(--tax-primary);
        }

    .tax-page-header p {
        margin: 0;
        font-size: 14px;
        color: var(--tax-muted);
    }

.tax-btn-primary,
.tax-btn-secondary {
    min-height: 43px;
    padding: 0 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: .2s ease;
}

.tax-btn-primary {
    background: var(--tax-primary);
    color: #fff;
    box-shadow: 0 7px 16px rgba(37, 99, 235, .17);
}

    .tax-btn-primary:hover {
        background: var(--tax-primary-dark);
        transform: translateY(-1px);
    }

    .tax-btn-primary:disabled {
        opacity: .65;
        cursor: not-allowed;
        transform: none;
    }

.tax-btn-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}

    .tax-btn-secondary:hover {
        background: #f8fafc;
    }

.tax-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tax-summary-card {
    min-width: 0;
    min-height: 120px;
    padding: 18px;
    border: 1px solid var(--tax-border);
    border-radius: 13px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    cursor: pointer;
    transition: .2s ease;
}

    .tax-summary-card:hover {
        border-color: #bfdbfe;
        box-shadow: 0 10px 25px rgba(15, 23, 42, .07);
        transform: translateY(-2px);
    }

.tax-summary-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

    .tax-summary-icon.blue {
        background: #eaf2ff;
        color: #2563eb;
    }

    .tax-summary-icon.green {
        background: #e7f8ef;
        color: #169c58;
    }

    .tax-summary-icon.purple {
        background: #f0eaff;
        color: #7c3aed;
    }

    .tax-summary-icon.orange {
        background: #fff3e4;
        color: #ea7a16;
    }

.tax-summary-card span,
.tax-summary-card small {
    display: block;
}

.tax-summary-card span {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.tax-summary-card strong {
    display: block;
    margin-bottom: 2px;
    font-size: 25px;
    line-height: 1.1;
    color: #172033;
}

.tax-summary-card small {
    color: #94a3b8;
    font-size: 12px;
}

.tax-content-card {
    border: 1px solid var(--tax-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .035);
    overflow: hidden;
}

.tax-filter-area {
    padding: 17px;
    border-bottom: 1px solid var(--tax-border);
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 220px 160px;
    gap: 12px;
}

.tax-search-box {
    position: relative;
}

    .tax-search-box i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
    }

    .tax-search-box input,
    .tax-filter-area select,
    .tax-form-group input,
    .tax-form-group select,
    .tax-form-group textarea {
        width: 100%;
        min-height: 43px;
        border: 1px solid #d8e0eb;
        border-radius: 9px;
        background: #fff;
        color: #263247;
        font-size: 14px;
        outline: none;
        transition: .2s ease;
    }

    .tax-search-box input {
        padding: 0 14px 0 40px;
    }

.tax-filter-area select,
.tax-form-group select {
    padding: 0 12px;
}

.tax-form-group input {
    padding: 0 13px;
}

.tax-form-group textarea {
    padding: 11px 13px;
    resize: vertical;
}

    .tax-search-box input:focus,
    .tax-filter-area select:focus,
    .tax-form-group input:focus,
    .tax-form-group select:focus,
    .tax-form-group textarea:focus {
        border-color: #73a4ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
    }

.tax-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.tax-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

    .tax-table th,
    .tax-table td {
        padding: 14px 15px;
        border-bottom: 1px solid #edf1f6;
        text-align: left;
        vertical-align: middle;
        font-size: 13px;
    }

    .tax-table th {
        background: #f8fafc;
        color: #657187;
        font-size: 12px;
        font-weight: 750;
        text-transform: uppercase;
        letter-spacing: .025em;
        white-space: nowrap;
    }

    .tax-table tbody tr:hover {
        background: #fbfdff;
    }

.tax-document-name {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.tax-file-badge {
    flex: 0 0 38px;
    width: 38px;
    height: 42px;
    border-radius: 8px;
    background: #eaf2ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tax-document-name strong,
.tax-user-info strong {
    display: block;
    color: #263247;
    font-size: 13px;
    font-weight: 700;
}

.tax-document-name small,
.tax-user-info small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 11px;
}

.tax-category-badge,
.tax-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 650;
}

.tax-category-badge {
    background: #eef4ff;
    color: #315ca8;
}

.tax-type-badge {
    background: #edf8f2;
    color: #16804a;
}

.tax-file-count {
    border: 0;
    padding: 6px 9px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
}

    .tax-file-count:hover {
        background: #e2e8f0;
    }

.tax-action-column {
    width: 130px;
}

.tax-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

    .tax-actions button {
        width: 34px;
        height: 34px;
        border: 1px solid #dfe6ef;
        border-radius: 7px;
        background: #fff;
        color: #66748a;
        cursor: pointer;
        transition: .2s ease;
    }

        .tax-actions button:hover {
            border-color: #93b8ff;
            color: #2563eb;
            background: #f5f8ff;
        }

        .tax-actions button.danger:hover {
            border-color: #fecaca;
            background: #fff5f5;
            color: #dc2626;
        }

.tax-empty-state {
    min-height: 210px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
}

    .tax-empty-state i {
        margin-bottom: 13px;
        font-size: 42px;
        color: #cbd5e1;
    }

    .tax-empty-state strong {
        margin-bottom: 5px;
        color: #536177;
        font-size: 15px;
    }

    .tax-empty-state span {
        font-size: 13px;
    }

.tax-pagination-area {
    padding: 14px 17px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
}

    .tax-pagination-area > span {
        color: #7c8799;
        font-size: 12px;
    }

.tax-pagination {
    display: flex;
    gap: 4px;
}

    .tax-pagination button {
        min-width: 33px;
        height: 33px;
        padding: 0 8px;
        border: 1px solid #dfe6ef;
        border-radius: 7px;
        background: #fff;
        color: #5f6c80;
        cursor: pointer;
    }

        .tax-pagination button.active {
            border-color: #2563eb;
            background: #2563eb;
            color: #fff;
        }

        .tax-pagination button:disabled {
            opacity: .45;
            cursor: not-allowed;
        }

.tax-pagination-area select {
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid #dfe6ef;
    border-radius: 7px;
    background: #fff;
    color: #5f6c80;
    font-size: 12px;
}

.tax-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    padding: 28px;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tax-upload-modal,
.tax-file-modal {
    width: min(960px, 100%);
    margin: auto;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .3);
    overflow: hidden;
}

.tax-file-modal {
    width: min(650px, 100%);
}

.tax-modal-header {
    padding: 20px 22px;
    border-bottom: 1px solid #e5eaf1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

    .tax-modal-header h3 {
        margin: 0 0 4px;
        color: #172033;
        font-size: 20px;
        font-weight: 750;
    }

    .tax-modal-header p {
        margin: 0;
        color: #7c8799;
        font-size: 13px;
    }

    .tax-modal-header > button {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 8px;
        background: #f1f5f9;
        color: #64748b;
        cursor: pointer;
    }

.tax-modal-body {
    padding: 22px;
}

.tax-modal-footer {
    padding: 16px 22px;
    border-top: 1px solid #e5eaf1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

    .tax-modal-footer .tax-btn-primary {
        min-width: 180px;
        min-height: 48px;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px;
        border: 1px solid #2563eb !important;
        border-radius: 10px;
        background-color: #2563eb !important;
        background-image: none !important;
        color: #ffffff !important;
        font-size: 14px;
        font-weight: 700;
        opacity: 1;
        visibility: visible;
        cursor: pointer;
    }

        .tax-modal-footer .tax-btn-primary span,
        .tax-modal-footer .tax-btn-primary i {
            display: inline-block !important;
            color: #ffffff !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        .tax-modal-footer .tax-btn-primary:hover {
            background-color: #1d4ed8 !important;
            border-color: #1d4ed8 !important;
        }

        .tax-modal-footer .tax-btn-primary:disabled {
            background-color: #93b4f8 !important;
            border-color: #93b4f8 !important;
            color: #ffffff !important;
            opacity: 0.75 !important;
        }

.tax-form-group {
    margin-bottom: 17px;
}

    .tax-form-group > label,
    .tax-selected-file-section > label {
        display: block;
        margin-bottom: 7px;
        color: #354157;
        font-size: 13px;
        font-weight: 700;
    }

        .tax-form-group > label span {
            color: #dc2626;
        }

.tax-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.tax-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tax-category-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.tax-type-option,
.tax-category-option {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    background: #fff;
    color: #59677c;
    display: flex;
    align-items: center;
    gap: 11px;
    text-align: left;
    cursor: pointer;
    transition: .2s ease;
}

    .tax-type-option:hover,
    .tax-category-option:hover {
        border-color: #9abaff;
        background: #fbfdff;
    }

    .tax-type-option.selected,
    .tax-category-option.selected {
        border-color: #2563eb;
        background: #f4f8ff;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, .07);
    }

    .tax-type-option > i,
    .tax-category-option > i {
        flex: 0 0 27px;
        color: #64748b;
        font-size: 21px;
        text-align: center;
    }

    .tax-type-option.selected > i,
    .tax-category-option.selected > i {
        color: #2563eb;
    }

    .tax-type-option strong,
    .tax-category-option strong {
        display: block;
        color: #354157;
        font-size: 13px;
    }

    .tax-type-option small,
    .tax-category-option small {
        display: block;
        margin-top: 3px;
        color: #8b96a7;
        font-size: 10px;
        line-height: 1.4;
    }

.tax-upload-zone {
    position: relative;
    min-height: 220px;
    border: 1.5px dashed #82aaff;
    border-radius: 12px;
    background: #fbfdff;
    overflow: hidden;
}

.tax-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tax-upload-content {
    min-height: 220px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tax-upload-icon {
    margin-bottom: 11px;
    color: #2563eb;
    font-size: 38px;
}

.tax-upload-content > strong {
    margin-bottom: 5px;
    color: #29364c;
    font-size: 16px;
}

.tax-upload-content > span {
    margin-bottom: 10px;
    color: #94a3b8;
    font-size: 12px;
}

.tax-select-file-button {
    min-height: 39px;
    padding: 0 15px;
    margin-bottom: 12px;
    border: 1px solid #82aaff;
    border-radius: 8px;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 650;
}

.tax-upload-content > small {
    color: #8995a7;
    font-size: 11px;
}

.tax-selected-file-section {
    margin-top: 17px;
}

.tax-selected-file-list,
.tax-file-modal-list {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.tax-selected-file,
.tax-file-modal-item {
    min-height: 66px;
    padding: 10px 13px;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    align-items: center;
    gap: 11px;
}

    .tax-selected-file:last-child,
    .tax-file-modal-item:last-child {
        border-bottom: 0;
    }

.tax-selected-file-icon {
    flex: 0 0 39px;
    width: 39px;
    height: 43px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

    .tax-selected-file-icon.pdf {
        background: #fff0f0;
        color: #e23e3e;
    }

    .tax-selected-file-icon.image {
        background: #eaf8ee;
        color: #19984e;
    }

    .tax-selected-file-icon.default {
        background: #eef2f7;
        color: #64748b;
    }

.tax-selected-file-info,
.tax-file-modal-item > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

    .tax-selected-file-info strong,
    .tax-file-modal-item strong {
        display: block;
        color: #344157;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tax-selected-file-info small,
    .tax-file-modal-item small {
        display: block;
        margin-top: 3px;
        color: #94a3b8;
        font-size: 11px;
    }

.tax-selected-file button,
.tax-selected-file a,
.tax-file-modal-item a {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

    .tax-selected-file button:hover {
        background: #fff1f1;
        color: #dc2626;
    }

    .tax-file-modal-item a:hover {
        background: #eef4ff;
        color: #2563eb;
    }

@media (max-width: 1200px) {
    .tax-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tax-category-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .tax-page {
        padding: 15px;
    }

    .tax-page-header {
        align-items: stretch;
        flex-direction: column;
    }

        .tax-page-header .tax-btn-primary {
            width: 100%;
        }

    .tax-filter-area {
        grid-template-columns: 1fr;
    }

    .tax-pagination-area {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .tax-form-grid,
    .tax-type-options {
        grid-template-columns: 1fr;
    }

    .tax-modal-backdrop {
        padding: 12px;
    }

    .tax-upload-modal,
    .tax-file-modal {
        margin: 0;
    }
}

@media (max-width: 560px) {
    .tax-summary-grid,
    .tax-category-options {
        grid-template-columns: 1fr;
    }

    .tax-summary-card {
        min-height: 100px;
    }

    .tax-modal-header,
    .tax-modal-body,
    .tax-modal-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .tax-modal-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

        .tax-modal-footer button {
            width: 100%;
        }

    .tax-upload-content {
        padding: 20px 12px;
        text-align: center;
    }
}
