.invoice-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #f3d2bb;
    background: #fff7ef;
    color: #cc5208;
    border-radius: 5px;
    padding: 5px 9px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}
.invoice-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
.invoice-dialog {
    box-sizing: border-box;
    width: min(620px, 94vw);
    border: 1px solid #dce5ef;
    border-radius: 11px;
    padding: 24px;
    color: #193454;
    background: linear-gradient(135deg, #fff, #fdfdff);
    max-height: 94dvh;
    overflow: auto;
    font-family: Poppins, Arial, sans-serif;
    box-shadow: 0 24px 80px #0b23454d;
}
.invoice-dialog::backdrop {
    background: #19314b88;
}
.invoice-dialog header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.invoice-dialog header > div {
    flex: 1;
    min-width: 0;
}
.invoice-dialog header h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #082752;
    margin: 0 0 3px;
}
.invoice-dialog header p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    color: #425977;
}
.invoice-heading-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 49px;
    height: 49px;
    border-radius: 11px;
    background: linear-gradient(130deg, #fff0e4, #ffe8d8);
    color: #ef741a;
}
.invoice-heading-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linejoin: round;
}
.invoice-dialog header button {
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: #425977;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
}
.invoice-tax-summary {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr 1fr;
    border-radius: 10px;
    background: linear-gradient(110deg, #fff4eb, #fdf2e9);
    padding: 16px 4px;
    margin-bottom: 23px;
}
.invoice-tax-summary > div {
    padding: 0 17px;
    border-right: 1px solid #f3d2bb;
    min-width: 0;
}
.invoice-tax-summary > div:last-child {
    border: 0;
}
.invoice-tax-summary span {
    display: block;
    color: #587295;
    font-size: 11px;
    margin-bottom: 3px;
}
.invoice-tax-summary strong {
    display: block;
    color: #092a53;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.invoice-section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #082752;
    margin: 0 0 14px;
}
.invoice-section-title:after {
    content: "";
    height: 1px;
    background: #dce5ef;
    flex: 1;
}
.invoice-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 14px 0 7px;
    font-size: 12px;
    font-weight: 600;
}
.invoice-field-label small {
    font-size: 10px;
    font-weight: 400;
    color: #587295;
    text-align: right;
}
.invoice-select-wrap {
    position: relative;
}
.invoice-select-wrap:after {
    content: "";
    position: absolute;
    right: 13px;
    top: 15px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #425977;
    border-bottom: 1.5px solid #425977;
    transform: rotate(45deg);
    pointer-events: none;
}
.invoice-dialog select {
    appearance: none;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 8px 32px 8px 12px;
    border: 1px solid #cfdded;
    border-radius: 6px;
    font:
        500 12px Poppins,
        Arial,
        sans-serif;
    background: #fff;
    color: #243950;
}
.invoice-place-select select {
    padding-left: 41px;
}
.invoice-place-select > svg {
    position: absolute;
    left: 13px;
    top: 10px;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #587295;
    stroke-width: 1.7;
    pointer-events: none;
}
.invoice-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 14px;
    padding: 13px 14px;
    border: 1px solid #dce3ed;
    background: #f7f8fb;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
    color: #334b6b;
    cursor: pointer;
}
.invoice-check input {
    width: 17px;
    height: 17px;
    flex: none;
    margin: 3px 0 0;
    accent-color: #ef741a;
}
.invoice-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid #d3e2ff;
    border-radius: 8px;
    background: linear-gradient(110deg, #edf4ff, #f1f6ff);
    color: #163e7a;
}
.invoice-note > svg {
    width: 24px;
    height: 24px;
    flex: none;
    fill: none;
    stroke: #3478ff;
    stroke-width: 1.7;
    margin-top: 2px;
}
.invoice-note p {
    margin: 0;
    font-size: 10.5px;
    line-height: 1.65;
}
.invoice-note strong,
.invoice-note span {
    display: block;
}
.invoice-note span {
    color: #5879ad;
}
.invoice-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e0e8f2;
    padding-top: 16px;
    margin-top: 14px;
}
.invoice-dialog-footer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 7px;
    min-height: 40px;
    padding: 9px 16px;
    font:
        600 12px Poppins,
        Arial,
        sans-serif;
    cursor: pointer;
}
.invoice-cancel {
    min-width: 105px;
    border: 1px solid #ef741a;
    background: #fff;
    color: #e4620c;
}
.invoice-generate {
    background: linear-gradient(120deg, #fa851c, #ef6810);
    color: #fff;
    border: 1px solid #ef741a;
    box-shadow: 0 3px 8px #ef741a18;
}
.invoice-generate svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
.invoice-dialog button:disabled {
    opacity: 0.6;
    cursor: progress;
}
.invoice-dialog :is(button, select, input):focus-visible {
    outline: 2px solid #ef741a;
    outline-offset: 3px;
}
#invoiceStatus {
    font-size: 12px;
    line-height: 1.6;
}
#invoiceStatus:empty {
    display: none;
}
#invoiceSettings {
    font-size: 12px;
    color: #cc5208;
}
.invoice-dialog [hidden] {
    display: none !important;
}
@media (max-width: 520px) {
    .invoice-dialog {
        padding: 18px;
    }
    .invoice-dialog header {
        gap: 10px;
    }
    .invoice-dialog header h2 {
        font-size: 18px;
    }
    .invoice-heading-icon {
        width: 40px;
        height: 40px;
    }
    .invoice-tax-summary > div {
        padding: 0 9px;
    }
    .invoice-tax-summary strong {
        font-size: 12px;
    }
    .invoice-field-label small {
        display: none;
    }
    .invoice-dialog-footer button {
        padding: 9px 10px;
        font-size: 11px;
    }
}
.invoice-state-picker {
    position: relative;
}
.invoice-state-control {
    display: flex;
    min-height: 40px;
    border: 1px solid #ccd9eb;
    border-radius: 5px;
    background: #fff;
}
.invoice-state-control:focus-within {
    border-color: #ef741a;
    box-shadow: 0 0 0 3px #fff0e4;
}
.invoice-state-control input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    padding: 9px 8px 9px 40px;
    color: #243950;
    font:
        500 12px Poppins,
        Arial,
        sans-serif;
    outline: none;
}
.invoice-state-control button {
    flex: none;
    width: 34px;
    border: 0;
    background: transparent;
    color: #657891;
    cursor: pointer;
}
.invoice-state-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 10;
    overflow: hidden;
    border: 1px solid #efc9ae;
    border-radius: 5px;
    background: white;
    box-shadow: 0 6px 15px #38250e15;
}
#invoiceStateOptions {
    max-height: 160px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.invoice-state-menu button,
.invoice-state-menu span {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    color: #34465d;
    font:
        400 12px Poppins,
        Arial,
        sans-serif;
    text-align: left;
    cursor: pointer;
}
.invoice-state-menu button:hover,
.invoice-state-menu button.active {
    background: #fff3e9;
    color: #ae4605;
}
.invoice-state-menu #invoiceStateClear {
    border-top: 1px solid #f3e0d1;
    color: #617083;
    font-size: 11px;
}
.invoice-entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.invoice-entry-grid label {
    font-size: 12px;
    color: #243d59;
}
.invoice-entry-grid input {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px solid #cedbee;
    border-radius: 5px;
}
.invoice-entry-grid small {
    font-size: 10px;
}
.invoice-dialog {
    max-height: 92dvh;
    overflow: auto;
}
#invoiceMilestoneContext {
    font-size: 12px;
}
