@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Grand+Hotel&display=swap');


:root {
    --white: #ffffff;

    --bg: #f6f7fb;
    --bg-alt: #f1f4f9;

    --surface: rgba(255, 255, 255, 0.92);
    --surface-overlay: rgba(255, 255, 255, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --surface-solid: var(--white);
    --surface-soft: #fbfcfe;
    --surface-muted: #f8fafc;
    --surface-elevated: rgba(255, 255, 255, 0.98);

    --text: #101828;
    --text-soft: #667085;
    --text-faint: #98a2b3;
    --text-muted: #475569;
    --text-heading: #0f172a;

    --line: #e6e8ef;
    --line-strong: #d9dde7;
    --line-soft: #eef1f5;
    --line-muted: #e2e8f0;

    --primary: #ff6b4a;
    --primary-hover: #f55a37;
    --primary-soft: #fff1ed;
    --primary-deep: #9a3412;
    --primary-gradient: linear-gradient(135deg, rgb(255, 77, 109), rgb(255, 112, 67));
    --primary-gradient-alt: linear-gradient(135deg, #ff7b5d, #ff3d7f);

    --success: #12b981;
    --success-soft: #ecfdf5;
    --success-line: #b7ebd1;
    --success-text: #067647;

    --warning: #f59e0b;
    --warning-soft: #fff7e8;
    --warning-line: #f8d08a;
    --warning-text: #b45309;

    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --danger-line: #fecaca;
    --danger-text: #b42318;

    --shadow-xs: 0 4px 10px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 10px 28px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 18px 44px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 26px 60px rgba(16, 24, 40, 0.12);

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-modal: 20px;
    --radius-pill: 999px;

    --panel-gradient: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    --panel-gradient-soft: linear-gradient(180deg, var(--white) 0%, #fcfdff 100%);
    --focus-ring: 0 0 0 4px rgba(255, 107, 74, 0.12);

    --container: 1320px;
    --transition: 0.18s ease;
}

/* reset */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 107, 74, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.08), transparent 28%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: var(--radius-pill);
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.55;
    z-index: 0;
}

body::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -80px;
    background: rgba(255, 107, 74, 0.18);
}

body::after {
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: -120px;
    background: rgba(99, 102, 241, 0.14);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}
h1,
h2,
h3,
h4 {
    margin: 0 0 1em 0;
    font-weight: 600;
}
strong {
    font-weight: 600;
}

h3.no-margin {
  margin: 0!important;
}

/* layout */

.admin-layout {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.panel {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-header h2,
.panel-header h3 {
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* topbar */

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 18px 22px;
    margin-bottom: 24px;
    background: var(--surface-overlay);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 999;
}

.topbar-left,
.topbar-center,
.topbar-right {
    min-width: 0;
}

.topbar h1 {
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.topbar p {
    color: var(--text-soft);
    font-size: 14px;
}

.topbar-center {
    position: relative;
}

.topbar-right {
    justify-self: end;
}

.topbar-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-pill);
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(18, 185, 129, 0.10);
    flex: 0 0 auto;
}

/* buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

.btn:hover {
  /*  transform: translateY(-1px);*/
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    color: var(--white);
    background-image: var(--primary-gradient);
    box-shadow: 0 12px 24px rgba(255, 107, 74, 0.10);
    transition: filter .3s ease;
}

.btn-primary:hover {
    /*background: linear-gradient(35deg, rgb(255, 77, 109), rgb(255, 77, 109));*/
    filter: brightness(1.1);
}


.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

.btn-block {
    width: 100%;
}

/* forms */

.settings-form,
.customers-filters {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

input,
select {
    height: 48px;
    padding: 0 14px;
}

/* fix inputs globaux */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
}

textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-faint);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 107, 74, 0.45);
    box-shadow: var(--focus-ring);
    background: #fff;
}

.field-help {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-soft);
}

/* alerts */

.alert-success,
.alert-error {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.alert-success {
    background: var(--success-soft);
    color: var(--success-text);
    border: 1px solid var(--success-line);
}

.alert-error {
    background: var(--danger-soft);
    color: var(--danger-text);
    border: 1px solid var(--danger-line);
}

.empty-state {
    padding: 34px 20px;
    text-align: center;
    color: var(--text-soft);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
}

/* stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.88) 100%);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -10px;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-pill);
    background: rgba(255, 107, 74, 0.06);
    filter: blur(20px);
}

.stat-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    position: relative;
    z-index: 1;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text);
}

/* search */

.global-search {
    position: relative;
}

.global-search input {
    width: 100%;
    height: 60px;
    padding: 0 16px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 1px rgba(16, 24, 40, 0.02);
    font-size: 18px;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
    overflow: hidden;
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.search-result-item {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #f2f4f7;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background var(--transition);
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item:hover {
    background: #fafbfc;
}

.search-result-item strong {
    font-size: 14px;
    font-weight: 600;
}

.search-result-item span,
.search-result-empty {
    color: var(--text-soft);
    font-size: 13px;
}

.search-result-empty {
    padding: 16px;
}

/* pending scans */

.scan-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--white) 0%, #fcfdff 100%);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 14px;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.scan-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--line-strong);
}

.scan-card:last-child {
    margin-bottom: 0;
}

.scan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.scan-card-head h3 {
    font-size: 19px;
    letter-spacing: -0.02em;
}

.scan-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 7px 10px;
    white-space: nowrap;
}

.scan-status {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.scan-meta {
    margin-bottom: 16px;
    color: var(--text-soft);
    font-size: 14px;
}

.scan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* recent list */

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.recent-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
}

.recent-list li:last-child {
    border-bottom: 0;
}

.recent-list li strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.recent-list li span {
    font-size: 13px;
    color: var(--text-soft);
}

/* cards and meta */

.meta-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--white) 0%, #fcfdff 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-card strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meta-card span {
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.customer-sheet-header h2 {
    font-size: 28px;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.customer-sheet-header p {
    color: var(--text-soft);
    font-size: 14px;
}

.customer-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.customer-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

/* badges */

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success-text);
    border-color: var(--success-line);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning-text);
    border-color: var(--warning-line);
}

.badge-muted {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

/* customers table */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
}

#customers-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

#customers-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 16px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
    background: rgba(249, 250, 251, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

#customers-table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    font-size: 14px;
    color: var(--text);
}

#customers-table tbody tr:last-child td {
    border-bottom: 0;
}

#customers-table tbody tr {
    transition: background var(--transition);
}

#customers-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.75);
}

.table-sub {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-soft);
}

.customers-search-form input {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-sm);
}

/* search box in side panel */

.search-box h3 {
    font-size: 18px;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.search-box input {
    margin-bottom: 10px;
}

/* modal */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.38);
    backdrop-filter: blur(6px);
}

.modal-dialog {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    margin: 20px auto;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    z-index: 99;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background var(--transition), transform var(--transition);
}

.modal-close:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

/* qr settings */

.qr-settings-block {
    max-width: 520px;
}

.qr-preview {
    margin-top: 18px;
    display: inline-flex;
    padding: 18px;
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
}

.qr-preview img {
    display: block;
    width: 220px;
    height: 220px;
}

/* utility */

a.btn {
    display: inline-flex;
}

.text-muted {
    color: var(--text-soft);
}

.icon-btn {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.modal-dialog-settings {
    width: min(920px, calc(100vw - 32px));
}

.settings-modal-inner .panel {
    box-shadow: none;
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
}

#settings-form-message {
    margin-bottom: 18px;
}

/* état initial modale */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* modale active */
.modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* backdrop */
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.32);
    backdrop-filter: blur(0px);
    opacity: 0;
    transition:
        opacity 0.3s ease,
        backdrop-filter 2s ease,
        background 0.3s ease;
}

.modal.is-visible .modal-backdrop {
    opacity: 1;
    backdrop-filter: blur(6px);
    background: rgba(15, 23, 42, 0.25);
}

/* dialog animation */
.modal-dialog {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100vw - 32px));
    margin: 40px auto;
    padding: 24px;
    background: rgba(255,255,255,0.98);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(230,232,239,0.95);

    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition:
        transform 0.9s cubic-bezier(.2,.8,.2,1),
        opacity 0.8s ease;
}

/* dialog visible */
.modal.is-visible .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* contenu interne (fade après chargement) */
.modal-content-inner {
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.modal-content-inner.is-loaded {
    opacity: 1;
    transform: translateY(0);
}


.customer-sheet {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.customer-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-muted);
}

.customer-header-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.customer-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid var(--line-muted);
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex: 0 0 auto;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.customer-header-text {
    min-width: 0;
}

.customer-header-text h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-heading);
}

.customer-header-subline {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-soft);
}

.customer-header-subline .dot {
    opacity: 0.5;
}

.customer-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.customer-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.customer-badge.success {
    background: #ecfdf3;
    border-color: #b7ebd1;
    color: #067647;
}

.customer-badge.warning {
    background: #fff7e8;
    border-color: #f8d08a;
    color: #b45309;
}

.customer-badge.muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: var(--text-muted);
}

.customer-points-card {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff7ed 0%, #fffaf5 100%);
    border: 1px solid #fed7aa;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
    text-align: center;
}

.customer-points-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #9a3412;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.customer-points-value {
    display: block;
    margin-top: 6px;
    font-size: 30px;
    line-height: 1;
    font-weight: 600;
    color: #7c2d12;
    letter-spacing: -0.04em;
}

.customer-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    border: 1px solid var(--line-muted);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.meta-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.meta-card span {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-heading);
    word-break: break-word;
}

.customer-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.manual-visit-form-wrap {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    border: 1px solid var(--line-muted);
}

.customer-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.customer-section-header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

.customer-visits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.customer-visit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--line-muted);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.customer-visit-main {
    min-width: 0;
}

.customer-visit-main strong {
    display: block;
    font-size: 14px;
    color: var(--text-heading);
}

.customer-visit-amount {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.customer-visit-amount.is-muted {
    color: #94a3b8;
}

.customer-visit-id {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}


/* responsive */


.topbar-dashboard {
    display: grid;
    grid-template-columns: 160px minmax(320px, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 14px 22px 14px 36px;
    margin-bottom: 24px;
    background: var(--surface-overlay);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 999;
}

.topbar-dashboard .topbar-brand,
.topbar-dashboard .topbar-center,
.topbar-dashboard .topbar-right {
    min-width: 0;
}

.topbar-dashboard .topbar-right {
    justify-self: end;
}

.reviens-logo {
    display: inline-block;
    font-family: "Grand Hotel", cursive;
    font-size: 58px;
    line-height: 1;
    text-decoration: none;
    color: var(--text);
    letter-spacing: 0.01em;

    background: linear-gradient(-45deg, #ff7b5d 0%, #ff6b4a 35%, #ff3d7f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    text-shadow: 0 4px 18px rgba(255, 107, 74, 0.18);
}


.topbar-dashboard .global-search {
    max-width: 680px;
    margin: 0 auto;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-notifications {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 0;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
    transition:
        border-color var(--transition),
}

.topbar-notifications:hover {
    transform: scale(1.1);
}

.topbar-notifications svg {
    width: 20px;
    height: 20px;
    display: block;
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.notif-badge.is-hidden {
    display: none;
}

.topbar-notifications.has-notifications {

}

.shop-dropdown {
    position: relative;
}

.shop-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 7px 10px 7px 7px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}

.shop-dropdown-toggle:hover {
}

.shop-dropdown.is-open .shop-dropdown-toggle {
    background: #fff;
}

.shop-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex: 0 0 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  padding: 0;
}

.shop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-avatar-initials {
    font-size: 14px;
    font-weight: 600;
    color: #9a3412;
    letter-spacing: 0.02em;
}

.shop-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.shop-name {
    max-width: 180px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-subtitle {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--text-soft);
    white-space: nowrap;
}

.shop-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    flex: 0 0 auto;
    transition: transform var(--transition), color var(--transition);
}

.shop-chevron svg {
    width: 18px;
    height: 18px;
    display: block;
}

.shop-dropdown.is-open .shop-chevron {
    transform: rotate(180deg);
    color: var(--text);
}

.shop-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    min-width: 320px;
    padding: 10px;
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity var(--transition),
        visibility var(--transition),
        transform var(--transition);
    z-index: 80;
}

.shop-dropdown.is-open .shop-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition:
        background var(--transition),
        color var(--transition);
}

.dropdown-item:hover {
    background: var(--surface-muted);
}

.dropdown-item-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    flex: 0 0 18px;
}

.dropdown-item-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.dropdown-item span:last-child {
    font-size: 14px;
    font-weight: 600;
}


.modal-dialog-qr {
    width: min(560px, calc(100vw - 32px));
}

.qr-modal-content {
    text-align: center;
}

.qr-modal-content h2 {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: var(--text);
}

.qr-modal-content p {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 22px;
}

.qr-modal-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.qr-modal-preview img {
    display: block;
    width: 280px;
    height: 280px;
    object-fit: contain;
}

.qr-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}


/* responsive topbar */


.modern-logo-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(251,252,254,0.96) 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.logo-preview-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-round {
    width: 118px;
    height: 118px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
    border: 1px solid var(--line);
    box-shadow:
        0 10px 24px rgba(16, 24, 40, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-preview-round::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    pointer-events: none;
    box-shadow: inset 0 0 0 8px rgba(255,255,255,0.18);
}

.logo-preview-round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-actions {
    min-width: 0;
}

.logo-upload {
    position: relative;
}

.logo-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.logo-upload-label {
    display: flex!important;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px 20px;
    border-radius: var(--radius-lg);
    border: 2px dashed #d7dce5;
    background:
        radial-gradient(circle at top right, rgba(255, 107, 74, 0.08), transparent 28%),
        linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    cursor: pointer;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.logo-upload-label:hover {
    border-color: rgba(255, 107, 74, 0.42);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
    transform: translateY(-1px);
}

.logo-upload.is-dragover .logo-upload-label {
    border-color: var(--primary);
    background:
        radial-gradient(circle at top right, rgba(255, 107, 74, 0.14), transparent 35%),
        linear-gradient(180deg, #fffaf8 0%, #fff5f1 100%);
    box-shadow:
        0 0 0 4px rgba(255, 107, 74, 0.10),
        0 12px 28px rgba(16, 24, 40, 0.06);
}

.logo-upload-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff7f4 0%, #fff1ed 100%);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 107, 74, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.logo-upload-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.logo-upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1 1 auto;
}

.logo-upload-text strong {
    font-size: 15px;
    line-height: 1.25;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.logo-upload-text span {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.4;
}

.logo-upload-meta {
    flex: 0 0 auto;
    max-width: 180px;
    text-align: right;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-soft);
    word-break: break-word;
    font-weight: normal;
}

.logo-help {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-soft);
}

.remove-logo-row {
    margin-top: -4px;
    display: block;
    font-size: 12px;
    opacity: 0.6;
}

.logo-preview-round.is-empty {
    background:
        radial-gradient(circle at top right, rgba(255, 107, 74, 0.10), transparent 30%),
        linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
}

.logo-preview-round.is-empty::before {
    content: "Logo";
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.logo-preview-round.is-empty img {
    display: none;
}


.customer-rewards-inline {
    display: inline-block;
}

.reward-inline-card {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  background: #ecfdf3;
  border-color: #b7ebd1;
  color: #067647;
}

.reward-inline-card strong {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: var(--text);
    font-weight: 600;
}

.settings-tab-panels {
    margin-top: 22px;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.is-active {
    display: block;
}

.rewards-settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.rewards-settings-head h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.reward-rules-editor {
    display: grid;
    gap: 14px;
}

.reward-rule-editor-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.reward-rule-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.reward-rule-editor-toggle {
    display: flex;
    align-items: flex-end;
}

.customer-reward-rules {
    display: grid;
    gap: 12px;
}

.reward-rule-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--line-muted);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.reward-rule-main {
    min-width: 0;
}

.reward-rule-main strong {
    display: block;
    font-size: 14px;
    color: var(--text-heading);
}

.reward-rule-meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.reward-rule-description {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-soft);
}


.modal-dialog-scan-validation {
    width: min(680px, calc(100vw - 32px));
}

.scan-validation-modal-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.scan-validation-modal-head h2 {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 6px;
}

.scan-validation-modal-head p {
    color: var(--text-soft);
    font-size: 14px;
}

.scan-validation-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}


.input-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.stepper-btn {
    width: 42px;
    height: 48px;
    border: 0;
    background: #f8fafc;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: background var(--transition);
}

.stepper-btn:hover {
    background: #eef2f7;
}

.stepper-input {
    width: 100%;
    text-align: center;
    border: 0;
    height: 48px;
    padding: 0;
    background: transparent;
}

/* enlever les flèches natives */
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-input[type=number] {
    -moz-appearance: textfield;
}

.dashboard-auto-activity {
    display: grid;
    gap: 18px;
}

.dashboard-auto-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-auto-stat {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.dashboard-auto-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
    color: var(--text);
}

.dashboard-auto-stat span {
    display: block;
    font-size: 14px;
    color: var(--text-soft);
}

.dashboard-auto-recent h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.activity-item-main strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.activity-item-meta {
    font-size: 14px;
    color: var(--text-soft);
}

.activity-item-time {
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-faint);
}


.stats-block {
    display: grid;
    gap: 12px;
}

.stat-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #fff;
}

.stat-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-card span {
    font-size: 14px;
    color: var(--text-soft);
}

.chart-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 14px;
}

.chart-card-head {
    margin-bottom: 10px;
}

.chart-card-head h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 110px;
}


.customer-meta-section {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.customer-meta-section h3,
.customer-upsell-card h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #ff5267;
}

.customer-meta-list {
    display: grid;
    gap: 10px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.meta-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.meta-row strong {
    font-size: 14px;
    color: var(--text);
}

.meta-row span {
    font-size: 14px;
    color: var(--text-soft);
    text-align: right;
}

.customer-upsell-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff8f4 0%, #fff 100%);
    font-size: 13px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center; /* clé : centrage vertical */
}

.customer-upsell-card p {
    margin: 0 0 12px;
}
.customer-upsell-card p.muted {
    margin: 12px 0 0;
    font-size: .8em;
    color: #888;
}

.upsell-feature-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
}

.upsell-feature-list li + li {
    margin-top: 6px;
}
.upsell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.upsell-head h3 {
    margin: 0;
    font-size: 16px;
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-soft);
    background: #fff;
}

.btn-ghost:hover {
    border-color: #ff6b4a;
    color: #ff6b4a;
}

.btn-small {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 10px;
}

.upsell-content {
    display: block;
}

.upsell-cta {
    display: flex;
    align-items: center;
}


.dropdown-premium-cta {
    display: block;
    margin: 10px 8px 6px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;

    background: var(--primary-gradient-alt);
    box-shadow: 0 8px 18px rgba(255, 107, 74, 0.25);

    transition: filter .2s ease;
}

.dropdown-premium-cta:hover {
    filter: brightness(1.1);
}


aside .stat-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-main {
    display: flex;
    flex-direction: column;
}

.stat-delta {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
}
.stat-delta.is-up {
    color: #16a34a; /* vert */
}

.stat-delta.is-down {
    color: #dc2626; /* rouge */
}


/* datatables */

.dataTables_wrapper {
    font-size: 14px;
    color: var(--text);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 16px;
}

.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 18px;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    margin-bottom: 18px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
}

.dataTables_wrapper .dataTables_length select {
    width: auto;
    min-width: 88px;
    height: 42px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.dataTables_wrapper .dataTables_filter input {
    width: 280px;
    max-width: 100%;
    height: 42px;
    padding: 0 14px;
    margin-left: 0 !important;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_info {
    clear: both;
    padding: 22px 20px 0;
    font-size: 13px;
    color: var(--text-soft);
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 20px 20px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 40px;
    height: 40px;
    margin-right: 5px;
    padding: 0 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--text) !important;
    line-height: 38px;
    box-shadow: none !important;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        opacity var(--transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #fafbfc !important;
    border-color: var(--line-strong) !important;
    color: var(--text) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, rgb(255, 77, 109), rgb(255, 112, 67)) !important;
    border-color: transparent !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.45;
    cursor: default !important;
}

.dataTables_wrapper .dataTables_processing {
    opacity: 0;
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
}

table.dataTable.no-footer {
    border-bottom: 0 !important;
}

table.dataTable thead th,
table.dataTable thead td {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 16px 14px !important;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
    background: rgba(249, 250, 251, 0.95) !important;
    border-bottom: 1px solid var(--line) !important;
    backdrop-filter: blur(8px);
}

table.dataTable tbody td {
    padding: 10px 10px !important;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    font-size: 14px;
    color: var(--text);
    background: transparent !important;
}

table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}

/* aucun hover ligne */
table.dataTable tbody tr:hover,
table.dataTable tbody tr:hover td {
    background: transparent !important;
}

/* aucune colonne active */
table.dataTable tbody td.sorting_1,
table.dataTable tbody td.sorting_2,
table.dataTable tbody td.sorting_3,
table.dataTable tbody tr:hover td.sorting_1,
table.dataTable tbody tr:hover td.sorting_2,
table.dataTable tbody tr:hover td.sorting_3 {
    background: transparent !important;
}

/* aucun style spécial sur l'entête triée */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: var(--text-soft) !important;
    background: rgba(249, 250, 251, 0.95) !important;
}

/* chevrons de tri plus discrets */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 0.16;
}

table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 0.45;
}

#customers-table .row-select {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

#customers-table .btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
}

#customers-table .table-sub {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-soft);
}


.customers-toolbar {
    margin-bottom: 18px;
}

.customers-toolbar-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
    gap: 14px;
}

.customers-toolbar .form-group {
    margin-bottom: 0;
}


.customers-toolbar {
    margin-bottom: 18px;
}

.customers-toolbar-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}

/* le champ recherche prend tout l’espace */
.form-group-search {
    flex: 1;
    min-width: 0;
}

/* le select reste à droite avec une largeur fixe */
.form-group-segment {
    width: 220px;
    flex-shrink: 0;
}

/* input prend toute la largeur */
.form-group-search input {
    width: 100%;
}

/* option : un peu plus propre visuellement */
.form-group-search input,
.form-group-segment select {
    height: 42px;
}

/* responsive */

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


.dropdown-divider {
    height: 1px;
    margin: 8px 10px;
    background: var(--line);
    opacity: 0.8;
}

.credits-card {
    margin: 10px 8px 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    box-shadow: var(--shadow-xs);
}

.credits-card-head {
    margin-bottom: 12px;
}

.credits-card-head strong {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.credits-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.credits-stat {
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #fff;
}

.credits-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.credits-stat-value {
    display: block;
    font-size: 22px;
    line-height: 1;
    font-weight: 600;
    color: var(--text);
}

.dropdown-recharge-cta {
    width: 100%;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--primary-gradient-alt);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 107, 74, 0.18);
    transition: filter .25s ease;
}

.dropdown-recharge-cta:hover {
    filter: brightness(1.08);
}

.modal-dialog-credits {
    width: min(860px, calc(100vw - 32px));
}

.credits-modal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.credits-modal-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
}

.credits-modal-head p {
    color: var(--text-soft);
    font-size: 14px;
    padding-bottom: 5px;
}

#credits-recharge-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.credits-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.credits-section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
}

.credits-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.credits-section-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    color: var(--text);
}

.credits-remaining {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 6px 10px;
}

.credits-options {
    display: grid;
    gap: 12px;
}

.credits-option-card {
    display: block;
    cursor: pointer;
}

.credits-option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.credits-option-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        transform var(--transition);
}

.credits-option-card:hover .credits-option-ui {
    border-color: var(--line-strong);
    background: #fcfdff;
}

.credits-option-card input:checked + .credits-option-ui {
    border-color: rgba(255, 107, 74, 0.35);
    background: linear-gradient(180deg, #fff7f4 0%, #fff 100%);
    box-shadow:
        0 0 0 4px rgba(255, 107, 74, 0.10),
        var(--shadow-xs);
}

.credits-option-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.credits-option-main strong {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

.credits-option-main small {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 400;
}

.credits-option-price {
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.credits-option-price small {
    font-size: 12px;
    font-weight: 400;
}

.credits-summary {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.credits-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-soft);
}

.credits-summary-line strong {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

.credits-summary-total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.credits-summary-total span,
.credits-summary-total strong {
    font-size: 16px;
    color: var(--text);
}

.credits-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}


.push-card {
    margin: 10px 8px 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white) 0%, #fbfcfe 100%);
    box-shadow: var(--shadow-xs);
}

.push-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.push-card-head strong {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.push-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid var(--line-muted);
    font-size: 11px;
    font-weight: 600;
}

.push-status-badge.is-active {
    background: #ecfdf3;
    color: #067647;
    border-color: #b7ebd1;
}

.push-card-text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-soft);
}


/* responsive */

@media (max-width: 1180px) {

        .topbar-right {
            justify-self: start;
        }

        .dashboard-grid {
            grid-template-columns: 1fr;
        }

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

    .topbar-dashboard {
            gap: 18px;
        }

        .topbar-dashboard .topbar-right {
            justify-self: start;
        }

        .topbar-dashboard .global-search {
            max-width: none;
            margin: 0;
        }
}

@media (max-width: 860px) {
  h1, h2, h3, h4 {
      margin: 0 0 .5em 0;
  }
    .admin-layout {
            padding: 18px;
        }

        .panel,
        .stat-card {
            padding: 16px;
        }

        .topbar {
            padding: 16px;
            border-radius: 8px;
        }

        .topbar h1 {
            font-size: 26px;
        }

        .form-row {
            grid-template-columns: 1fr;
        }

        .customer-meta-grid {
            grid-template-columns: 1fr;
        }

        .modal-dialog {
            width: calc(100vw - 20px);
            margin: 10px auto;
            padding: 20px;
            border-radius: 8px;
        }

        .scan-card-head {
            flex-direction: column;
            align-items: flex-start;
        }

    .topbar-dashboard {
            grid-template-columns: minmax(0, 1fr) auto;
            grid-template-areas:
                "brand right"
                "search search";
            align-items: center;
            gap: 10px 5px;
            padding: 16px;
                margin-bottom: 14px;
        }

        .topbar-dashboard .topbar-brand {
            grid-area: brand;
        }

        .topbar-dashboard .topbar-center {
            grid-area: search;
        }

        .topbar-dashboard .topbar-right {
            grid-area: right;
            justify-self: end;
        }

        .topbar-dashboard .global-search {
            max-width: none;
            width: 100%;
            margin: 0;
        }

        .reviens-logo {
            font-size: 38px;
        }

        .topbar-actions {
            width: auto;
            justify-content: flex-end;
            gap: 10px;
        }

        .shop-dropdown {
            flex: 0 1 auto;
            min-width: 0;
        }

        .shop-dropdown-toggle {
            width: auto;
        }

        .shop-name {
            max-width: 150px;
        }

        .dashboard-grid {
            gap: 14px;
            margin-bottom: 14px;
        }
        .stats-grid {
            gap: 14px;
            margin-bottom: 14px;
            margin-top: 14px!important;
        }

    .dataTables_wrapper .dataTables_length,
        .dataTables_wrapper .dataTables_filter {
            float: none;
            width: 100%;
        }

        .dataTables_wrapper .dataTables_length label,
        .dataTables_wrapper .dataTables_filter label {
            width: 100%;
        }

        .dataTables_wrapper .dataTables_filter input {
            width: 100%;
        }

        .dataTables_wrapper .dataTables_paginate {
            justify-content: flex-start;
            flex-wrap: wrap;
        }

    .customers-toolbar-grid {
            grid-template-columns: 1fr;
        }
    .activity-item-main strong {
            display: inline-block;
            margin-bottom: 0;
        }
        .activity-item-meta  {
                display: inline-block;
                padding-left: 5px
              }
    .empty-state {
        padding: 14px;
    }
}

@media (max-width: 640px) {
    .customer-sheet-header {
            flex-direction: column;
            align-items: stretch;
        }

        .customer-points-card {
            width: 100%;
        }

        .customer-meta-grid {
            grid-template-columns: 1fr;
        }

        .customer-visit-item {
            flex-direction: column;
            align-items: flex-start;
        }

    .modern-logo-card {
            grid-template-columns: 1fr;
            justify-items: center;
            text-align: left;
        }

        .logo-actions {
            width: 100%;
        }

        .logo-upload-label {
            align-items: flex-start;
            flex-direction: column;
        }

        .logo-upload-meta {
            max-width: none;
            text-align: left;
        }

    .rewards-settings-head {
            flex-direction: column;
            align-items: stretch;
        }

        .reward-rule-card {
            flex-direction: column;
            align-items: flex-start;
        }

    .credits-sections {
            grid-template-columns: 1fr;
        }

        .credits-modal-actions {
            flex-direction: column;
        }

        .credits-modal-actions .btn {
            width: 100%;
        }



        .admin-layout {
            padding: 14px;
        }

        .panel,
        .stat-card {
            border-radius: 8px;
        }

        .btn {
            width: 100%;
        }

        .scan-actions,
        .customer-actions-bar,
        .topbar-status {
            width: 100%;
        }

        .topbar-status {
            justify-content: flex-start;
        }

    .qr-modal-preview img {
            width: 220px;
            height: 220px;
        }

        .qr-modal-actions {
            flex-direction: column;
        }

    .topbar-actions {
            width: auto;
            align-items: center;
        }

        .shop-dropdown {
            flex: 0 1 auto;
            min-width: 0;
        }
        .shop-avatar {
          width: 50px;
          height: 50px;
          flex: 0 0 50px;
        }

        .shop-dropdown-toggle {
            width: auto;
            justify-content: flex-start;
            border-radius: var(--radius-lg);
        }

        .shop-meta {
            flex: 0 1 auto;
        }

        .shop-name {
        }

        .shop-dropdown-menu {
            width: 100%;
        }

        .shop-subtitle {
            white-space: normal;
        }
    .global-search input {
        height: 50px;
        padding: 0 12px;
        font-size: 16px;
    }

    .scan-validation-modal-actions {
            flex-direction: column;
        }

        .scan-validation-modal-actions .btn {
            width: 100%;
        }

    .dashboard-auto-stats {
            grid-template-columns: 1fr;
        }


        .activity-item-time {
            white-space: normal;
        }

    .customer-upsell-card {
            grid-template-columns: 1fr;
        }

        .upsell-cta {
            justify-content: flex-start;
            margin-top: 10px;
        }

    .customers-toolbar-row {
            flex-direction: column;
            align-items: stretch;
        }

        .form-group-segment {
            width: 100%;
        }
}


@media (max-width: 480px) {
    .shop-avatar {
      width: 40px;
      height: 40px;
      flex: 0 0 40px;
    }
    .shop-name {
      max-width: 105px;
    }
    .shop-dropdown-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .topbar-notifications {width: 32px;}
    .notif-badge {
      top: 3px;
      right: 2px;
      min-width: 15px;
      height: 15px;
      padding: 0 2px;
      font-size: 9px;
      line-height: 15px;
    }
    .stats-grid {
            grid-template-columns: 1fr;
        }

}

@media (max-width: 380px) {
  .topbar-actions {
    gap: 0px;
  }
  .shop-meta,
  .shop-chevron {
    display: none;
  }

}



.customer-sheet--clean{
    display:flex;
    flex-direction:column;
    gap:16px;
    color:#1f2937;
}

.customer-header{
    padding:0;
}

.customer-header-main{
    display:flex;
    align-items:flex-start;
    gap:14px;
    padding-right:44px;
}

.customer-avatar{
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    font-weight:700;
    flex-shrink:0;
    background:rgba(0,0,0,.06);
    color:#111;
}

.customer-header-text{
    min-width:0;
    flex:1;
}

.customer-header-text h2{
    margin:0;
    font-size:24px;
    line-height:1.15;
}

.customer-summary{
    margin:6px 0 0;
    font-size:14px;
    line-height:1.5;
    color:#6b7280;
}

.customer-badges{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
}

.customer-points-row{
    display:flex;
    align-items:baseline;
    gap:8px;
    margin-top:10px;
    font-size:14px;
    line-height:1.4;
}

.customer-points-label{
    color:#6b7280;
}

.customer-points-value{
    color:#111827;
    font-size:16px;
    font-weight:700;
}

.customer-badge.success{
    background:rgba(34,197,94,.10);
    color:#166534;
}

.customer-badge.warning{
    background:rgba(245,158,11,.12);
    color:#92400e;
}

.customer-badge.muted{
    background:rgba(15,23,42,.06);
    color:#475569;
}

.customer-actions-bar--clean{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    padding:0;
}

.customer-inline-note{
    font-size:13px;
    color:#6b7280;
}

.customer-card{
    padding:16px 18px;
    border-radius:16px;
    border:1px solid rgba(15,23,42,.08);
    background:#fff;
}

.customer-card--subtle{
    background:#fcfcfd;
}

.customer-card--lines{
    background:#fff;
}

.customer-section-header{
    margin-bottom:10px;
}

.customer-section-header h3{
    margin:0;
    font-size:18px;
    line-height:1.2;
}

.info-lines{
    display:flex;
    flex-direction:column;
}

.info-line{
    display:grid;
    grid-template-columns:180px 1fr;
    gap:16px;
    align-items:start;
    padding:10px 0;
    border-bottom:1px solid rgba(15,23,42,.07);
}

.info-line:last-child{
    border-bottom:none;
}

.info-label{
    font-size:13px;
    color:#6b7280;
}

.info-value{
    font-size:14px;
    color:#111827;
    word-break:break-word;
}

.customer-premium-teaser{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.premium-teaser-text{
    margin:0;
    font-size:14px;
    line-height:1.5;
    color:#4b5563;
}

.premium-teaser-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.premium-teaser-list span{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    font-size:12px;
    background:rgba(15,23,42,.06);
    color:#334155;
}

.simple-action-list{
    display:flex;
    flex-direction:column;
}

.simple-action-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:12px 0;
    border-bottom:1px solid rgba(15,23,42,.07);
}

.simple-action-row:last-child{
    border-bottom:none;
    padding-bottom:0;
}

.simple-action-text{
    min-width:0;
}

.simple-action-text strong{
    display:block;
    margin-bottom:4px;
    font-size:14px;
    color:#111827;
}

.simple-action-text span{
    display:block;
    font-size:13px;
    line-height:1.45;
    color:#6b7280;
}

.history-lines{
    list-style:none;
    margin:0;
    padding:0;
}

.history-lines li{
    padding:10px 0;
    border-bottom:1px solid rgba(15,23,42,.07);
    font-size:14px;
    line-height:1.5;
    color:#374151;
}

.history-lines li:last-child{
    border-bottom:none;
    padding-bottom:0;
}

.manual-visit-form-wrap .form-row{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-bottom:14px;
}

.manual-visit-form-wrap .form-group label{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:600;
    color:#374151;
}

.manual-visit-form-wrap input[type="number"]{
    width:100%;
    min-height:44px;
    padding:0 12px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:12px;
    background:#fff;
}

.input-stepper{
    display:grid;
    grid-template-columns:42px 1fr 42px;
    gap:8px;
    align-items:center;
}

.stepper-btn{
    height:44px;
    border:none;
    border-radius:12px;
    background:#f3f4f6;
    font-size:20px;
    cursor:pointer;
}

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

@media (max-width: 760px){
    .info-line{
        grid-template-columns:1fr;
        gap:4px;
    }

    .manual-visit-form-wrap .form-row{
        grid-template-columns:1fr;
    }

    .simple-action-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .customer-title-row{
        flex-direction:column;
        align-items:flex-start;
        gap:6px;
    }
}
