*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "IBM Plex Sans", sans-serif;
    background: #F2F4F8;
    color: #1B2A4A;
    font-size: 14px;
    line-height: 1.45;
}

.font-mono {
    font-family: "IBM Plex Mono", monospace;
}

.alert {
    position: fixed;
    top: 70px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 100;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert.success {
    background: #E4F2EA;
    color: #1F7A4D;
    border: 1px solid #BBDCC9;
}

.alert.error {
    background: #FDEBDD;
    color: #B54D06;
    border: 1px solid #F2C49E;
}

.app-header {
    background: #1B2A4A;
    color: #FFFFFF;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.app-header-brand {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.2s;
}

.app-header-brand:hover {
    opacity: 0.85;
    color: #FFFFFF;
}

.app-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* header dropdown */
.settings-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.settings-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border: 1px solid #DDE3ED;
    z-index: 1000;
    overflow: hidden;
}

.settings-dropdown-menu.show {
    display: block;
}

.settings-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #1B2A4A;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.1s;
}

.settings-dropdown-item:hover {
    background-color: #F8FAFC;
}

.settings-dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.btn-icon-only i,
.settings-dropdown-item i {
    line-height: inherit;
}

.btn-refresh-animated i {
    transition: transform 0.4s ease-in-out;
}

.btn-refresh-animated:hover i {
    transform: rotate(180deg);
}

.btn-settings-animated i {
    transition: transform 0.5s ease-in-out;
}

.btn-settings-animated:hover i {
    transform: rotate(90deg);
}

/* main */
.main-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 96px;
}

.main-container.order-view {
    padding-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 6px;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-full {
    width: 100%;
}

.btn-icon-only {
    background: transparent;
    color: #B9C4D6;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    padding: 6px 12px;
    font-size: 13px;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: #1B2A4A;
    color: #FFFFFF;
    padding: 12px 22px;
    font-size: 15px;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.16);
}

.btn-primary:hover {
    background: #121c32;
}

.btn-secondary {
    background: #FFFFFF;
    border: 1px solid #DDE3ED;
    color: #1B2A4A;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.06);
}

.btn-secondary:hover {
    background: #f9f9f9;
}

.btn-back {
    background: transparent;
    color: #5A6B85;
    padding: 6px 10px 6px 0;
    margin-bottom: 8px;
    font-size: 13px;
}

.btn-back:hover {
    color: #1B2A4A;
}

.btn-add-item {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: bold;
}

.btn-delete-item {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.badge {
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-inprogress {
    background: #E4F2EA;
    color: #1F7A4D;
    border: 1px solid #BBDCC9;
}

.badge-closed {
    background: #E4F2EA;
    color: #1F7A4D;
    padding: 5px 12px;
    letter-spacing: 0.03em;
}

.badge-draft {
    background: #E5E9F0;
    color: #5A6B85;
    padding: 5px 12px;
    letter-spacing: 0.03em;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.section-title-small {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 35px;
}

.section-subtitle {
    margin: 36px 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #5A6B85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.order-card {
    background: #FFFFFF;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    padding: 18px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
}

.order-card:hover {
    border-color: #B9C4D6;
    box-shadow: 0 4px 12px rgba(27, 42, 74, 0.08);
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.order-card-code {
    font-weight: 600;
    font-size: 15px;
}

.order-card-title {
    font-weight: 500;
    font-size: 15px;
}

.order-card-meta {
    font-size: 13px;
}

.order-card-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-top: 1px solid #EDF0F6;
    padding-top: 10px;
    margin-top: 2px;
}

.order-card-cost-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-card-cost-value {
    font-weight: 600;
    font-size: 16px;
}

.empty-state {
    padding: 20px;
    color: #5A6B85;
}

.empty-state.grid-span {
    grid-column: 1 / -1;
}

.closed-orders-list {
    background: #FFFFFF;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.06);
}

.closed-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px;
    border-bottom: 1px solid #EDF0F6;
    cursor: pointer;
    transition: background 0.15s;
}

.closed-order-row:hover {
    background: #f9fafb;
}

.closed-order-row:last-child {
    border-bottom: none;
}

.closed-order-date {
    font-size: 13px;
    width: 90px;
}

.closed-order-title {
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.closed-order-status {
    font-size: 13px;
    color: #1a73e8;
    width: 140px;
}

.closed-order-cost {
    width: 110px;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-meta-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.input-title {
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    color: #1B2A4A;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 10px;
    flex: 1 1 auto;
}

#orderSku {
    field-sizing: content;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1B2A4A;
    background: transparent;
    border: 1px dashed transparent;
    border-radius: 6px;
    padding: 6px 10px;
    flex: 0 0 auto;
    min-width: 60px;
    max-width: 200px;
    box-sizing: content-box;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#orderName {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1B2A4A;
    background: transparent;
    border: 1px dashed transparent;
    border-radius: 6px;
    padding: 6px 10px;
    flex: 1 1 auto;
    min-width: 150px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.date-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5A6B85;
    font-size: 13px;
}

.input-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #1B2A4A;
    background: #FFF;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    padding: 6px 10px;
    width: 92px;
    text-align: center;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (min-width: 992px) {
    .order-layout {
        grid-template-columns: 7fr 3fr;
    }
}

.order-materials-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.add-material-form {
    position: relative;
    z-index: 20;
}

.add-material-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #1B2A4A;
    border-radius: 6px;
    padding: 6px 14px;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.08);
    flex-wrap: wrap;
}

.add-material-select {
    flex: 1 1 auto;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: #1B2A4A;
    background: transparent;
    padding: 6px;
    outline: none;
    min-width: 200px;
}

.input-qty-add {
    width: 70px;
    border: 1px solid #DDE3ED;
    border-radius: 4px;
    padding: 6px;
    text-align: center;
}

.table-responsive {
    background: #FFFFFF;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive.mt-10 {
    margin-top: 10px;
}

.data-table {
    min-width: 650px;
    width: 100%;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 84px 132px 116px 116px 36px;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #EDF0F6;
}

.table-header {
    font-size: 11px;
    font-weight: 600;
    color: #5A6B85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #DDE3ED;
}

.sidebar {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-card {
    background: #FFFFFF;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(27, 42, 74, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.summary-divider {
    border-top: 1px solid #DDE3ED;
    padding-top: 14px;
}

.summary-sub-divider {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #EDF0F6;
    padding-top: 10px;
    font-size: 13px;
}

.summary-total-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.summary-total-amount {
    font-weight: 600;
    font-size: 26px;
}

.qty-input {
    width: 66px;
    text-align: right;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    padding: 6px 8px;
    color: #1B2A4A;
}

.text-muted {
    color: #5A6B85;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.item-id {
    font-size: 12px;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
}

.editable-title {
    transition: border-color 0.2s, background-color 0.2s;
}

.editable-title:hover,
.editable-title:focus {
    border-color: #B9C4D6 !important;
    background-color: #fff !important;
    outline: none;
}

.order-title-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 300px;
}

.title-separator {
    font-size: 20px;
    font-weight: 700;
    color: #1B2A4A;
    flex-shrink: 0;
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #DDE3ED;
    border-radius: 6px;
    padding: 12px 14px;
    box-shadow: rgba(27, 42, 74, 0.08) 0px 1px 2px;
    transition: border-color 0.2s ease, border-radius 0.2s ease;
}

.search-input-container:focus-within {
    border-color: #1B2A4A;
}

.search-icon {
    color: #5A6B85;
    font-size: 14px;
}

.search-input {
    flex: 1 1 0%;
    border: none;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: #1B2A4A;
    background: transparent;
    padding: 0;
    outline: none;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #1B2A4A;
    border-radius: 0 0 6px 6px;
    box-shadow: rgba(27, 42, 74, 0.16) 0px 6px 16px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 10;
}

input[type="date"].date-no-icon::-webkit-calendar-picker-indicator,
input[type="date"].date-no-icon::-webkit-inner-spin-button {
    display: none;
    -webkit-appearance: none;
}

.extra-costs-header,
.extra-cost-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 84px 132px 116px 116px 36px;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
}

.extra-costs-header {
    border-bottom: 1px solid #dde3ed;
    font-size: 11px;
    font-weight: 600;
    color: #5a6b85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extra-cost-row {
    border-bottom: 1px solid #edf0f6;
}

.extra-cost-name {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    border: 1px dashed transparent;
    background: transparent;
    outline: none;
    padding: 4px;
    border-radius: 4px;
    color: #1b2a4a;
}

.extra-cost-qty-group {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    font-size: 13px;
}

.extra-cost-unit {
    color: rgb(90, 107, 133);
    font-size: 12px;
    width: 50px;
    border: 1px dashed transparent;
    background: transparent;
    padding: 2px 2px;
    outline: none;
    border-radius: 4px;
    text-align: center;
}

.extra-cost-price-group {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.extra-cost-price {
    font-size: 13px;
    width: 75px;
    border: 1px dashed transparent;
    background: transparent;
    outline: none;
    padding: 4px;
    border-radius: 4px;
    color: #1b2a4a;
}

.extra-cost-total {
    font-size: 13px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.extra-cost-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.btn-add-extra-cost {
    background: transparent;
    border: 1px dashed #b9c4d6;
    color: #5a6b85;
    border-radius: 6px;
    padding: 7px 14px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-extra-cost:hover {
    background: #f8fafc;
}

/* Modal koszty pozamaterialne */
.extra-cost-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 18, 32, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.extra-cost-modal-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: rgba(11, 18, 32, 0.35) 0 12px 40px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    margin: auto;
}

.extra-cost-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 14px;
    border-bottom: 1px solid #dde3ed;
}

.extra-cost-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.btn-extra-cost-close {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.extra-cost-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.extra-cost-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.extra-cost-grid-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 110px 170px;
    gap: 12px;
}

.extra-cost-label {
    font-size: 12px;
    font-weight: 600;
    color: #5a6b85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extra-cost-input,
.extra-cost-select {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: #1b2a4a;
    background: #ffffff;
    border: 1px solid #dde3ed;
    border-radius: 6px;
    padding: 9px 12px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.extra-cost-input:focus-within, 
.extra-cost-select:focus-within {
    border-color: #1B2A4A;
}

@media (max-width: 769px) {
    .extra-cost-grid-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .extra-cost-grid-row > .extra-cost-form-group:last-child {
        grid-column: 1 / -1;
    }

    .extra-cost-modal-body {
        padding: 16px;
    }
}

.extra-cost-select {
    padding: 9px 8px;
    cursor: pointer;
}

.extra-cost-input-mono {
    font-family: 'IBM Plex Mono', monospace;
    text-align: right;
}

.extra-cost-quick-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.btn-extra-cost-quick {
    background: #f2f4f8;
    border: 1px solid #dde3ed;
    color: #5a6b85;
    border-radius: 6px;
    padding: 4px 10px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.btn-extra-cost-quick:hover {
    background: #e4e8f0;
}

.extra-cost-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dde3ed;
    border-radius: 6px;
    padding: 0 12px 0 0;
    background: #ffffff;
}

.extra-cost-price-wrapper .extra-cost-input-inner {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    text-align: right;
    color: #1b2a4a;
    background: transparent;
    border: none;
    outline: none;
    border-radius: 6px;
    padding: 9px 0 9px 12px;
    width: 100%;
    min-width: 0;
    outline: none;
    border-color: #1B2A4A;
}

.extra-cost-price-wrapper:focus-within {
    border-color: #1B2A4A;
}

.extra-cost-currency {
    color: #5a6b85;
    font-size: 13px;
}

.extra-cost-summary-box {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #f6f8fb;
    border: 1px solid #edf0f6;
    border-radius: 6px;
    padding: 12px 14px;
}

.extra-cost-summary-label {
    font-weight: 600;
    color: #1b2a4a;
}

.extra-cost-summary-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 17px;
    color: #1b2a4a;
}

.extra-cost-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid #edf0f6;
}

.btn-extra-cost-secondary {
    background: transparent;
    border: 1px solid #dde3ed;
    color: #1b2a4a;
    border-radius: 6px;
    padding: 10px 18px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-extra-cost-secondary:hover {
    background: #f9f9f9;
}

.btn-extra-cost-primary {
    background: #1b2a4a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: rgba(27, 42, 74, 0.16) 0 1px 2px;
}

.btn-extra-cost-primary:hover {
    background: #121c32;
}

/* Akcje kontenera */
.order-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    margin-top: 16px;
}

.order-actions__row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.order-actions__link-btn {
    background: none;
    border: none;
    padding: 2px 6px;
    margin: 0;
    font: inherit;
    color: #4a5568;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: underline;
}

.order-actions__delete-btn {
    background: none;
    border: none;
    padding: 2px 6px;
    margin: 0;
    font: inherit;
    color: #e53e3e;
    cursor: pointer;
    border-radius: 4px;
}

.order-actions__link-btn:hover {
    color: #3182ce;
    text-decoration: underline;
}

.order-actions__delete-btn:hover {
    color: #c53030;
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Scroll otwartych */
.custom-scroll {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 32px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

@media (max-width: 768px) {
    .custom-scroll {
        max-height: 50vh;
    }
}

/* Zakonczone */
.order-subinfo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stats-panel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-panel>div {
    flex: 1 1 0%;
    min-width: 140px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    text-decoration: none;
    transition: background 0.15s;
}

.document-link:hover {
    background-color: #f9fafb;
}

@media (max-width: 767px) {
    .order-subinfo {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .order-meta-header {
        justify-content: center;
    }

    .order-title-wrapper {
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
    }

    .order-title-wrapper .input-title {
        text-align: center;
    }

    .title-separator {
        display: none;
    }

    #orderSku {
        min-width: 60px;
        field-sizing: fixed;
        width: 100%;
        max-width: 200px;
        min-width: 60px;
    }

    #orderName {
        min-width: 100px;
    }

    .table-row {
        gap: 0px;
    }
}

@media (max-width: 767px) {
    .closed-order-row {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 12px 14px;
    }

    .closed-order-status {
        display: none;
    }

    .closed-order-date {
        width: auto;
        font-size: 12px;
    }

    .closed-order-title {
        min-width: 0;
        font-size: 14px;
        flex: 1 1 100%;
        order: 1;
    }

    .rw-link {
        font-size: 12px;
        order: 2;
    }

    .closed-order-cost {
        width: auto;
        margin-left: auto;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        order: 3;
    }
}

/* Fix dla zamiany <div> na <a> */
a.order-card {
    display: flex;
}

a.closed-order-row {
    display: flex;
}

a {
    color: inherit;
    text-decoration: none;
}

a.rw-link {
    text-decoration: underline;
    font-size: 13px;
}

a.rw-link:hover {
    color: #1a73e8;
}