﻿:root {
    --bg: #f5f1ea;
    --bg-2: #f8f6f2;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.10);
    --primary: #1f5f74;
    --primary-2: #234c68;
    --primary-soft: #e6f0f3;
    --primary-hover: #2290b4;
    --accent-soft: #f3e4dc;
    --shadow-xl: 0 30px 80px rgba(15, 23, 42, 0.14);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.10);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --font-ui: "Manrope", "Aptos","Segoe UI","Inter","Nunito Sans","Trebuchet MS",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-md: 14px;
    --fs-base: 15px;
    --fs-lg: 16px;
    --fs-xl: 22px;
    --fs-2xl: 28px;
    --text: #1e293b;
    --muted: #6b7280;
    --line: #cbd5e1;
    --line-focus: #93c5fd;
    --surface: #ffffff;
    --radius-md: 12px;
    --control-h: 44px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    background: #f3f6fb;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
body.login-page {
    background-color: #f5f1ea !important;
    background-image: linear-gradient(to right, rgba(183,121,93,0.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(183,121,93,0.06) 1px, transparent 1px) !important;
    background-size: 28px 28px !important;
    background-position: 0 0, 0 0 !important;
}

body.login-page .app-shell,
body.login-page .main-content,
body.login-page .page-content {
    background: transparent !important;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-ui);
}


body {
    font-size: var(--fs-base);
    color: var(--text);
}

/* COMPONENTI */

.input,
.select,
.textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    min-height: var(--control-h);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: var(--fs-md);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--line-focus);
    box-shadow: 0 0 0 4px rgba(59,130,246,.10);
}

.btn:active,
.btn-main:active,
.btn-soft:active,
.btn-ghost:active,
.btn-light:active {
    transform: translateY(1px);
}

.btn,
.btn-main {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn:hover,
.btn-main:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.btn-soft {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: #cfe2e8;
}

.btn-soft:hover {
    background: #dbeaf0;
    color: var(--primary-hover);
    border-color: #bfd8e0;
}

.btn-ghost,
.btn-light {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

    .btn-ghost:hover,
    .btn-light:hover {
        background: #f8fafc;
        color: var(--text);
        border-color: #b6c3d1;
    }
/* FINE COMPONENTI */

h1, .page-title {
    font-size: var(--fs-2xl);
    line-height: 1.15;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

h2, .section-title {
    font-size: var(--fs-xl);
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

h3 {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

label,
.form-label {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--muted);
}

small,
.text-muted,
.helper-text {
    font-size: var(--fs-xs);
    color: var(--muted);
}

p,
.page-subtitle {
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--muted);
}

.story-logo-wrap-app {
    display: flex;
    align-items: center;
    gap: 14px;
}

.story-logo-app {
    max-width: 250px;
    border-radius: 18px;
    background: radial-gradient(circle at top left, #fff8f2 0%, rgba(255,248,242,0) 34%), radial-gradient(circle at bottom right, #edf5f7 0%, rgba(237,245,247,0) 34%), linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
    padding: 10px;
    box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.story-logo {
    max-width: auto;
    max-height: 50px;
    object-fit: contain;
}

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    height: 100vh;
    overflow: hidden;
    padding: 18px 14px;
    display: flex;
    flex: 0 0 260px;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid #355f91;
    /* BASE */
    background-color: #1f2937;
    /* QUADRETTATO */
    background-image: linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

.brand {
    padding: 4px 6px 14px 6px;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.brand-name {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .14em;
    color: #f7fbff;
    text-transform: uppercase;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    color: #eef4fb;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 13px;
}

    .menu-item:hover {
        background: rgba(255,255,255,.12);
        color: #ffffff;
    }

    .menu-item.active {
        background: #bfe8ff;
        color: #0c4a6e;
        font-weight: 700;
    }

.menu-collapsible {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    justify-content: space-between;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle.active-parent {
    background: rgba(255,255,255,.12);
    color: #ffffff;
}

.menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.menu-arrow {
    transition: transform .2s ease;
    font-size: 11px;
    margin-left: auto;
}

.menu-toggle.open .menu-arrow {
    transform: rotate(90deg);
}

.menu-sublist {
    display: none;
    padding-top: 4px;
    padding-left: 8px;
    gap: 4px;
    flex-direction: column;
}

    .menu-sublist.open {
        display: flex;
    }

.menu-sub {
    margin-left: 10px;
    font-size: 13px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.main-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: 72px minmax(0, 1fr);
    overflow: hidden;
}

.page-content {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
}

.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

    .stat-card .label {
        font-size: 13px;
        color: #64748b;
        margin-bottom: 8px;
    }

    .stat-card .value {
        font-size: 28px;
        font-weight: 700;
    }

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
}

th {
    background: #f8fafc;
    color: #475569;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-in {
    background: #fef3c7;
    color: #92400e;
}

.badge-created {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-done {
    background: #dcfce7;
    color: #166534;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.btn {
    border: 0;
    background: #00C6FF;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-light {
    background: #F5F5F7;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
}

    .btn-light:hover {
        background: #00C6FF;
        color: #fff;
    }

.input, .select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tab-active {
    background: #0f172a !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

    .tab-active .label,
    .tab-active .value {
        color: #fff !important;
    }

.tab-inactive {
    background: #fff;
    color: #1e293b;
}

    .tab-inactive:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    }

@media (max-width: 1100px) {
    .sidebar {
        width: 220px;
    }

    .cards-3,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.cod-method-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

    .checkbox-row input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

.text-muted {
    color: #6b7280;
}

.icon-btn.archive {
    color: #475569;
}

    .icon-btn.archive:hover {
        background: #f8fafc;
    }

.icon-btn.restore {
    color: var(--success);
}

    .icon-btn.restore:hover {
        background: #f0fdf4;
    }

.global-toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.global-toast {
    position: relative;
    pointer-events: auto;
    border-radius: 16px;
    padding: 14px 46px 14px 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15,23,42,.18);
    animation: toastIn .22s ease-out;
}

.global-toast-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.global-toast-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.global-toast-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
}

.global-toast-text {
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.global-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

.global-toast-close:hover {
    background: rgba(255,255,255,.95);
}

.global-toast.hiding {
    animation: toastOut .25s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
}

/* CARICAMENTO IN CORSO */
.content-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: all;
}

    .content-loader.show {
        display: flex;
    }

/* fondamentale */
.page-content {
    position: relative;
}

/* box */
.content-loader-box {
    padding: 18px 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* spinner */
.content-loader-spinner {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 3px solid #e2e8f0;
    border-top-color: #1f5f74;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-content {
    position: relative;
}

.content-loader-text {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
/* FINE CARICAMENTO IN CORSO */

/* CARICAMENTO DASHBOARD */
.skeleton-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* card */
.skeleton-card {
    height: 110px;
    border-radius: 18px;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

/* tabella */
.skeleton-table {
    height: 260px;
    border-radius: 18px;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

    /* animazione shimmer */
    .skeleton-card::after,
    .skeleton-table::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.6), transparent );
        animation: shimmer 1.2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}
/* FINE CARICAMENTO DASHBOARD */

/* INTEGRATIONS */
.integrations-hero {
    margin-bottom: 16px;
}

.integrations-header {
    padding: 18px 18px 0 18px;
    border-bottom: 1px solid var(--line);
}

.integrations-tabs {
    display: inline-flex;
    background: #f3f6fb;
    padding: 4px;
    border-radius: 14px;
    gap: 4px;
    border: 1px solid var(--line);
    margin-bottom: 16px;
}

.integration-tab {
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

    .integration-tab.active {
        background: #fff;
        color: var(--primary);
        box-shadow: 0 2px 8px rgba(0,0,0,.05);
    }

.integrations-content {
    padding: 18px;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.integration-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 180px;
}

    .integration-card.connected {
        border-color: #d7e7f7;
        background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    }

.integration-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.integration-logo-wrap {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.integration-logo {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.integration-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.integration-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.integration-description {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.integration-badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.integration-card-actions {
    display: flex;
    justify-content: flex-end;
}

.integrations-config-sections {
    padding: 0 18px 18px 18px;
    display: grid;
    gap: 18px;
}

.integration-config-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    scroll-margin-top: 90px;
}

.integrations-body {
    padding: 18px;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.integration-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 180px;
}

    .integration-card.connected {
        border-color: #d7e7f7;
        background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    }

.integration-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.integration-logo-wrap {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.integration-logo {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.integration-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.integration-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.integration-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.integration-description {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.integration-badge {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.integration-card-actions {
    display: flex;
    justify-content: flex-end;
}

.integration-config-section {
    border-top: 1px solid var(--line);
    padding: 18px;
    background: #fbfcfe;
}

.integration-config-card {
    scroll-margin-top: 90px;
}

.integration-config-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.integration-form-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.integration-divider {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.integration-check-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.integration-check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
}

.integration-inner-card {
    margin-top: 20px;
}

.integration-field-block {
    margin-top: 20px;
}

.integration-marketplace-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
}

@media (max-width: 900px) {
    .integration-config-head {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-check-grid,
    .integration-marketplace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .carrier-config-grid {
        grid-template-columns: 1fr;
    }
}

/* FINE INTEGRATIONS */

/* PANNELLO SCHEDULAZIONI */
.page-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.page-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.status-table td {
    vertical-align: top;
}

.status-company strong {
    display: block;
}

.mini-muted {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.mini-log {
    margin-top: 6px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

    .status-pill.ok {
        background: #dcfce7;
        color: #166534;
    }

    .status-pill.error {
        background: #fee2e2;
        color: #991b1b;
    }

    .status-pill.running {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .status-pill.disabled {
        background: #e5e7eb;
        color: #374151;
    }

    .status-pill.neutral {
        background: #f1f5f9;
        color: #334155;
    }

.error-box {
    max-width: 260px;
}

.empty-row {
    text-align: center;
    color: #64748b;
    padding: 28px 12px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.status-pill.disabled-error {
    background: #fef3c7;
    color: #92400e;
}

.retry-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
}

.error-critical {
    border-left: 4px solid #dc2626;
    padding-left: 8px;
}
/* FINE PANNELLO SCHEDULAZIONE */

/* PAGINA ORDINI SPEDITI - COLONNA STATO SPEDIZIONE */
.status-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.status-subline {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
    word-break: break-word;
}

.tracking-link {
    color: #0f4c81;
    text-decoration: none;
    font-weight: 600;
}

    .tracking-link:hover {
        text-decoration: underline;
    }

    .status-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        min-height: 30px;
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .01em;
        white-space: nowrap;
    }

    .status-success {
        background: #ecfdf5;
        color: #047857;
    }

    .status-warning {
        background: #fff7ed;
        color: #c2410c;
    }

    .status-error {
        background: #fef2f2;
        color: #b91c1c;
    }

    .status-neutral {
        background: #f3f4f6;
        color: #4b5563;
    }
    .status-badge.incoming {
        background: #eef2ff;
        color: #4338ca;
    }

    .status-badge.created {
        background: #e0f2fe;
        color: #0369a1;
    }

    .status-badge.confirmed {
        background: #ede9fe;
        color: #6d28d9;
    }

    .status-badge.shipped {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .status-badge.storage {
        background: #fef3c7;
        color: #92400e;
    }

    .status-badge.failed {
        background: #fee2e2;
        color: #b91c1c;
    }

    .status-badge.delivered {
        background: #dcfce7;
        color: #166534;
    }

    .status-badge.deleted {
        background: #e5e7eb;
        color: #4b5563;
    }

    .status-badge.error {
        background: #fecaca;
        color: #991b1b;
    }

    .status-badge.neutral {
        background: #f1f5f9;
        color: #334155;
    }

    .status-badge.outfordelivery {
        background: #ede9fe;
        color: #7c3aed;
    }

    /* STILI ADMIN */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.filter-item-search {
    min-width: 320px;
    flex: 1;
}

.filter-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.filter-input {
    height: 38px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.status-pill.warning {
    background: #fff7ed;
    color: #c2410c;
}

.http-code {
    display: inline-block;
    min-width: 46px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.http-ok {
    background: #ecfdf5;
    color: #047857;
}

.http-warning {
    background: #fff7ed;
    color: #c2410c;
}

.http-error {
    background: #fef2f2;
    color: #b91c1c;
}

.url-cell {
    max-width: 360px;
    word-break: break-word;
}

.details-link {
    cursor: pointer;
    color: #2563eb;
}

.log-pre {
    margin-top: 8px;
    max-width: 600px;
    max-height: 260px;
    overflow: auto;
    background: #0f172a;
    color: #e5e7eb;
    padding: 12px;
    border-radius: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.pager-link {
    padding: 8px 12px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}

.pager-link.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

/* ALERT */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 260px;
    max-width: 320px;
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px 10px 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

.toast-icon {
    font-size: 16px;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.7);
    width: 100%;
    transform-origin: left;
}

.toast.info {
    background: #3b82f6;
}

.toast.success {
    background: #16a34a;
}

.toast.warning {
    background: #f59e0b;
}

.toast.error {
    background: #dc2626;
}
/* FINE ALERT */

/* CREAZIONE ETICHETTE BULK CON JOB */
.job-progress-box {
    margin: 12px 0;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.job-progress-bar {
    margin-top: 10px;
    height: 8px;
    background: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
}

.job-progress-fill {
    height: 100%;
    background: #2563eb;
    transition: width .3s ease;
}

.row-processing {
    background: #f1f5f9;
    opacity: 0.7;
    position: relative;
}

.status-badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.fly-clone {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    background: white;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15,23,42,.25);
    transition: all .55s cubic-bezier(.22,1,.36,1);
    opacity: .95;
}

.row-flying-out {
    opacity: 0.25;
}

.ts-wrapper.single .ts-control {
    min-height: 46px;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.ts-dropdown .carrier-option-row {
    padding: 6px 4px;
}

.ts-dropdown {
    border-radius: 12px;
    overflow: hidden;
}

#drawerCarrierSelect-ts-control {
    min-width: 320px;
}
#panel-shipping .drawer-field {
    width: 100%;
}

/* wrapper */
#panel-shipping .ts-wrapper {
    width: 100%;
}

/* select principale */
#panel-shipping .ts-wrapper.single .ts-control {
    min-height: 46px;
    border-radius: 12px;
    padding: 10px 42px 10px 14px;
    font-size: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

/* freccia combo */
#panel-shipping .ts-wrapper.single .ts-control::after {
    content: '⌄';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 18px;
    color: #64748b;
    pointer-events: none;
}

/* dropdown */
#panel-shipping .ts-dropdown {
    border-radius: 12px;
    overflow: hidden;
}

/* righe dropdown */
#panel-shipping .ts-dropdown .option {
    padding: 10px 14px;
}
.carrier-option-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.carrier-option-row span {
    flex: 1;
}

.carrier-option-row strong {
    margin-left: auto;
    white-space: nowrap;
    color: #0f766e;
    font-weight: 700;
    font-style: italic;
}

#panel-shipping .ts-control .item {
    width: 100%;
}

#panel-shipping .ts-control .carrier-option-row {
    width: 100%;
    display: flex;
    align-items: center;
}

#panel-shipping .ts-control .carrier-option-row span {
    flex: 1;
    min-width: 0;
}

#panel-shipping .ts-control .carrier-option-row strong {
    margin-left: auto;
    white-space: nowrap;
}