:root {
    color-scheme: light;
    --ink: #11130f;
    --ink-soft: #262a22;
    --muted: #6d7168;
    --yellow: #ffc812;
    --yellow-bright: #ffdb2f;
    --yellow-soft: #fff0a6;
    --cream: #fbf7ef;
    --cream-deep: #f1eadf;
    --surface: #ffffff;
    --surface-muted: #f7f5f0;
    --border: #e6e1d7;
    --success: #147a4b;
    --success-soft: #e8f7ef;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --info: #175cd3;
    --info-soft: #eff5ff;
    --warning: #9a6700;
    --warning-soft: #fff7d6;
    --shadow-sm: 0 1px 2px rgba(17, 19, 15, .05), 0 5px 18px rgba(17, 19, 15, .04);
    --shadow-lg: 0 24px 70px rgba(17, 19, 15, .16);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sidebar: 268px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.5; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
:focus-visible { outline: 3px solid rgba(255, 200, 18, .7); outline-offset: 3px; }
.ui-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 200; top: 10px; left: 12px; padding: 10px 14px; color: var(--ink); background: var(--yellow); border-radius: 9px; font-weight: 850; transform: translateY(-150%); transition: transform .15s ease; }
.skip-link:focus { transform: translateY(0); }

.app-shell {
    display: flex;
    background:
        radial-gradient(circle at 94% 10%, rgba(255, 213, 31, .18) 0 8%, transparent 8.2%),
        repeating-radial-gradient(circle at 94% 10%, transparent 0 72px, rgba(255, 200, 18, .11) 73px 74px, transparent 75px 104px),
        var(--cream);
    background-attachment: fixed;
}
.app-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar); padding: 28px 20px 20px;
    display: flex; flex-direction: column; overflow-y: auto; color: #fff; background: var(--ink);
}
.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; padding: 0; background: rgba(17,19,15,.5); border: 0; cursor: pointer; backdrop-filter: blur(2px); }
.brand { display: inline-flex; align-items: center; gap: 0; width: max-content; color: var(--ink); font-size: 25px; font-weight: 650; letter-spacing: -1.5px; line-height: 1; }
.brand img { width: 38px; height: 38px; margin-right: 9px; object-fit: contain; }
.brand strong { position: relative; z-index: 0; color: inherit; font-weight: 950; }
.brand strong::after { content: ""; position: absolute; z-index: -1; left: -1px; right: -2px; bottom: -2px; height: 9px; background: var(--yellow); border-radius: 1px; }
.app-sidebar .brand { margin: 2px 12px 34px; color: #fff; }
.app-sidebar .brand strong { color: #fff; }
.nav-create {
    display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 16px; margin-bottom: 24px;
    color: var(--ink); background: var(--yellow); border: 1px solid var(--yellow); border-radius: 12px; font-weight: 850; box-shadow: 0 8px 28px rgba(255, 200, 18, .16);
}
.nav-create:hover { background: var(--yellow-bright); transform: translateY(-1px); }
.nav-create .ui-icon { width: 18px; height: 18px; stroke-width: 2.2; }
.app-nav { display: grid; gap: 4px; }
.nav-label { margin: 20px 12px 7px; color: #858a80; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.app-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; color: #c6c9c1; border-radius: 10px; font-weight: 650; transition: .16s ease; }
.app-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.app-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.app-nav a.active::before { content: ""; position: absolute; left: -20px; top: 10px; bottom: 10px; width: 3px; background: var(--yellow); border-radius: 0 4px 4px 0; }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; color: var(--yellow); font-size: 18px; font-weight: 700; }
.nav-icon svg, .notification-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-count, .button-count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; margin-left: auto; color: var(--ink); background: var(--yellow); border-radius: 99px; font-size: 11px; font-weight: 900; }
.sidebar-help { margin-top: auto; padding: 18px; display: grid; gap: 8px; background: #20231d; border: 1px solid #30342b; border-radius: 16px; }
.sidebar-help .eyebrow { color: var(--yellow); }
.sidebar-help strong { font-size: 15px; line-height: 1.35; }
.sidebar-help a { color: #cfd2ca; font-size: 13px; font-weight: 700; }
.sidebar-help a:hover { color: #fff; }
.sidebar-language { display: none; margin-top: 12px; }

.app-workspace { width: calc(100% - var(--sidebar)); min-height: 100vh; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.app-header {
    position: sticky; top: 0; z-index: 40; min-height: 78px; padding: 14px clamp(22px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: rgba(251,247,239,.9); border-bottom: 1px solid rgba(230,225,215,.85); backdrop-filter: blur(18px);
}
.header-context { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 650; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 4px rgba(34,160,107,.11); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.credit-chip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-sm); }
.credit-chip span { color: var(--muted); font-size: 12px; font-weight: 700; }
.credit-chip strong { font-size: 16px; }
.icon-button { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; cursor: pointer; box-shadow: var(--shadow-sm); }
.icon-button:hover { border-color: #cfc8ba; background: #fffdf9; }
.button-count { position: absolute; top: -5px; right: -6px; margin: 0; border: 2px solid var(--cream); }
.mobile-menu { display: none; }
.header-mobile-brand { display: none; font-size: 20px; letter-spacing: -1px; }
.header-mobile-brand img { width: 27px; height: 27px; margin-right: 5px; }
.dropdown { position: relative; }
.dropdown-panel { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.user-menu-button { min-height: 48px; padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.user-menu-button:hover { background: rgba(255,255,255,.7); border-color: var(--border); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--yellow); border-radius: 10px; font-size: 13px; font-weight: 900; }
.user-menu-copy { display: grid; min-width: 125px; text-align: left; line-height: 1.25; }
.user-menu-copy strong { font-size: 13px; }
.user-menu-copy small { max-width: 160px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-panel { padding: 8px; }
.account-panel a { display: block; padding: 10px 12px; border-radius: 9px; font-weight: 650; }
.account-panel a:hover { background: var(--surface-muted); }
.account-panel .impersonation-exit { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; color: var(--ink); background: var(--yellow-soft); border: 1px solid rgba(255, 200, 18, .55); }
.account-panel .impersonation-exit:hover { background: var(--yellow); }
.account-panel .impersonation-exit + a { border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; }
.notification-panel { width: min(420px, calc(100vw - 30px)); overflow: hidden; }
.notification-panel > header { padding: 18px 20px 14px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--border); }
.notification-panel h2 { margin: 2px 0 0; font-size: 20px; }
.notification-list { max-height: 430px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.notification-item:hover { background: var(--surface-muted); }
.notification-item.notification-unread { background: #fffaf0; box-shadow: inset 3px 0 0 var(--yellow); }
.notification-item.notification-read { color: var(--muted); }
.notification-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink); background: var(--yellow-soft); border-radius: 10px; font-weight: 900; }
.notification-item p { margin: 0 0 3px; font-size: 13px; }
.notification-item time { color: var(--muted); font-size: 11px; }

.app-main { position: relative; width: min(1540px, 100%); flex: 1; margin: 0 auto; padding: 38px clamp(22px, 3vw, 48px) 64px; }
.app-footer { padding: 22px clamp(22px, 3vw, 48px); display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--border); font-size: 12px; }
.app-footer a:hover { color: var(--ink); }
.page-header { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-header-copy { max-width: 760px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.page-header h1, .display-title { margin: 5px 0 7px; font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -.045em; font-weight: 880; }
.marker { padding: 0 .05em; background: linear-gradient(transparent 70%, var(--yellow) 70% 94%, transparent 94%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.page-header p { max-width: 680px; margin: 0; color: var(--muted); font-size: 16px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.section-title { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.section-copy { margin: 4px 0 0; color: var(--muted); }

.panel, .kt-portlet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-header, .kt-portlet__head { min-height: 68px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.panel-header h2, .kt-portlet__head-title { margin: 0; font-size: 18px; font-weight: 820; letter-spacing: -.02em; }
.panel-body, .kt-portlet__body { padding: 22px; }
.panel + .panel, .kt-portlet + .kt-portlet { margin-top: 18px; }
.panel-muted { background: var(--surface-muted); }
.grid { display: grid; gap: 18px; }
.grid-align-start { align-items: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stat-card { min-height: 148px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-card.accent { background: var(--yellow); border-color: var(--yellow); }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 750; }
.stat-label .ui-icon { width: 18px; height: 18px; }
.accent .stat-label { color: rgba(17,19,15,.7); }
.stat-value { margin-top: 14px; font-size: 36px; line-height: 1; font-weight: 880; letter-spacing: -.04em; }
.stat-caption { margin-top: 8px; color: var(--muted); font-size: 12px; }
.accent .stat-caption { color: rgba(17,19,15,.65); }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-action { min-height: 120px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: .16s ease; }
.quick-action:hover { border-color: #cfc7b8; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-action-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink); background: var(--yellow-soft); border-radius: 10px; font-weight: 900; }
.quick-action-mark .ui-icon { width: 19px; height: 19px; }
.quick-action strong { font-size: 15px; }
.quick-action span:last-child { color: var(--muted); font-size: 12px; }

.button, .btn { min-height: 42px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-weight: 800; cursor: pointer; transition: .14s ease; }
.button:hover, .btn:hover { border-color: #c9c1b2; transform: translateY(-1px); }
.button-primary, .btn-primary, .btn-brand { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-primary:hover, .btn-primary:hover, .btn-brand:hover { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.button-yellow { background: var(--yellow); border-color: var(--yellow); }
.button-yellow:hover { background: var(--yellow-bright); border-color: var(--yellow-bright); }
.button-danger, .btn-danger { color: var(--danger); background: var(--danger-soft); border-color: #ffc9c4; }
.button-ghost, .btn-secondary { background: transparent; }
.button-small, .btn-sm { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.text-button { padding: 0; color: var(--muted); background: none; border: 0; font-size: 12px; font-weight: 800; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.button[disabled], .btn[disabled], button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

label, .form-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 780; }
.form-control, input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="file"], input[type="date"], input[type="datetime-local"], textarea, select {
    width: 100%; min-height: 48px; padding: 11px 14px; color: var(--ink); background: var(--surface); border: 1px solid #d4cec2; border-radius: 12px; outline: none; transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
textarea { min-height: 116px; resize: vertical; }
input:focus, textarea:focus, select:focus, .form-control:focus { border-color: #9b8a42; box-shadow: 0 0 0 4px rgba(255,200,18,.16); }
input::placeholder, textarea::placeholder { color: #9c9f98; }
input[type="file"] { padding: 6px; color: var(--muted); cursor: pointer; }
input[type="file"]::file-selector-button { min-height: 34px; padding: 7px 12px; margin-right: 11px; color: var(--ink); background: var(--yellow-soft); border: 0; border-radius: 8px; font-weight: 800; cursor: pointer; }
input[type="file"]:hover::file-selector-button { background: var(--yellow); }
.file-picker { position: relative; }
.file-picker-input { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; margin: 0; padding: 0 !important; opacity: 0; }
.file-picker-label { min-height: 68px; margin: 0; padding: 10px 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; background: #fffdf9; border: 1px dashed #c8c0b2; border-radius: 12px; cursor: pointer; transition: .15s ease; }
.file-picker-label:hover, .file-picker-input:focus-visible + .file-picker-label { background: var(--yellow-soft); border-color: #c49a00; box-shadow: 0 0 0 4px rgba(255,200,18,.12); }
.file-picker-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 10px; font-size: 21px; font-weight: 900; }
.file-picker-label > span:nth-child(2) { min-width: 0; display: grid; }
.file-picker-label strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-label small { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-label b { padding: 7px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 11px; }
.form-group { margin-bottom: 18px; }
.form-help, .form-text { margin-top: 6px; color: var(--muted); font-size: 12px; }
.form-error, .invalid-feedback { margin-top: 5px; color: var(--danger); font-size: 12px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.cleanup-scope { min-width: 0; margin: 0; padding: 0; border: 0; }
.cleanup-scope legend { margin-bottom: 9px; font-size: 13px; font-weight: 780; }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-row input[type="checkbox"], .check-row input[type="radio"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); cursor: pointer; }
.check-row span, label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { cursor: pointer; }
.check-row .form-help { display: block; }
.input-with-action { display: flex; gap: 9px; }
.input-with-action > input { flex: 1; }
.smart-select { position: relative; width: 100%; }
.smart-select-control { width: 100%; min-height: 48px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); background: var(--surface); border: 1px solid #d4cec2; border-radius: 12px; cursor: pointer; text-align: left; }
.smart-select.open .smart-select-control { border-color: #9b8a42; box-shadow: 0 0 0 4px rgba(255,200,18,.16); }
.smart-select-multiple .smart-select-control { justify-content: flex-start; flex-wrap: wrap; }
.smart-select-tag { padding: 4px 7px; display: inline-flex; align-items: center; gap: 5px; background: var(--yellow-soft); border-radius: 7px; font-size: 12px; font-weight: 750; }
.smart-select-tag b { color: var(--muted); }
.smart-select-placeholder { color: #9c9f98; }
.smart-select-panel { position: absolute; z-index: 70; top: calc(100% + 7px); left: 0; right: 0; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-lg); }
.smart-select-search { min-height: 40px !important; margin-bottom: 7px; padding: 8px 10px !important; }
.smart-select-options { max-height: 250px; overflow-y: auto; }
.smart-select-options button { width: 100%; min-height: 37px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); background: transparent; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.smart-select-options button:hover, .smart-select-options button.selected { background: var(--yellow-soft); }
.import-preview { padding: 14px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 14px; }
.import-preview-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.import-preview-heading div { display: grid; }
.import-preview-heading small { color: var(--muted); }
.import-preview th button.selected { padding: 6px 9px; color: var(--ink); background: var(--yellow); border-radius: 8px; }
.import-preview td { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-counter { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 12px; }
.sms-counter { position: relative; align-items: center; flex-wrap: wrap; gap: 7px 14px; }
.encoding-status { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.encoding-status strong[data-unicode="true"] { color: var(--warning); }
.info-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; color: var(--ink); background: var(--yellow-soft); border: 1px solid #e8c43e; border-radius: 50%; font-size: 11px; font-weight: 900; cursor: pointer; }
.encoding-popover { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: min(520px, 100%); padding: 15px; display: grid; gap: 8px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); line-height: 1.45; }
.encoding-popover code { color: #5d4b00; white-space: normal; }

.alert { margin: 0 0 18px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--border); border-radius: 12px; }
.alert-success { color: var(--success); background: var(--success-soft); border-color: #b7e6cc; }
.alert-danger, .alert-error { color: var(--danger); background: var(--danger-soft); border-color: #ffc9c4; }
.alert-info { color: var(--info); background: var(--info-soft); border-color: #c8dcff; }
.alert-warning { color: var(--warning); background: var(--warning-soft); border-color: #f1d995; }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; }
.alert-symbol { width: 24px; height: 24px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 900; }
.alert-text { min-width: 0; }

.badge, .kt-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 8px; border-radius: 99px; color: var(--ink-soft); background: var(--cream-deep); font-size: 11px; font-weight: 850; letter-spacing: .02em; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8a8f84; }
.badge-success, .badge[data-state="DELIVERED"], .badge[data-state="SENT"], .badge[data-state="PAID"], .badge[data-state="Facturée"] { color: var(--success); background: var(--success-soft); }
.badge-success::before, .badge[data-state="DELIVERED"]::before, .badge[data-state="SENT"]::before, .badge[data-state="PAID"]::before, .badge[data-state="Facturée"]::before { background: var(--success); }
.badge-warning, .badge[data-state="NEW"], .badge[data-state="DIFFERED"], .badge[data-state="PROCESSING"], .badge[data-state="AWAITING_PAYMENT"], .badge[data-state="Legacy"] { color: var(--warning); background: var(--warning-soft); }
.badge-warning::before, .badge[data-state="NEW"]::before, .badge[data-state="DIFFERED"]::before, .badge[data-state="PROCESSING"]::before, .badge[data-state="AWAITING_PAYMENT"]::before, .badge[data-state="Legacy"]::before { background: var(--warning); }
.badge-danger, .badge[data-state="FAILED"], .badge[data-state="BLACKLISTED"], .badge[data-state="CANCELLED"], .badge[data-state="Erreur"] { color: var(--danger); background: var(--danger-soft); }
.badge-danger::before, .badge[data-state="FAILED"]::before, .badge[data-state="BLACKLISTED"]::before, .badge[data-state="CANCELLED"]::before, .badge[data-state="Erreur"]::before { background: var(--danger); }
.badge-yellow { color: #5d4700; background: var(--yellow-soft); }
.badge-yellow::before { background: #c59800; }

.async-table { overflow: hidden; }
.table-toolbar { padding: 15px 18px; display: flex; align-items: end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fff, #fffdf9); }
.table-field { display: grid; gap: 6px; margin: 0; }
.table-field > span:first-child { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.table-search { width: min(430px, 100%); }
.table-search-control { position: relative; display: block; }
.table-search-control > svg { position: absolute; z-index: 1; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.table-search input { min-height: 44px; padding: 9px 42px 9px 40px; background: var(--surface); border-radius: 11px; }
.table-search-control button { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; padding: 0; color: var(--muted); background: var(--surface-muted); border: 0; border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; }
.table-search-control button:hover { color: var(--ink); background: var(--yellow-soft); }
.table-size { flex: 0 0 auto; }
.table-size-control { display: flex; align-items: center; gap: 9px; }
.table-size-control small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.table-per-page { width: auto; min-height: 44px; padding: 9px 34px 9px 12px; background-color: var(--surface); border-radius: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #fcfbf8; font-size: 11px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
th button { padding: 0; display: inline-flex; align-items: center; gap: 6px; color: inherit; background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
th[aria-sort="ascending"] button, th[aria-sort="descending"] button { color: var(--ink); }
th[aria-sort="ascending"] .sort-indicator::before { content: "↑"; font-size: 13px; }
th[aria-sort="descending"] .sort-indicator::before { content: "↓"; font-size: 13px; }
th[aria-sort="ascending"] .sort-indicator, th[aria-sort="descending"] .sort-indicator { font-size: 0; color: var(--warning); }
tbody tr:hover { background: #fffdfa; }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: 13px; }
.cell-main { display: grid; gap: 2px; }
.cell-main strong { font-size: 13px; }
.cell-main small { color: var(--muted); }
.cell-truncate { display: block; max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { display: flex; justify-content: flex-end; gap: 7px; }
.cell-actions form { display: inline-flex; }
.button-compact { min-height: 31px; padding: 5px 9px; white-space: nowrap; }
.table-empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.table-empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 16px; }
.table-empty span { display: block; }
.table-empty .button { margin-top: 16px; }
.table-footer { min-height: 64px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); }
.table-meta { color: var(--muted); font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination button { min-width: 36px; height: 36px; padding: 0 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.pagination button.current { color: var(--ink); background: var(--yellow); border-color: var(--yellow); font-weight: 900; }
.pagination button:disabled { opacity: .4; }
.table-loading tbody { opacity: .58; }
.table-loading .table-toolbar::after { content: ""; width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid var(--cream-deep); border-top-color: var(--yellow); border-radius: 50%; animation: table-spin .65s linear infinite; }
.skeleton-row td span { display: block; width: min(180px, 80%); height: 13px; overflow: hidden; background: var(--cream-deep); border-radius: 99px; }
.skeleton-row td span::after { content: ""; display: block; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent); transform: translateX(-100%); animation: skeleton-shimmer 1.1s ease-in-out infinite; }
@keyframes table-spin { to { transform: rotate(360deg); } }
@keyframes skeleton-shimmer { to { transform: translateX(220%); } }

.pricing-panel { margin-top: 24px; overflow: hidden; }
.pricing-panel-header { align-items: center; }
.pricing-currency { padding: 7px 10px; color: #5b4500; background: var(--yellow-soft); border-radius: 99px; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.pricing-country-grid { padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.pricing-country-card { min-width: 0; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fffdf9; border: 1px solid var(--border); border-radius: 13px; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.pricing-country-card:hover { border-color: #e0bd35; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pricing-country-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.pricing-country-identity > div, .pricing-country-value { min-width: 0; display: grid; gap: 3px; }
.pricing-country-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pricing-country-identity small, .pricing-country-value small { color: var(--muted); font-size: 11px; }
.country-flag { width: 38px; height: 28px; flex: 0 0 auto; object-fit: cover; background: var(--surface); border: 1px solid rgba(17,19,15,.12); border-radius: 6px; box-shadow: 0 2px 5px rgba(17,19,15,.08); }
.country-cell { min-width: 0; display: inline-flex; align-items: center; gap: 10px; }
.country-cell-flag { width: 34px; height: 24px; flex: 0 0 auto; object-fit: cover; background: var(--surface); border: 1px solid rgba(17,19,15,.12); border-radius: 5px; box-shadow: 0 2px 5px rgba(17,19,15,.08); }
.country-cell-copy { min-width: 0; display: grid; gap: 1px; }
.country-cell-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-cell-copy small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pricing-country-value { flex: 0 0 auto; text-align: right; }
.pricing-country-value strong { font-size: 15px; }

.registration-country-overview { margin-bottom: 18px; }
.registration-country-add { margin: 0 !important; }
.registration-country-add .panel-header p { max-width: 620px; }
.registration-country-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 14px; }
.registration-country-form > div { min-width: 0; }
.registration-country-form .button { min-height: 48px; }
.registration-country-warning { margin-top: 0; }
.registration-country-list-heading { margin-top: 24px; }

.segmented { display: inline-flex; max-width: 100%; padding: 4px; background: var(--cream-deep); border-radius: 12px; }
.segmented button { min-height: 38px; padding: 8px 14px; background: transparent; border: 0; border-radius: 9px; color: var(--muted); font-weight: 780; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
.send-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 20px; align-items: start; }
.send-layout .send-summary { position: sticky; top: 96px; }
.composer-steps { grid-column: 1 / -1; padding: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.composer-steps a { position: relative; min-height: 68px; padding: 11px 13px 11px 54px; display: flex; flex-direction: column; justify-content: center; border-radius: 11px; }
.composer-steps a:hover { background: var(--surface-muted); }
.composer-steps a.active { background: var(--yellow-soft); }
.composer-steps a > span { position: absolute; left: 13px; top: 50%; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; transform: translateY(-50%); font-size: 12px; font-weight: 900; }
.composer-steps a.active > span { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.composer-steps strong { font-size: 13px; }
.composer-steps small { color: var(--muted); font-size: 11px; }
.composer-section { scroll-margin-top: 100px; }
.composer-advanced { display: flex; justify-content: flex-end; }
.composer-advanced-toggle { gap: 8px; color: var(--muted); border-style: dashed; box-shadow: none; }
.composer-advanced-toggle:hover, .composer-advanced-toggle[aria-expanded="true"] { color: var(--ink); background: var(--yellow-soft); border-color: #e0c34e; }
.composer-advanced-toggle small { color: inherit; font-size: 10px; font-weight: 700; opacity: .75; }
.composer-advanced-chevron { display: inline-grid; transition: transform .18s ease; }
.composer-advanced-toggle[aria-expanded="true"] .composer-advanced-chevron { transform: rotate(180deg); }
.composer-advanced-panel { border-style: dashed; }
.summary-actions { margin-top: 16px; display: grid; gap: 9px; }
.source-panel { margin-top: 18px; }
.file-import-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.file-import-actions .form-help { margin: 0; }
.import-stat-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.import-stat { min-width: 0; padding: 10px 11px; display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.import-stat b { font-size: 18px; }
.import-stat small { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.import-stat-valid b { color: var(--success); }
.import-stat-invalid b { color: var(--danger); }
.import-result { margin-top: 12px; padding: 13px; background: var(--success-soft); border: 1px solid #b7e6cc; border-radius: 12px; }
.import-result > strong { color: var(--success); }
.import-result > small { display: block; margin-top: 9px; color: var(--ink-soft); }
.import-result .import-stat-grid { margin-top: 9px; }
.recipient-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.recipient-chip { padding: 5px 9px; color: var(--ink); background: var(--yellow-soft); border-radius: 99px; font-size: 12px; font-weight: 750; }
.phone-device { position: relative; width: min(252px, 100%); aspect-ratio: 9 / 18.7; margin: 16px auto 24px; padding: 8px; background: linear-gradient(145deg, #222, #050505 55%, #343434); border: 1px solid #000; border-radius: 42px; box-shadow: 0 24px 48px rgba(17,19,15,.2), inset 0 0 0 1px #4d4d4d; }
.phone-button { position: absolute; width: 3px; background: #252525; border-radius: 3px; }
.phone-button-left { left: -4px; top: 112px; height: 62px; box-shadow: 0 74px 0 #252525; }
.phone-button-right { right: -4px; top: 142px; height: 88px; }
.phone-screen { position: relative; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #f7f7f5; border-radius: 34px; }
.phone-status { height: 34px; padding: 10px 17px 0; display: flex; justify-content: space-between; color: #111; font-size: 9px; }
.phone-status strong { font-size: 10px; }
.phone-island { position: absolute; z-index: 3; top: 8px; left: 50%; width: 72px; height: 20px; transform: translateX(-50%); background: #000; border-radius: 20px; }
.phone-conversation-header { min-height: 68px; padding: 5px 14px 9px; display: grid; grid-template-columns: 26px 1fr 26px; grid-template-rows: 36px 15px; place-items: center; background: rgba(255,255,255,.92); border-bottom: 1px solid #dfdfdd; backdrop-filter: blur(12px); }
.phone-conversation-header > span { grid-row: 1 / 3; justify-self: start; color: #0b73e0; font-size: 29px; font-weight: 300; }
.phone-avatar { grid-column: 2; width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; font-size: 14px; font-weight: 900; }
.phone-conversation-header strong { grid-column: 2; grid-row: 2; align-self: end; font-size: 9px; }
.phone-conversation-header small { grid-column: 3; grid-row: 1 / 3; color: #8b8b89; font-size: 7px; }
.phone-conversation { flex: 1; padding: 20px 11px; display: flex; align-items: flex-end; flex-direction: column; background: linear-gradient(rgba(250,250,248,.9), rgba(245,245,242,.95)); }
.phone-conversation time { align-self: center; margin-bottom: 16px; color: #8c8c89; font-size: 8px; font-weight: 650; }
.message-bubble { position: relative; min-height: 56px; max-height: 238px; max-width: 91%; overflow: hidden; padding: 10px 11px; color: #111; background: #d9d9dd; border-radius: 16px 16px 4px 16px; font-size: 10px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble::after { content: ""; position: absolute; right: -4px; bottom: 0; width: 10px; height: 12px; background: #d9d9dd; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.preview-variable { padding: 1px 3px; color: #654b00; background: #ffe06a; border-radius: 4px; font-weight: 850; }
.phone-conversation > small { margin: 4px 4px 0; color: #898986; font-size: 7px; }
.phone-compose { min-height: 48px; margin: 0 8px 8px; padding: 6px 6px 6px 12px; display: flex; align-items: center; justify-content: space-between; color: #92928e; background: #fff; border: 1px solid #cececa; border-radius: 20px; font-size: 9px; }
.phone-compose b { width: 25px; height: 25px; display: grid; place-items: center; color: #fff; background: #a9a9a6; border-radius: 50%; font-size: 14px; }
.phone-home { width: 84px; height: 4px; flex: 0 0 auto; margin: 0 auto 7px; background: #111; border-radius: 8px; }
.summary-list { display: grid; gap: 0; margin: 16px 0 0; }
.summary-row { padding: 11px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.summary-row span { color: var(--muted); }
.summary-row strong { text-align: right; }
.payment-method { padding: 12px; display: flex; align-items: center; gap: 11px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 12px; }
.payment-method > div { flex: 1; display: grid; }
.payment-method small { color: var(--muted); }
.payment-method-expired, .payment-method-invalid { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); }
.payment-method-default { border: 2px solid var(--yellow); background: linear-gradient(135deg, rgba(255, 200, 18, .17), var(--surface-muted) 54%); box-shadow: 0 0 0 3px rgba(255, 200, 18, .13), var(--shadow-sm); }
.payment-method-default.payment-method-expired, .payment-method-default.payment-method-invalid { border-color: var(--danger); background: linear-gradient(135deg, rgba(180, 35, 24, .12), var(--danger-soft) 54%); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.payment-method > div > strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.payment-method .payment-method-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.payment-card-icon { width: 38px; height: 30px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 7px; }
.invalid-recipients { margin-top: 14px; padding: 12px 14px; color: var(--danger); background: var(--danger-soft); border: 1px solid #ffc9c4; border-radius: 11px; font-size: 12px; }
.invalid-recipients ul { max-height: 96px; margin: 7px 0 0; padding-left: 18px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.composer-alert { margin-top: 16px; font-size: 12px; }
.composer-alert > span:first-child { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 900; }
.sending-hours { margin-bottom: 0; }

.webhook-settings { margin-top: 20px; scroll-margin-top: 100px; overflow: hidden; }
.webhook-settings .panel-header p { max-width: 680px; }
.webhook-list { display: grid; gap: 10px; }
.webhook-loading { min-height: 92px; display: grid; place-items: center; color: var(--muted); background: var(--surface-muted); border: 1px dashed var(--border); border-radius: 14px; }
.webhook-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.webhook-pagination span { color: var(--muted); font-size: 12px; font-weight: 750; }
.webhook-card { padding: 14px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; background: #fffdf9; border: 1px solid var(--border); border-radius: 14px; }
.webhook-card-default { border-color: #e0bd35; box-shadow: inset 3px 0 0 var(--yellow); }
.webhook-mark { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); background: var(--yellow-soft); border-radius: 12px; font-size: 21px; font-weight: 900; }
.webhook-copy { min-width: 0; display: grid; gap: 4px; }
.webhook-copy > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.webhook-copy code { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.webhook-copy small { color: var(--muted); font-size: 11px; }
.webhook-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.danger-link { color: var(--danger); }
.webhook-empty { min-height: 112px; padding: 22px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); background: var(--surface-muted); border: 1px dashed #cec6b8; border-radius: 14px; }
.webhook-empty > span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 12px; font-size: 21px; }
.webhook-empty p { margin: 3px 0 0; }
.webhook-editor, .webhook-secret { padding: 20px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 14px; }
.webhook-editor-heading { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.webhook-editor h3, .webhook-secret h3 { margin: 2px 0 0; font-size: 20px; }
.webhook-editor-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 9px; }
.webhook-secret { display: grid; gap: 15px; background: var(--yellow-soft); border-color: #e5c33d; }
.webhook-secret p { margin: 4px 0 0; color: #655000; }
.webhook-secret > .button { justify-self: start; }
.webhook-custom-fields { margin-top: 16px; padding: 16px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 13px; }
.webhook-event-strip { margin-top: 16px; padding: 12px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--cream); border-radius: 12px; }
.webhook-event-strip span { margin-right: auto; color: var(--muted); font-size: 12px; }
.webhook-event-strip strong { padding: 5px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 11px; }
.webhook-policy { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid rgba(236,183,0,.34); border-radius: 14px; background: linear-gradient(135deg,rgba(255,198,10,.12),rgba(255,255,255,.85)); }
.webhook-policy-value { flex: 0 0 auto; display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 4px; border-radius: 12px; background: var(--yellow); color: #171914; font-weight: 900; }
.webhook-policy strong { display: block; margin: 1px 0 3px; }
.webhook-policy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.variable-tool { margin-bottom: 10px; padding: 12px; display: grid; gap: 8px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 12px; }
.variable-tool > span { font-size: 12px; font-weight: 820; }
.variable-tool small { color: var(--muted); }
.variable-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.variable-chip { min-height: 32px; padding: 6px 10px; color: #5b4500; background: var(--yellow-soft); border: 1px solid #e7c644; border-radius: 99px; font-size: 12px; font-weight: 800; cursor: pointer; }
.variable-chip::before { content: "＋ "; }
.variable-chip:hover { background: var(--yellow); }
.recipient-editor { position: relative; }
.recipient-editor textarea { position: relative; z-index: 1; margin: 0; }
.recipient-highlight { position: absolute; z-index: 2; inset: 0; min-height: 116px; padding: 11px 14px; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--danger); border-radius: 12px; font: inherit; line-height: inherit; white-space: pre-wrap; pointer-events: none; }
.recipient-highlight .invalid-number { color: var(--danger); background: var(--danger-soft); font-weight: 850; border-radius: 4px; animation: invalid-pulse .72s ease both; }
.recipient-highlight .valid-number { color: #087548; background: #dff8eb; font-weight: 850; border-radius: 4px; animation: valid-confirm .72s ease both; }
.recipient-highlight.validation-success { border-color: #25a86b; box-shadow: 0 0 0 3px rgba(37,168,107,.12); }
.recipient-editor textarea.validation-removing { color: transparent; caret-color: transparent; }
@keyframes invalid-pulse { 0%,100% { opacity: 1; transform: none; } 50% { opacity: .48; } }
@keyframes valid-confirm { 0% { color: var(--ink); background: transparent; } 42% { color: #087548; background: #c9f2dd; transform: scale(1.015); } 100% { color: #087548; background: #dff8eb; transform: none; } }

.themed-date-picker { position: relative; }
.date-picker-control { position: relative; }
.date-picker-control input { padding-right: 50px; cursor: pointer; }
.date-picker-trigger { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; padding: 0; color: var(--ink); background: var(--yellow-soft); border: 0; border-radius: 9px; font-size: 19px; cursor: pointer; }
.date-picker-popover { position: absolute; z-index: 45; top: calc(100% + 10px); left: 0; width: min(370px, calc(100vw - 44px)); padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.themed-date-picker.open-up .date-picker-popover { top: auto; bottom: calc(100% + 10px); }
.date-picker-popover > header, .date-picker-popover > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.date-picker-popover > header button { width: 34px; height: 34px; padding: 0; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.date-picker-popover > header strong { text-transform: capitalize; }
.date-picker-weekdays, .date-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-picker-weekdays { margin: 14px 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.date-picker-days button, .date-picker-days > span { aspect-ratio: 1; min-width: 0; display: grid; place-items: center; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 12px; cursor: pointer; }
.date-picker-days button:hover:not(:disabled) { background: var(--yellow-soft); }
.date-picker-days button.today { border-color: #d5aa00; }
.date-picker-days button.selected { background: var(--yellow); border-color: var(--yellow); font-weight: 900; }
.date-picker-days button:disabled { opacity: .25; cursor: not-allowed; }
.date-picker-time { margin: 14px 0; padding: 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; background: var(--surface-muted); border-radius: 11px; }
.date-picker-time label { margin: 0; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.date-picker-time select { min-height: 40px; margin-top: 4px; padding-block: 7px; color: var(--ink); background: #fff; }

.empty-state { margin: 0; padding: 28px 18px; color: var(--muted); text-align: center; }
.divider { height: 1px; margin: 22px 0; background: var(--border); }
.stack { display: grid; gap: 14px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-gap { margin-top: 18px; }
.section-gap-lg { margin-top: 24px; }
.section-spaced { margin-bottom: 24px; }
.section-heading { min-height: auto; padding: 0 0 12px; border: 0; }
.content-narrow { max-width: 900px; }
.actions-end { margin-top: 20px; justify-content: flex-end; }
.text-center { text-align: center; }
.form-save-bar { position: sticky; z-index: 20; bottom: 14px; max-width: 620px; min-height: 62px; margin: 22px 0 0 auto; padding: 9px 10px 9px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; color: var(--muted); background: rgba(255,255,255,.9); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 44px rgba(17,19,15,.14); backdrop-filter: blur(16px); font-size: 12px; }
.form-save-bar.dirty { color: var(--warning); border-color: #dfc05a; }
.muted { color: var(--muted); }
.danger { color: var(--danger); }
.success { color: var(--success); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.disclosure-panel { margin-top: 0 !important; }
.disclosure-panel > summary { cursor: pointer; list-style: none; }
.disclosure-panel > summary::-webkit-details-marker { display: none; }
.disclosure-chevron { transition: transform .18s ease; }
.disclosure-panel[open] .disclosure-chevron { transform: rotate(180deg); }

.odoo-sync-panel { overflow: hidden; }
.odoo-sync-panel .panel-header { background: linear-gradient(135deg, #fffdf8 0%, #fff8db 100%); }
.odoo-sync-status[data-state="PENDING"],
.odoo-sync-status[data-state="RUNNING"] { color: var(--info); background: var(--info-soft); }
.odoo-sync-status[data-state="PENDING"]::before,
.odoo-sync-status[data-state="RUNNING"]::before { background: var(--info); }
.odoo-sync-status[data-state="COMPLETED"] { color: var(--success); background: var(--success-soft); }
.odoo-sync-status[data-state="COMPLETED"]::before { background: var(--success); }
.odoo-sync-status[data-state="PARTIAL"] { color: var(--warning); background: var(--warning-soft); }
.odoo-sync-status[data-state="PARTIAL"]::before { background: var(--warning); }
.odoo-sync-status[data-state="FAILED"] { color: var(--danger); background: var(--danger-soft); }
.odoo-sync-status[data-state="FAILED"]::before { background: var(--danger); }
.odoo-sync-status[data-state="RUNNING"]::before { animation: odoo-sync-pulse 1.3s ease-in-out infinite; }
.odoo-sync-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 28px; align-items: stretch; }
.odoo-sync-copy { min-width: 0; }
.odoo-sync-copy > .section-copy { margin-bottom: 18px; }
.odoo-sync-rule { margin-bottom: 16px; padding: 15px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 13px; }
.odoo-sync-rule-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 10px; font-size: 13px; font-weight: 900; }
.odoo-sync-rule strong { display: block; margin: 1px 0 4px; font-size: 13px; }
.odoo-sync-rule p { margin: 0; color: var(--muted); font-size: 12px; }
.odoo-sync-note { margin-bottom: 16px; }
.odoo-sync-action { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.odoo-sync-action small { max-width: 410px; color: var(--muted); }
.odoo-sync-summary { min-height: 250px; padding: 20px; display: flex; flex-direction: column; justify-content: center; background: #151712; border: 1px solid #282b23; border-radius: 16px; color: #fff; }
.odoo-sync-progress { margin-bottom: 20px; }
.odoo-sync-progress-heading { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #c6c9c1; font-size: 12px; font-weight: 750; }
.odoo-sync-progress-heading strong { color: var(--yellow); font-size: 14px; }
.odoo-sync-progress-track { height: 9px; overflow: hidden; background: #30342b; border-radius: 99px; }
.odoo-sync-progress-track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--yellow-bright)); border-radius: inherit; transition: width .35s ease; }
.odoo-sync-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.odoo-sync-metric { min-width: 0; padding: 13px; display: grid; gap: 5px; background: #20231d; border: 1px solid #30342b; border-radius: 11px; }
.odoo-sync-metric span { color: #aeb2a9; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.odoo-sync-metric strong { color: #fff; font-size: 22px; line-height: 1.15; font-weight: 880; letter-spacing: -.03em; }
.odoo-sync-metric strong b { font: inherit; }
.odoo-sync-metric.success strong { color: #5fdda2; }
.odoo-sync-metric.danger strong { color: #ff9d94; }
.odoo-sync-metric .odoo-sync-date { font-size: 13px; letter-spacing: 0; }
.odoo-sync-empty { margin: auto; padding: 26px 16px; color: #aeb2a9; text-align: center; font-size: 13px; }
@keyframes odoo-sync-pulse { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.25); } }

.auth-shell { background: var(--cream); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(500px, .95fr); }
.auth-brand-panel { position: relative; padding: clamp(36px, 6vw, 88px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: var(--ink); background: #fffaf1; border-right: 1px solid #eadfca; }
.auth-brand-panel::before { content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -175px; border: 1px solid rgba(255,200,18,.35); border-radius: 50%; box-shadow: 0 0 0 58px rgba(255,200,18,.08), 0 0 0 118px rgba(255,200,18,.055), 0 0 0 178px rgba(255,200,18,.035); }
.auth-brand-panel::after { content: ""; position: absolute; right: -7%; bottom: -18%; width: 380px; height: 380px; background: linear-gradient(145deg, var(--yellow), #ffe270); border-radius: 50%; box-shadow: 0 30px 90px rgba(255,200,18,.25); opacity: .88; }
.brand-light { position: relative; z-index: 1; color: var(--ink); font-size: 30px; }
.auth-promise { position: relative; z-index: 2; max-width: 620px; }
.auth-promise .eyebrow { color: var(--yellow); }
.auth-promise h1 { margin: 13px 0 18px; font-size: clamp(48px, 6.5vw, 88px); line-height: .98; letter-spacing: -.055em; }
.auth-promise p { max-width: 520px; margin: 0; color: var(--muted); font-size: 18px; }
.auth-proof { position: relative; z-index: 2; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.auth-proof span { margin-right: 8px; color: var(--yellow); }
.auth-form-panel { padding: 48px clamp(28px, 7vw, 100px) 26px; display: flex; flex-direction: column; justify-content: center; }
.language-switcher { display: inline-flex; align-items: center; gap: 5px; }
.language-switcher a { min-width: 42px; height: 34px; padding: 5px 7px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); background: rgba(255,255,255,.65); border: 1px solid var(--border); border-radius: 9px; font-size: 10px; font-weight: 850; }
.language-switcher a:hover, .language-switcher a.active { color: var(--ink); background: var(--yellow-soft); border-color: #e0bd35; }
.language-switcher img { width: 17px; height: 12px; object-fit: cover; border-radius: 2px; }
.auth-form-panel > .language-switcher,
.auth-form-panel > .language-select-compact { position: absolute; top: 22px; right: 26px; }
.language-select-compact select { width: auto; min-width: 76px; height: 38px; padding: 0 28px 0 10px; border-radius: 10px; background-color: rgba(255,255,255,.72); font-size: 12px; font-weight: 850; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.auth-card { width: min(520px, 100%); margin: auto; }
.auth-card h1, .auth-card h2 { margin: 0 0 9px; font-size: 38px; line-height: 1.08; letter-spacing: -.04em; }
.auth-card > p { color: var(--muted); }
.auth-card form { margin-top: 28px; }
.oauth-actions { margin-top: 24px; display: grid; gap: 10px; }
.oauth-button { min-height: 54px; padding: 11px 14px; display: grid; grid-template-columns: 26px 1fr 18px; align-items: center; gap: 12px; color: var(--ink); background: #fff; border: 1px solid #d8d2c6; border-radius: 13px; font-weight: 800; transition: .16s ease; }
.oauth-button:hover { color: var(--ink); border-color: #aaa294; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.oauth-button-microsoft { background: #fbfbfb; }
.oauth-button-facebook { background: #f7faff; border-color: #cddcf5; }
.oauth-logo, .oauth-logo svg { width: 23px; height: 23px; display: block; }
.oauth-arrow { color: var(--muted); font-size: 16px; text-align: right; }
.auth-password-fallback { margin-top: 18px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.55); }
.auth-password-fallback > summary { padding: 14px 16px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; list-style: none; }
.auth-password-fallback > summary::-webkit-details-marker { display: none; }
.auth-password-fallback > summary::after { content: "⌄"; margin-left: 8px; }
.auth-password-fallback[open] > summary { color: var(--ink); border-bottom: 1px solid var(--border); }
.auth-password-fallback[open] > summary::after { content: "⌃"; }
.auth-password-fallback form { margin-top: 0; padding: 18px; }
.oauth-divider { margin: 18px 0 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.oauth-divider::before, .oauth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.oauth-connected { margin: 22px 0 6px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; background: var(--success-soft); border: 1px solid #b7e6cc; border-radius: 13px; }
.oauth-connected > div { min-width: 0; display: grid; }
.oauth-connected small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.oauth-connected form { margin: 0 0 0 auto; }
.oauth-connected .text-button { white-space: nowrap; }
.oauth-provider-icon { width: 12px; height: 12px; flex: 0 0 auto; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 5px rgba(31,145,91,.12); }
.auth-mobile-brand { display: none; margin-bottom: 34px; }
.auth-footer { margin: 30px auto 0; color: var(--muted); font-size: 11px; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { width: min(390px, calc(100vw - 40px)); padding: 13px 16px; color: #fff; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.confirm-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgba(17,19,15,.56); backdrop-filter: blur(3px); }
.confirm-dialog-content { padding: 26px; display: grid; grid-template-columns: 46px 1fr; gap: 16px; }
.confirm-dialog-content h2 { margin: 3px 0 8px; font-size: 22px; line-height: 1.2; }
.confirm-dialog-content p { margin: 0; color: var(--muted); }
.confirm-dialog-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); border: 1px solid #ffc9c4; border-radius: 14px; font-size: 19px; font-weight: 900; }
.confirm-dialog-actions { padding: 16px 26px 22px; display: flex; justify-content: flex-end; gap: 10px; }

/* Couche de transition pour les formulaires Twig encore rendus par Symfony. */
.kt-container { width: 100%; }
.kt-content, .kt-grid, .kt-grid__item { display: block; }
.kt-portlet { margin-bottom: 18px; }
.kt-portlet__head-label, .kt-portlet__head-toolbar, .kt-portlet__head-actions { display: flex; align-items: center; gap: 10px; }
.kt-portlet__body--fit { padding: 0; }
.kt-form__section { margin-bottom: 24px; }
.kt-form__heading { margin: 0 0 12px; font-size: 18px; }
.kt-form__actions { padding-top: 18px; display: flex; gap: 10px; border-top: 1px solid var(--border); }
.row { display: flex; flex-wrap: wrap; margin: -8px; }
.row > [class*="col-"] { padding: 8px; }
.col-12, .col-md-12, .col-lg-12 { width: 100%; }
.col-6, .col-md-6, .col-lg-6 { width: 50%; }
.col-4, .col-md-4, .col-lg-4 { width: 33.333%; }
.col-3, .col-md-3, .col-lg-3 { width: 25%; }
.table-responsive { overflow-x: auto; }
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(17,19,15,.5); }
.modal.show { display: grid; }
.modal-dialog { width: min(560px, 100%); }
.modal-content { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header, .modal-footer { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); border-bottom: 0; }
.modal-body { padding: 20px; }
.modal-title { margin: 0; }
.close { font-size: 20px; }
.nav-tabs { display: flex; gap: 6px; padding: 0; margin: 0 0 18px; list-style: none; border-bottom: 1px solid var(--border); }
.nav-tabs a { display: block; padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 750; }
.nav-tabs .active a, .nav-tabs a.active { color: var(--ink); border-color: var(--yellow); }
.tab-pane { display: none; }
.tab-pane.active, .tab-pane.show { display: block; }
.kt-hidden, .d-none { display: none !important; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .odoo-sync-layout { grid-template-columns: 1fr; }
    .send-layout { grid-template-columns: 1fr; }
    .send-layout .send-summary { position: static; }
    .user-menu-copy { display: none; }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    :root { --sidebar: 282px; }
    .app-sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .app-sidebar.open { transform: translateX(0); }
    body.sidebar-open { overflow: hidden; }
    .app-workspace { width: 100%; margin-left: 0; }
    .mobile-menu { display: inline-grid; }
    .header-mobile-brand { display: inline-flex; margin-right: auto; }
    .header-context { display: none; }
    .app-header { padding-inline: 16px; }
    .credit-chip span { display: none; }
    .app-main { padding: 28px 16px 48px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .composer-steps { position: sticky; z-index: 25; top: 78px; grid-template-columns: repeat(3, 1fr); }
    .composer-steps a { min-height: 54px; padding: 8px; align-items: center; text-align: center; }
    .composer-steps a > span { position: static; width: 25px; height: 25px; transform: none; }
    .composer-steps small { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 34px 22px 22px; }
    .auth-mobile-brand { display: inline-flex; }
    .col-6, .col-md-6, .col-lg-6, .col-4, .col-md-4, .col-lg-4, .col-3, .col-md-3, .col-lg-3 { width: 100%; }
}

@media (max-width: 560px) {
    .page-header h1, .display-title { font-size: 36px; }
    .header-actions { gap: 6px; }
    .app-header { min-height: 70px; gap: 8px; }
    .app-header .language-select-compact { display: none; }
    .header-mobile-brand { font-size: 18px; }
    .sidebar-language { display: block; }
    .sidebar-language .language-select-compact select { width: 100%; color: var(--ink); background: #fff; }
    .user-menu-button { padding-right: 4px; }
    .user-menu-button > span:last-child { display: none; }
    .user-menu-button > .ui-icon { display: none; }
    .credit-chip { padding-inline: 10px; }
    .table-toolbar, .table-footer { align-items: stretch; flex-direction: column; }
    .table-search { width: 100%; }
    .table-size { width: 100%; }
    .table-size-control { justify-content: space-between; }
    .table-per-page { flex: 1; }
    .table-scroll { padding: 10px; overflow: visible; background: var(--surface-muted); }
    .async-table table, .async-table tbody, .async-table tr, .async-table td { display: block; width: 100%; }
    .async-table thead { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
    .async-table tbody { display: grid; gap: 10px; }
    .async-table tbody tr { padding: 8px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-sm); }
    .async-table tbody tr.skeleton-row td { display: block; border: 0; }
    .async-table tbody tr.skeleton-row td:not(:first-child) { display: none; }
    .async-table tbody tr:hover { background: var(--surface); }
    .async-table tbody td { min-width: 0; padding: 9px 0; display: grid; grid-template-columns: minmax(105px, 38%) minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
    .async-table tbody td:last-child { border-bottom: 0; }
    .async-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
    .async-table tbody td[data-label=""] { display: block; }
    .async-table tbody td[data-label=""]::before { display: none; }
    .cell-truncate { max-width: 100%; white-space: normal; }
    .cell-actions { justify-content: flex-start; flex-wrap: wrap; }
    .pagination { justify-content: center; }
    .pagination button { min-width: 42px; height: 42px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .odoo-sync-panel .panel-header { align-items: flex-start; flex-direction: column; }
    .odoo-sync-layout { padding: 17px; gap: 20px; }
    .odoo-sync-summary { min-height: 0; padding: 15px; }
    .odoo-sync-metrics { grid-template-columns: 1fr 1fr; }
    .odoo-sync-action { align-items: stretch; flex-direction: column; }
    .odoo-sync-action .button { width: 100%; }
    .webhook-card { grid-template-columns: 40px minmax(0, 1fr); }
    .webhook-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .webhook-settings .panel-header { align-items: flex-start; flex-direction: column; }
    .input-with-action { flex-direction: column; }
    .registration-country-form { grid-template-columns: 1fr; }
    .app-footer { gap: 10px; flex-direction: column; }
    .pricing-panel-header { align-items: flex-start; }
    .pricing-country-grid { padding: 10px; }
    .confirm-dialog-content { padding: 22px; grid-template-columns: 40px 1fr; }
    .confirm-dialog-icon { width: 40px; height: 40px; }
    .confirm-dialog-actions { padding: 14px 22px 20px; }
    .confirm-dialog-actions .button { flex: 1; }
    .form-save-bar { bottom: 8px; width: 100%; margin-top: 16px; justify-content: space-between; }
    .composer-steps { top: 70px; padding: 5px; border-radius: 13px; }
    .composer-steps a { min-width: 0; padding-inline: 3px; }
    .composer-steps strong { max-width: 100%; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .segmented { width: 100%; display: grid; grid-template-columns: 1fr; }
    .segmented button { width: 100%; }
    .import-stat-grid { grid-template-columns: 1fr; }
    .import-stat { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
    .import-stat small { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
