.invoice-ticket-category .tool-grid-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-source-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.invoice-source-option {
    display: grid;
    gap: 4px;
    padding: 17px 18px;
    border: 2px solid #dbe3ee;
    border-radius: 16px;
    color: #334155;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.invoice-source-option:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.invoice-source-option.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
}

.invoice-source-option b {
    color: #0f172a;
    font-size: 17px;
}

.invoice-source-option span {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.invoice-source-option small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.invoice-source-panel {
    animation: invoice-source-enter .18s ease-out;
}

@keyframes invoice-source-enter {
    from { opacity: .35; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.invoice-register-section {
    margin-top: 0;
    padding: 22px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.invoice-register-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.invoice-register-heading h3 {
    margin: 4px 0 7px;
    color: #0f172a;
    font-size: 21px;
}

.invoice-register-heading p {
    max-width: 780px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.invoice-register-mode-badge {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.invoice-register-rules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.invoice-register-rules div {
    padding: 12px 13px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.invoice-register-rules b,
.invoice-register-rules span {
    display: block;
}

.invoice-register-rules b {
    margin-bottom: 4px;
    color: #1e3a8a;
    font-size: 12px;
}

.invoice-register-rules span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.55;
}

.invoice-register-section .invoice-sorter-dropzone {
    min-height: 122px;
}

.invoice-register-section .invoice-sorter-drop-mark {
    color: #0f766e;
    background: #ccfbf1;
}

.invoice-register-review {
    margin-top: 18px;
}

.invoice-register-table {
    min-width: 1380px;
}

.invoice-register-table td:first-child {
    width: 92px;
    min-width: 92px;
}

.invoice-register-table td:nth-child(2) {
    width: 270px;
}

.invoice-register-table td:nth-child(3) {
    width: 150px;
}

.invoice-register-table td:nth-child(4) {
    width: 235px;
}

.invoice-register-table td:nth-child(5) {
    min-width: 300px;
}

.invoice-register-table td:last-child {
    min-width: 280px;
}

.invoice-register-amount {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.invoice-register-amount.red {
    color: #b91c1c;
}

.invoice-register-category-pills {
    margin-top: 12px;
}

.invoice-content-profile-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8faff, #eef2ff);
}

.invoice-content-profile-panel:empty {
    display: none;
}

.invoice-content-profile-panel.applying {
    opacity: .72;
}

.invoice-content-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.invoice-content-profile-head span {
    color: #4f46e5;
    font-size: 11px;
    font-weight: 800;
}

.invoice-content-profile-head h4 {
    margin: 3px 0 4px;
    color: #1e1b4b;
    font-size: 16px;
}

.invoice-content-profile-head p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.invoice-content-profile-head em {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    color: #4338ca;
    background: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.invoice-content-profile-list {
    display: grid;
    gap: 8px;
}

.invoice-content-profile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
    align-items: center;
    gap: 18px;
    padding: 11px 12px;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    background: rgba(255, 255, 255, .88);
}

.invoice-content-profile-row > span,
.invoice-content-profile-row b,
.invoice-content-profile-row small {
    display: block;
}

.invoice-content-profile-row b {
    overflow-wrap: anywhere;
    color: #1e293b;
    font-size: 13px;
}

.invoice-content-profile-row small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.invoice-content-profile-row select {
    width: 100%;
    min-height: 40px;
    padding: 8px 34px 8px 11px;
    border: 1px solid #a5b4fc;
    border-radius: 10px;
    color: #312e81;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .invoice-ticket-category .tool-grid-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-register-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .invoice-ticket-category .tool-grid-category {
        grid-template-columns: 1fr;
    }

    .invoice-source-choice {
        grid-template-columns: 1fr;
    }

    .invoice-register-section {
        padding: 17px;
    }

    .invoice-register-heading {
        flex-direction: column;
    }

    .invoice-register-rules {
        grid-template-columns: 1fr;
    }

    .invoice-content-profile-head {
        flex-direction: column;
    }

    .invoice-content-profile-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
