/* ============================================================
   Divas by Claudia — Admin Design System v2
   Warm, elegant, salon-appropriate. Built on Bootstrap 5 utility
   classes (grid/spacing) with a bespoke component layer (.dc-*)
   on top - do not fight Bootstrap, extend it.

   v2 notes: same palette + class names as v1 (nothing renamed, so
   every page and every dc-* reference in JS keeps working), but
   with real depth, motion and polish layered on top: elevation
   scale, consistent easing, entrance/hover/press animations,
   a proper animated modal + toast system, an off-canvas mobile
   sidebar with overlay, and small "alive" details (stock pill
   pulses, skeletons, focus rings) so the app feels considered
   rather than just styled.
   ============================================================ */

:root {
    /* Palette (unchanged) */
    --dc-cream: #fdf8f4;
    --dc-blush: #f6e4e6;
    --dc-rose: #b8697a;
    --dc-rose-dark: #98495b;
    --dc-gold: #c9a45c;
    --dc-gold-light: #e8d3a5;
    --dc-charcoal: #2b2523;
    --dc-charcoal-soft: #55494a;
    --dc-border: #ece0dd;
    --dc-white: #ffffff;

    --dc-success: #4c8b6e;
    --dc-success-bg: #e6f2ec;
    --dc-danger: #b5443a;
    --dc-danger-bg: #fbe9e7;
    --dc-warning: #b8823a;
    --dc-warning-bg: #faf1e2;
    --dc-info: #4a7ab5;
    --dc-info-bg: #eaf1fb;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --dc-radius: 12px;
    --dc-radius-sm: 8px;
    --dc-radius-lg: 18px;

    /* New: layered elevation scale, used instead of one flat shadow */
    --dc-shadow-xs: 0 1px 2px rgba(43, 37, 35, 0.05);
    --dc-shadow: 0 2px 10px rgba(43, 37, 35, 0.06), 0 1px 2px rgba(43, 37, 35, 0.05);
    --dc-shadow-md: 0 6px 20px rgba(43, 37, 35, 0.09), 0 2px 6px rgba(43, 37, 35, 0.06);
    --dc-shadow-lg: 0 14px 40px rgba(43, 37, 35, 0.14), 0 4px 12px rgba(43, 37, 35, 0.08);
    --dc-shadow-glow: 0 0 0 3px rgba(184, 105, 122, 0.14);

    /* New: shared motion tokens so every component eases the same way */
    --dc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dc-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dc-fast: 0.15s;
    --dc-med: 0.25s;
    --dc-slow: 0.4s;

    --dc-gradient-brand: linear-gradient(135deg, var(--dc-rose-dark) 0%, var(--dc-rose) 55%, var(--dc-gold) 130%);
    --dc-gradient-gold: linear-gradient(90deg, var(--dc-gold) 0%, var(--dc-rose-dark) 100%);
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body.dc-admin {
    font-family: var(--font-ui);
    background: var(--dc-cream);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(201, 164, 92, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(184, 105, 122, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--dc-charcoal);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .dc-display {
    font-family: var(--font-display);
    color: var(--dc-charcoal);
    font-weight: 600;
}

a { color: var(--dc-rose-dark); text-decoration: none; transition: color var(--dc-fast) var(--dc-ease); }
a:hover { color: var(--dc-rose); }

::selection { background: var(--dc-rose); color: #fff; }

/* Focus ring — keyboard users only, keeps mouse clicks clean */
:focus-visible {
    outline: 2px solid var(--dc-rose);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Slim, quiet scrollbars (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dc-border); border-radius: 999px; border: 2px solid var(--dc-cream); }
::-webkit-scrollbar-thumb:hover { background: var(--dc-gold-light); }

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes dc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dc-fade-in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dc-fade-in-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dc-scale-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes dc-pop { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes dc-spin { to { transform: rotate(360deg); } }
@keyframes dc-skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes dc-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(184, 105, 122, 0.35); } 100% { box-shadow: 0 0 0 8px rgba(184, 105, 122, 0); } }
@keyframes dc-pulse-dot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }
@keyframes dc-confirm-pop { 0% { transform: scale(1); } 35% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes dc-shimmer-sweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(220%); } }

/* Generic entrance animation — JS (main.js) adds .dc-animate-in to cards,
   stat tiles and table rows as they enter the viewport / on page load, and
   can set a per-element --dc-delay for a natural stagger. */
.dc-animate-in {
    animation: dc-fade-in-up var(--dc-med) var(--dc-ease) both;
    animation-delay: var(--dc-delay, 0s);
}

.dc-scale-in { animation: dc-scale-in var(--dc-med) var(--dc-ease-bounce) both; }

/* ── Layout shell ─────────────────────────────────────────── */
.dc-wrapper { display: flex; min-height: 100vh; }

.dc-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(190deg, var(--dc-charcoal) 0%, #241d1c 100%);
    color: var(--dc-cream);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: transform var(--dc-med) var(--dc-ease);
}

.dc-sidebar__brand {
    padding: 26px 24px 18px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: var(--dc-gold-light);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dc-sidebar__brand::before {
    content: '';
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--dc-gradient-gold);
    box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.18);
    flex-shrink: 0;
}

.dc-sidebar__nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.dc-sidebar__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--dc-radius-sm);
    color: rgba(253, 248, 244, 0.75);
    font-size: 0.93rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background var(--dc-fast) var(--dc-ease), color var(--dc-fast) var(--dc-ease), padding-left var(--dc-fast) var(--dc-ease);
}

.dc-sidebar__link:hover { background: rgba(255,255,255,0.07); color: var(--dc-cream); padding-left: 18px; }
.dc-sidebar__link.active {
    background: var(--dc-rose-dark);
    color: #fff;
    box-shadow: var(--dc-shadow-md);
}
.dc-sidebar__link.active::before {
    content: '';
    position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 60%; border-radius: 999px; background: var(--dc-gold-light);
}
.dc-sidebar__link i { font-size: 1.05rem; width: 20px; text-align: center; }

.dc-sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
    color: rgba(253,248,244,0.6);
}

/* Mobile off-canvas sidebar + overlay */
.dc-sidebar-toggle {
    display: none; background: var(--dc-white); border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm); width: 38px; height: 38px; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--dc-charcoal); cursor: pointer; transition: background var(--dc-fast) var(--dc-ease);
}
.dc-sidebar-toggle:hover { background: var(--dc-blush); }

.dc-sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(43, 37, 35, 0.45);
    backdrop-filter: blur(2px); z-index: 39; opacity: 0; transition: opacity var(--dc-med) var(--dc-ease);
}

@media (max-width: 991px) {
    .dc-sidebar-toggle { display: inline-flex; }
    .dc-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--dc-shadow-lg); }
    .dc-sidebar.open { transform: translateX(0); }
    .dc-sidebar-overlay.open { display: block; opacity: 1; }
    body.dc-sidebar-lock { overflow: hidden; }
}

.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dc-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; background: rgba(253, 248, 244, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dc-border);
    position: sticky; top: 0; z-index: 30;
}
.dc-topbar__title { margin: 0; font-size: 1.25rem; }
.dc-topbar__user { display: flex; align-items: center; gap: 12px; }
.dc-topbar__avatar {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--dc-gradient-brand); color: #fff; font-weight: 700; font-family: var(--font-display);
    flex-shrink: 0; transition: transform var(--dc-fast) var(--dc-ease-bounce);
}
.dc-topbar__avatar:hover { transform: scale(1.08) rotate(-4deg); }

.dc-content { padding: 28px; flex: 1; animation: dc-fade-in var(--dc-slow) var(--dc-ease) both; }

@media (max-width: 767px) {
    .dc-content { padding: 18px; }
    .dc-topbar { padding: 14px 18px; }
}

/* ── Cards ────────────────────────────────────────────────── */
.dc-card {
    background: var(--dc-white);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--dc-shadow);
    transition: box-shadow var(--dc-med) var(--dc-ease), transform var(--dc-med) var(--dc-ease);
}

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

.dc-card__header h2, .dc-card__header h3 { margin: 0; }

.dc-stat-card {
    background: var(--dc-white); border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius); padding: 20px; box-shadow: var(--dc-shadow);
    transition: transform var(--dc-med) var(--dc-ease), box-shadow var(--dc-med) var(--dc-ease);
    position: relative; overflow: hidden;
}
.dc-stat-card:hover { transform: translateY(-3px); box-shadow: var(--dc-shadow-md); }
.dc-stat-card__label { font-size: 0.82rem; color: var(--dc-charcoal-soft); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.dc-stat-card__value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--dc-charcoal); }
.dc-stat-card__icon {
    width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--dc-blush); color: var(--dc-rose-dark); font-size: 1.2rem; margin-bottom: 12px;
    transition: transform var(--dc-med) var(--dc-ease-bounce);
}
.dc-stat-card:hover .dc-stat-card__icon { transform: scale(1.1) rotate(-6deg); }

/* Clickable rows/cards get a lift + pointer, so it always reads as "tap me" */
.dc-card--clickable { cursor: pointer; }
.dc-card--clickable:hover { transform: translateY(-2px); box-shadow: var(--dc-shadow-md); border-color: var(--dc-rose); }

/* ── Buttons ──────────────────────────────────────────────── */
.dc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--dc-radius-sm);
    font-weight: 600; font-size: 0.9rem; border: 1px solid transparent;
    cursor: pointer; transition: all var(--dc-fast) var(--dc-ease); text-decoration: none;
    font-family: var(--font-ui); position: relative; overflow: hidden;
}
.dc-btn:active { transform: scale(0.97); }
.dc-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.dc-btn--primary { background: var(--dc-rose-dark); color: #fff; box-shadow: 0 2px 8px rgba(152, 73, 91, 0.25); }
.dc-btn--primary:hover { background: var(--dc-rose); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(152, 73, 91, 0.3); }

.dc-btn--gold { background: var(--dc-gold); color: var(--dc-charcoal); }
.dc-btn--gold:hover { background: var(--dc-gold-light); color: var(--dc-charcoal); transform: translateY(-1px); }

.dc-btn--outline { background: transparent; border-color: var(--dc-border); color: var(--dc-charcoal); }
.dc-btn--outline:hover { background: var(--dc-blush); border-color: var(--dc-rose); color: var(--dc-charcoal); transform: translateY(-1px); }

.dc-btn--danger { background: var(--dc-danger-bg); color: var(--dc-danger); border-color: transparent; }
.dc-btn--danger:hover { background: var(--dc-danger); color: #fff; transform: translateY(-1px); }

.dc-btn--sm { padding: 6px 12px; font-size: 0.82rem; }
.dc-btn--lg { padding: 13px 26px; font-size: 1rem; }
.dc-btn--block { width: 100%; }

/* Loading state — JS toggles this class + disables the button; the label
   is dimmed and a small spinner appears in front of it, no layout shift. */
.dc-btn.is-loading { color: transparent !important; pointer-events: none; }
.dc-btn.is-loading::after {
    content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
    animation: dc-spin 0.7s linear infinite;
}
.dc-btn--outline.is-loading::after, .dc-btn--danger.is-loading::after {
    border-color: rgba(43,37,35,0.25); border-top-color: var(--dc-charcoal);
}

/* ── Forms ────────────────────────────────────────────────── */
.dc-form-group { margin-bottom: 18px; }
.dc-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--dc-charcoal); }
.dc-hint { font-size: 0.78rem; color: var(--dc-charcoal-soft); margin-top: 4px; }

.dc-input, .dc-select, .dc-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm); font-size: 0.92rem; font-family: var(--font-ui);
    background: var(--dc-white); color: var(--dc-charcoal);
    transition: border-color var(--dc-fast) var(--dc-ease), box-shadow var(--dc-fast) var(--dc-ease);
}
.dc-input:hover, .dc-select:hover, .dc-textarea:hover { border-color: var(--dc-gold); }
.dc-input:focus, .dc-select:focus, .dc-textarea:focus {
    outline: none; border-color: var(--dc-rose); box-shadow: var(--dc-shadow-glow);
}
.dc-textarea { min-height: 110px; resize: vertical; }

.dc-field-error { color: var(--dc-danger); font-size: 0.8rem; margin-top: 4px; }

/* ── Tables ───────────────────────────────────────────────── */
.dc-table-wrap { overflow-x: auto; border-radius: var(--dc-radius-sm); }
.dc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dc-table th {
    text-align: left; padding: 12px 14px; font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.4px; color: var(--dc-charcoal-soft); border-bottom: 2px solid var(--dc-border);
    white-space: nowrap; position: sticky; top: 0; background: var(--dc-white); z-index: 1;
}
.dc-table td { padding: 14px; border-bottom: 1px solid var(--dc-border); vertical-align: middle; }
.dc-table tbody tr { transition: background var(--dc-fast) var(--dc-ease); }
.dc-table tbody tr:hover { background: var(--dc-blush); cursor: pointer; }
.dc-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────── */
.badge-status {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-status--confirmed { background: var(--dc-success-bg); color: var(--dc-success); }
.badge-status--pending   { background: var(--dc-warning-bg); color: var(--dc-warning); }
.badge-status--closed    { background: #ece5f2; color: #6b4d94; }
.badge-status--cancelled { background: var(--dc-danger-bg); color: var(--dc-danger); }
.badge-status--no-show   { background: #f0f0f0; color: #6b6b6b; }

/* ── Alerts / flash messages ─────────────────────────────────*/
.dc-alert {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 18px; border-radius: var(--dc-radius-sm); margin-bottom: 18px; font-size: 0.9rem;
    animation: dc-fade-in-down var(--dc-med) var(--dc-ease) both;
    border-left: 4px solid transparent;
}
.dc-alert button { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: inherit; opacity: 0.6; transition: opacity var(--dc-fast); }
.dc-alert button:hover { opacity: 1; }
.dc-alert--success { background: var(--dc-success-bg); color: var(--dc-success); border-left-color: var(--dc-success); }
.dc-alert--error   { background: var(--dc-danger-bg);  color: var(--dc-danger); border-left-color: var(--dc-danger); }
.dc-alert--warning { background: var(--dc-warning-bg); color: var(--dc-warning); border-left-color: var(--dc-warning); }
.dc-alert--info    { background: var(--dc-info-bg);    color: var(--dc-info); border-left-color: var(--dc-info); }

/* ── Empty states ─────────────────────────────────────────── */
.dc-empty {
    text-align: center; padding: 60px 20px; color: var(--dc-charcoal-soft);
    animation: dc-fade-in var(--dc-slow) var(--dc-ease) both;
}
.dc-empty i {
    font-size: 2.4rem; color: var(--dc-gold); margin-bottom: 14px; display: block;
    animation: dc-fade-in-up var(--dc-slow) var(--dc-ease-bounce) both;
}
.dc-empty h4 { color: var(--dc-charcoal); margin-bottom: 6px; }

/* ── Modal ────────────────────────────────────────────────── */
.dc-modal-backdrop {
    position: fixed; inset: 0; background: rgba(43,37,35,0.5); z-index: 100;
    display: none; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(3px);
    opacity: 0; transition: opacity var(--dc-med) var(--dc-ease);
}
.dc-modal-backdrop.open { display: flex; }
.dc-modal-backdrop.open.in { opacity: 1; }
.dc-modal {
    background: var(--dc-white); border-radius: var(--dc-radius-lg); max-width: 520px; width: 100%;
    box-shadow: var(--dc-shadow-lg); max-height: 90vh; overflow-y: auto;
    transform: scale(0.93) translateY(10px); opacity: 0;
    transition: transform var(--dc-med) var(--dc-ease-bounce), opacity var(--dc-med) var(--dc-ease);
}
.dc-modal-backdrop.open.in .dc-modal { transform: scale(1) translateY(0); opacity: 1; }
.dc-modal--wide { max-width: 760px; }
.dc-modal__header { padding: 20px 24px; border-bottom: 1px solid var(--dc-border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dc-modal__header h3 { font-size: 1.15rem; }
.dc-modal__header button {
    background: var(--dc-cream); border: none; width: 32px; height: 32px; border-radius: 50%;
    font-size: 1.2rem; line-height: 1; color: var(--dc-charcoal-soft); cursor: pointer;
    transition: background var(--dc-fast) var(--dc-ease), color var(--dc-fast) var(--dc-ease), transform var(--dc-fast) var(--dc-ease);
    flex-shrink: 0;
}
.dc-modal__header button:hover { background: var(--dc-blush); color: var(--dc-rose-dark); transform: rotate(90deg); }
.dc-modal__body { padding: 24px; }
.dc-modal__footer { padding: 16px 24px; border-top: 1px solid var(--dc-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Toasts ───────────────────────────────────────────────── */
.dc-toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.dc-toast {
    display: flex; align-items: center; gap: 10px;
    background: var(--dc-charcoal); color: var(--dc-cream); padding: 14px 18px; border-radius: var(--dc-radius-sm);
    box-shadow: var(--dc-shadow-lg); font-size: 0.88rem; min-width: 260px;
    animation: dc-toast-in var(--dc-med) var(--dc-ease-bounce);
    transition: opacity var(--dc-med) var(--dc-ease), transform var(--dc-med) var(--dc-ease);
}
.dc-toast.dc-toast--leaving { opacity: 0; transform: translateX(12px) scale(0.96); }
.dc-toast::before {
    font-family: 'bootstrap-icons'; font-size: 1.05rem; flex-shrink: 0;
    content: '\f26b'; /* info circle */
}
.dc-toast--error { background: var(--dc-danger); }
.dc-toast--error::before { content: '\f623'; } /* x-circle */
.dc-toast--success { background: var(--dc-success); }
.dc-toast--success::before { content: '\f26a'; } /* check-circle */
.dc-toast--warning { background: var(--dc-warning); color: #fff; }
.dc-toast--warning::before { content: '\f33a'; } /* exclamation-triangle */
@keyframes dc-toast-in { from { opacity: 0; transform: translateX(24px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; margin-top: 20px; }
.page-btn {
    padding: 7px 13px; border-radius: var(--dc-radius-sm); border: 1px solid var(--dc-border);
    color: var(--dc-charcoal); font-size: 0.85rem; transition: all var(--dc-fast) var(--dc-ease);
}
.page-btn.active { background: var(--dc-rose-dark); color: #fff; border-color: var(--dc-rose-dark); }
.page-btn:hover:not(.active) { background: var(--dc-blush); }

/* ── Filters bar ──────────────────────────────────────────── */
.dc-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: flex-end; }
.dc-filters .dc-form-group { margin-bottom: 0; min-width: 160px; }

/* ── Login page ───────────────────────────────────────────── */
.dc-login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--dc-charcoal) 0%, #3d2f2e 55%, var(--dc-rose-dark) 140%);
    background-size: 200% 200%;
    animation: dc-login-gradient 14s ease infinite;
    padding: 20px; position: relative; overflow: hidden;
}
@keyframes dc-login-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.dc-login-page::before, .dc-login-page::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; pointer-events: none;
}
.dc-login-page::before { width: 340px; height: 340px; background: var(--dc-gold); top: -80px; left: -80px; }
.dc-login-page::after { width: 300px; height: 300px; background: var(--dc-rose); bottom: -90px; right: -60px; }
.dc-login-card {
    background: var(--dc-white); border-radius: var(--dc-radius-lg); padding: 44px 38px;
    width: 100%; max-width: 400px; box-shadow: var(--dc-shadow-lg); text-align: center;
    position: relative; z-index: 1; animation: dc-scale-in var(--dc-slow) var(--dc-ease-bounce) both;
}
.dc-login-card h1 { font-size: 1.7rem; margin-bottom: 4px; }
.dc-login-logo { max-width: 220px; width: 100%; height: auto; margin-bottom: 18px; }
.dc-login-card p.dc-subtitle { color: var(--dc-charcoal-soft); margin-bottom: 28px; font-size: 0.9rem; }
.dc-login-card form { text-align: left; }
.dc-login-forgot { display: block; text-align: center; margin-top: 18px; font-size: 0.85rem; color: var(--dc-charcoal-soft); text-decoration: none; }
.dc-login-forgot:hover { color: var(--dc-rose-dark); }

/* ── Error pages (403 etc.) ───────────────────────────────── */
.dc-error-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dc-error-card {
    text-align: center; max-width: 440px; animation: dc-fade-in-up var(--dc-slow) var(--dc-ease) both;
}
.dc-error-card__code {
    font-family: var(--font-display); font-size: 5rem; font-weight: 700;
    background: var(--dc-gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
    line-height: 1; margin-bottom: 8px;
}

/* ── Utility ──────────────────────────────────────────────── */
.dc-text-muted { color: var(--dc-charcoal-soft); }
.dc-mono { font-variant-numeric: tabular-nums; }
.dc-skeleton { background: linear-gradient(90deg, var(--dc-border) 25%, #f3e9e6 37%, var(--dc-border) 63%); background-size: 400% 100%; animation: dc-skeleton 1.4s ease infinite; border-radius: 6px; }

/* ── Avatar (customer initials) ───────────────────────────── */
.dc-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--dc-blush); color: var(--dc-rose-dark);
    font-weight: 700; font-family: var(--font-display); flex-shrink: 0;
}
.dc-avatar--lg { width: 64px; height: 64px; font-size: 1.4rem; }

/* ── Tabs (customer profile, product detail) ──────────────── */
.dc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--dc-border); padding: 0 20px; }
.dc-tab {
    background: none; border: none; padding: 14px 16px; font-size: 0.9rem; font-weight: 600;
    color: var(--dc-charcoal-soft); cursor: pointer; border-bottom: 2px solid transparent;
    display: flex; align-items: center; gap: 8px; transition: color var(--dc-fast) var(--dc-ease), border-color var(--dc-fast) var(--dc-ease);
}
.dc-tab:hover { color: var(--dc-charcoal); }
.dc-tab.active { color: var(--dc-rose-dark); border-bottom-color: var(--dc-rose-dark); }
.dc-tab-badge {
    background: var(--dc-blush); color: var(--dc-rose-dark); border-radius: 999px;
    font-size: 0.72rem; padding: 1px 7px; font-weight: 700;
}
.dc-pane { padding: 20px; animation: dc-fade-in var(--dc-med) var(--dc-ease) both; }

/* ── Detail rows (label/value pairs) ──────────────────────── */
.dc-detail-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--dc-border);
}
.dc-detail-row:last-child { border-bottom: none; }
.dc-detail-label { color: var(--dc-charcoal-soft); font-size: 0.85rem; }
.dc-detail-value { font-weight: 600; text-align: right; }
.dc-section-lbl {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--dc-charcoal-soft); font-weight: 700; margin: 4px 0 10px;
}

/* ── Chips (categories, tags) ──────────────────────────────── */
.dc-chip {
    display: inline-flex; align-items: center; gap: 6px; background: var(--dc-blush);
    color: var(--dc-rose-dark); border-radius: 999px; padding: 5px 12px; font-size: 0.82rem;
    font-weight: 600; margin: 0 6px 6px 0; transition: transform var(--dc-fast) var(--dc-ease), box-shadow var(--dc-fast) var(--dc-ease);
    animation: dc-scale-in var(--dc-fast) var(--dc-ease-bounce) both;
}
.dc-chip--removable button {
    background: none; border: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
    opacity: 0.7; padding: 0; transition: opacity var(--dc-fast), transform var(--dc-fast);
}
.dc-chip--removable button:hover { opacity: 1; transform: scale(1.2); }
.dc-chip-input {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm); padding: 8px;
}
.dc-chip--gold { background: var(--dc-gold-light); color: #6b4a15; }
.dc-chip--outline { background: transparent; border: 1px solid var(--dc-border); color: var(--dc-charcoal-soft); }

/* ── Stock level pill ─────────────────────────────────────── */
.dc-stock-pill {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.85rem;
    padding: 4px 10px; border-radius: 999px; transition: background var(--dc-fast) var(--dc-ease), color var(--dc-fast) var(--dc-ease);
}
.dc-stock-pill--ok   { background: var(--dc-success-bg); color: var(--dc-success); }
.dc-stock-pill--low  { background: var(--dc-warning-bg); color: var(--dc-warning); animation: dc-pulse-ring 1.8s ease infinite; }
.dc-stock-pill--out  { background: var(--dc-danger-bg);  color: var(--dc-danger); }

/* ── Image grid (product gallery management) ──────────────── */
.dc-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.dc-image-card {
    position: relative; border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm);
    overflow: hidden; background: var(--dc-white); box-shadow: var(--dc-shadow);
    transition: transform var(--dc-med) var(--dc-ease), box-shadow var(--dc-med) var(--dc-ease);
    animation: dc-scale-in var(--dc-med) var(--dc-ease) both;
}
.dc-image-card:hover { transform: translateY(-3px); box-shadow: var(--dc-shadow-md); }
.dc-image-card img { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--dc-blush); transition: transform var(--dc-slow) var(--dc-ease); }
.dc-image-card:hover img { transform: scale(1.05); }
.dc-image-card__badge {
    position: absolute; top: 8px; left: 8px; background: rgba(43,37,35,0.75); color: #fff;
    font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; font-weight: 700;
}
.dc-image-card__actions {
    display: flex; justify-content: space-between; gap: 6px; padding: 8px;
    border-top: 1px solid var(--dc-border);
}
.dc-image-card__actions .dc-btn { flex: 1; padding: 5px 6px; font-size: 0.75rem; }

/* ── Inline-editable variation stock input ────────────────── */
.dc-stock-input { width: 90px; padding: 6px 8px; border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm); font-weight: 600; transition: border-color var(--dc-fast) var(--dc-ease); }
.dc-stock-input:focus { outline: none; border-color: var(--dc-rose); box-shadow: var(--dc-shadow-glow); }
.dc-inline-input { padding: 6px 8px; border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm); transition: border-color var(--dc-fast) var(--dc-ease); }
.dc-inline-input:focus { outline: none; border-color: var(--dc-rose); box-shadow: var(--dc-shadow-glow); }

/* ── Add-row / repeatable option builder ───────────────────── */
.dc-option-row {
    display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; padding: 14px;
    background: var(--dc-cream); border-radius: var(--dc-radius-sm); border: 1px solid var(--dc-border);
    animation: dc-fade-in-up var(--dc-med) var(--dc-ease) both;
    transition: opacity var(--dc-fast) var(--dc-ease), transform var(--dc-fast) var(--dc-ease);
}
.dc-option-row.dc-option-row--leaving { opacity: 0; transform: scale(0.96) translateX(8px); }
.dc-option-row .dc-form-group { flex: 1; margin-bottom: 0; }

/* ── Variant wizard (modal) ────────────────────────────────── */
.dc-wizard-intro { font-size: 0.86rem; color: var(--dc-charcoal-soft); margin-bottom: 16px; line-height: 1.5; }
.dc-wizard-preview {
    margin-top: 18px; padding: 16px; border-radius: var(--dc-radius-sm);
    background: var(--dc-cream); border: 1px dashed var(--dc-gold);
}
.dc-wizard-preview__count {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
    font-weight: 700; font-size: 0.88rem; color: var(--dc-charcoal);
}
.dc-wizard-preview__count .dc-chip { background: var(--dc-gradient-gold); color: #fff; margin: 0; }
.dc-wizard-preview__list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow-y: auto; }
.dc-wizard-preview__empty { font-size: 0.85rem; color: var(--dc-charcoal-soft); font-style: italic; }

/* ── Item picker (POS product/service selection) ──────────── */
.dc-picker-search { position: relative; margin-bottom: 14px; }
.dc-picker-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dc-charcoal-soft); }
.dc-picker-search input { padding-left: 38px; }

.dc-picker-list { max-height: 480px; overflow-y: auto; border: 1px solid var(--dc-border); border-radius: var(--dc-radius); }

/* ── Customer picker dropdown (assets/js/customer-picker.js) ──
   Floating overlay so search suggestions read as a real dropdown rather than inline page
   content - distinct background + shadow, positioned under the search input (its wrapper,
   .dc-picker-search, is already position:relative above). Hidden by default; .init() toggles
   the --open modifier on focus/typing and hides it again on blur or once a customer is picked. */
.dc-picker-dropdown {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--dc-white);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    box-shadow: var(--dc-shadow-md);
    z-index: 40;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 10px;
}
.dc-picker-dropdown.dc-picker-dropdown--open { display: block; }
.dc-picker-row:last-child { border-bottom: none !important; }
.dc-picker-row:hover { background: var(--dc-blush); margin: 0 -10px; padding-left: 10px !important; padding-right: 10px !important; border-radius: 6px; }

.dc-picker-card { border-bottom: 1px solid var(--dc-border); }
.dc-picker-card:last-child { border-bottom: none; }

.dc-picker-card__summary {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; user-select: none;
    transition: background var(--dc-fast) var(--dc-ease);
}
.dc-picker-card__summary:hover { background: var(--dc-cream); }
.dc-picker-card__summary img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--dc-blush); }
.dc-picker-card__summary .dc-picker-noimg {
    width: 42px; height: 42px; border-radius: 8px; background: var(--dc-blush); color: var(--dc-rose-dark);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem;
}
.dc-picker-card__name { font-weight: 600; }
.dc-picker-card__meta { font-size: 0.78rem; color: var(--dc-charcoal-soft); margin-top: 1px; }
.dc-picker-card__price { font-weight: 700; white-space: nowrap; }
.dc-picker-card__chevron { color: var(--dc-charcoal-soft); transition: transform var(--dc-fast) var(--dc-ease); flex-shrink: 0; }
.dc-picker-card.open .dc-picker-card__chevron { transform: rotate(180deg); }

.dc-picker-card__body { display: none; padding: 4px 14px 16px 68px; background: var(--dc-cream); animation: dc-fade-in-up var(--dc-fast) var(--dc-ease) both; }
.dc-picker-card.open .dc-picker-card__body { display: block; }

.dc-option-selects { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dc-option-selects .dc-form-group { margin-bottom: 0; min-width: 130px; }

.dc-resolved-line {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--dc-border);
}
.dc-resolved-line__price { font-weight: 700; }

.dc-qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm); overflow: hidden; background: var(--dc-white); }
.dc-qty-stepper button { width: 34px; border: none; background: var(--dc-blush); color: var(--dc-rose-dark); font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background var(--dc-fast) var(--dc-ease); }
.dc-qty-stepper button:hover { background: var(--dc-gold-light); }
.dc-qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.dc-qty-stepper input { width: 46px; border: none; text-align: center; font-weight: 600; font-size: 0.92rem; -moz-appearance: textfield; }
.dc-qty-stepper input::-webkit-outer-spin-button, .dc-qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.dc-cart-section { margin-top: 18px; }
.dc-cart-line-name { font-weight: 600; }
.dc-cart-line-variation { font-size: 0.8rem; color: var(--dc-charcoal-soft); }
.dc-cart-remove { background: none; border: none; color: var(--dc-danger); font-size: 1.05rem; cursor: pointer; padding: 4px 8px; transition: background var(--dc-fast) var(--dc-ease); border-radius: 6px; }
.dc-cart-remove:hover { background: var(--dc-danger-bg); }
.dc-cart-count-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--dc-rose-dark); color: #fff; border-radius: 999px; font-size: 0.72rem; font-weight: 700; margin-left: 6px;
}

/* ── Finance — revenue-by-period bars ─────────────────────── */
.dc-finance-bars { display: flex; flex-direction: column; gap: 10px; }
.dc-finance-bar-row { display: grid; grid-template-columns: 120px 1fr 100px; align-items: center; gap: 12px; }
.dc-finance-bar-row__label { font-size: 0.85rem; color: var(--dc-charcoal-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-finance-bar-row__track { background: var(--dc-cream); border: 1px solid var(--dc-border); border-radius: 999px; height: 14px; overflow: hidden; }
.dc-finance-bar-row__fill { height: 100%; background: var(--dc-gradient-gold); border-radius: 999px; transition: width 0.6s var(--dc-ease); width: 0; }
.dc-finance-bar-row__value { font-size: 0.85rem; font-weight: 600; text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
    .dc-finance-bar-row { grid-template-columns: 90px 1fr 80px; gap: 8px; }
}

/* ── Payment awaiting-confirmation animation (POS sale confirmation) ── */
.dc-payment-wait {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 10px; color: var(--dc-charcoal-soft); font-size: 0.86rem;
    opacity: 1; max-height: 60px; overflow: hidden;
    transition: opacity 0.35s ease, max-height 0.35s ease, margin 0.35s ease;
}
.dc-payment-wait[hidden] { display: flex; opacity: 0; max-height: 0; margin-top: 0; pointer-events: none; }

.dc-payment-wait__spinner {
    width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
    border: 2.5px solid var(--dc-blush); border-top-color: var(--dc-rose-dark);
    animation: dc-spin 0.8s linear infinite;
}

.dc-payment-wait__dots span {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: var(--dc-rose-dark); margin: 0 1px; animation: dc-pulse-dot 1.2s ease-in-out infinite;
}
.dc-payment-wait__dots span:nth-child(2) { animation-delay: 0.15s; }
.dc-payment-wait__dots span:nth-child(3) { animation-delay: 0.3s; }

.dc-confirm-pop { animation: dc-confirm-pop 0.5s var(--dc-ease-bounce); }

/* ── Photo dropzone (drag-and-drop, click-to-browse upload) ──────────
   Replaces a bare <input type=file> + button with a proper target area;
   works with zero JS (native <label for>) and is enhanced by JS for
   drag-and-drop and multi-file progress. */
.dc-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-align: center; cursor: pointer; margin-top: 16px;
    padding: 30px 20px; border-radius: var(--dc-radius);
    border: 2px dashed var(--dc-gold);
    background: var(--dc-cream);
    transition: background var(--dc-fast) var(--dc-ease), border-color var(--dc-fast) var(--dc-ease), transform var(--dc-fast) var(--dc-ease);
}
.dc-dropzone:hover, .dc-dropzone:focus-visible { background: var(--dc-blush); border-color: var(--dc-rose); }
.dc-dropzone.dragover { background: var(--dc-blush); border-color: var(--dc-rose-dark); transform: scale(1.01); }
.dc-dropzone i { font-size: 1.9rem; color: var(--dc-gold); margin-bottom: 4px; transition: transform var(--dc-fast) var(--dc-ease-bounce); }
.dc-dropzone.dragover i { transform: scale(1.15) translateY(-2px); }
.dc-dropzone__title { font-weight: 600; font-size: 0.94rem; }
.dc-dropzone__hint { font-size: 0.78rem; color: var(--dc-charcoal-soft); }

.dc-upload-progress { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.dc-upload-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm);
    font-size: 0.85rem; background: var(--dc-white);
    animation: dc-fade-in-up var(--dc-fast) var(--dc-ease) both;
}
.dc-upload-item__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.dc-upload-item__status { color: var(--dc-charcoal-soft); margin-left: auto; font-size: 0.8rem; text-align: right; }
.dc-upload-item__spinner {
    width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid var(--dc-blush); border-top-color: var(--dc-rose-dark);
    animation: dc-spin 0.7s linear infinite;
}
.dc-upload-item--done { border-color: var(--dc-success); background: var(--dc-success-bg); }
.dc-upload-item--done .dc-upload-item__spinner { display: none; }
.dc-upload-item--done .dc-upload-item__status { color: var(--dc-success); font-weight: 600; }
.dc-upload-item--done::before { font-family: 'bootstrap-icons'; content: '\f26a'; color: var(--dc-success); flex-shrink: 0; }
.dc-upload-item--error { border-color: var(--dc-danger); background: var(--dc-danger-bg); }
.dc-upload-item--error .dc-upload-item__spinner { display: none; }
.dc-upload-item--error .dc-upload-item__status { color: var(--dc-danger); font-weight: 600; }
.dc-upload-item--error::before { font-family: 'bootstrap-icons'; content: '\f623'; color: var(--dc-danger); flex-shrink: 0; }

/* ── Responsive tables ────────────────────────────────────────────
   Add class="dc-table dc-table--responsive" plus a data-label="..."
   attribute on every <td>, and below a chosen width the table turns
   into a stack of labeled rows instead of forcing horizontal scroll. */
@media (max-width: 700px) {
    .dc-table--responsive thead { display: none; }
    .dc-table--responsive, .dc-table--responsive tbody, .dc-table--responsive tr, .dc-table--responsive td {
        display: block; width: 100%;
    }
    .dc-table--responsive tr {
        margin-bottom: 12px; border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm);
        padding: 6px 14px; background: var(--dc-white);
    }
    .dc-table--responsive tr:last-child { margin-bottom: 0; }
    .dc-table--responsive td {
        display: flex; align-items: center; justify-content: space-between; gap: 14px;
        border-bottom: 1px solid var(--dc-border); padding: 10px 0; text-align: right;
    }
    .dc-table--responsive td:last-child { border-bottom: none; }
    .dc-table--responsive td::before {
        content: attr(data-label); font-weight: 700; font-size: 0.72rem; text-transform: uppercase;
        letter-spacing: 0.3px; color: var(--dc-charcoal-soft); text-align: left; flex-shrink: 0;
    }
    .dc-table--responsive td > * { margin-left: auto; }
}

/* ── Variations & stock: read-only by default ─────────────────────
   Every cell in the variations table renders both a plain read-only
   value (.dc-vv) and its real input/select/checkbox (.dc-ve). Only one
   of the two shows at a time, based on whether the table carries
   .is-editing (toggled by the "Edit" button in products.js) - so the
   page opens calm and read-only, and nothing is editable until someone
   deliberately clicks Edit. */
.dc-variations .dc-ve { display: none; }
.dc-variations.is-editing .dc-vv { display: none; }
.dc-variations.is-editing .vStock,
.dc-variations.is-editing .vAddOnPrice,
.dc-variations.is-editing .vSalePrice,
.dc-variations.is-editing .vState { display: inline-block; }
.dc-variations.is-editing .vDelete { display: inline-block; }
.dc-variations th.dc-col-remove,
.dc-variations td.dc-col-remove { display: none; }
.dc-variations.is-editing th.dc-col-remove,
.dc-variations.is-editing td.dc-col-remove { display: table-cell; }
.dc-variations-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

@media (max-width: 700px) {
    /* Inside the stacked mobile card layout every other cell is display:flex
       (see .dc-table--responsive td above), so the Remove cell needs to match
       that instead of table-cell when it's shown during editing. */
    .dc-variations.is-editing td.dc-col-remove { display: flex; }
}

/* ── Sitewide small-screen pass ───────────────────────────────────
   These rules aim at the app's most common markup pattern - a plain
   `style="display:flex;gap:Npx"` row used to sit two or three form
   fields, buttons or bits of meta text side by side - without needing
   to touch every page individually. Purpose-built responsive layouts
   (the sidebar, topbar, modal, image grid, wizard preview, etc.) keep
   their own more specific rules above/below and are unaffected. */
@media (max-width: 640px) {
    /* !important is required here: many pages set `style="flex:1"` or
       `style="display:flex"` directly on the element, and an inline style
       otherwise always wins over any external stylesheet rule. */
    .dc-content [style*="display:flex"] {
        flex-wrap: wrap !important;
    }
    .dc-content [style*="display:flex"] > .dc-form-group,
    .dc-content [style*="display:flex"] > [style*="flex:1"],
    .dc-content [style*="display:flex"] > [style*="flex: 1"] {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    .dc-card { padding: 16px; }
    .dc-card__header { gap: 10px; }
    .dc-modal__body, .dc-modal__header, .dc-modal__footer { padding-left: 18px; padding-right: 18px; }
    .dc-btn { min-height: 40px; }
    .dc-image-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .dc-upload-item__name { max-width: 46vw; }
}

/* ── POS: step headings ─────────────────────────────────────────────
   Turns the plain "1. Customer Details" text into a small numbered
   badge + title, so the sale/booking flow reads as a clear sequence
   of steps rather than a stack of identical-looking cards. */
.dc-step-heading { display: flex; align-items: center; gap: 12px; }
.dc-step-badge {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--dc-gradient-gold); color: #fff;
    font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
    box-shadow: var(--dc-shadow-xs);
}
.dc-step-heading h3 { margin: 0; }

/* ── POS: item picker polish ─────────────────────────────────────── */
.dc-picker-list { box-shadow: var(--dc-shadow-xs); }
.dc-picker-card { position: relative; }
.dc-picker-card.open { box-shadow: inset 3px 0 0 var(--dc-gold); background: var(--dc-blush); }
.dc-picker-card.open .dc-picker-card__summary:hover { background: transparent; }
.dc-picker-card__summary img, .dc-picker-card__summary .dc-picker-noimg { transition: transform var(--dc-med) var(--dc-ease); }
.dc-picker-card__summary:hover img, .dc-picker-card__summary:hover .dc-picker-noimg { transform: scale(1.06); }

/* ── POS: price summary / receipt ─────────────────────────────────
   The Calculate Price / discount JS rebuilds #priceSummary's innerHTML
   from scratch on every recalculation, so these classes just need to
   exist here - a fresh .dc-price-total element is inserted each time,
   which naturally replays its entrance animation with no JS required. */
.dc-price-summary p.dc-text-muted { padding: 4px 0; }
.dc-price-lines { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--dc-border); font-size: 0.9rem; }
.dc-price-line { display: flex; justify-content: space-between; padding: 3px 0; color: var(--dc-charcoal-soft); }
.dc-price-line--discount { color: var(--dc-success); font-weight: 600; }
.dc-price-total {
    display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--dc-border); transform-origin: right center;
    animation: dc-pop 0.4s var(--dc-ease-bounce);
}
.dc-price-total span:first-child { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--dc-charcoal-soft); }
.dc-price-total span:last-child { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--dc-charcoal); }

/* ── POS: landing tiles ────────────────────────────────────────────── */
.dc-pos-tile {
    display: block; text-align: center; padding: 40px 24px; text-decoration: none;
    transition: transform var(--dc-med) var(--dc-ease), box-shadow var(--dc-med) var(--dc-ease), border-color var(--dc-med) var(--dc-ease);
}
.dc-pos-tile:hover { transform: translateY(-4px); box-shadow: var(--dc-shadow-lg); border-color: var(--dc-gold); }
.dc-pos-tile__icon {
    display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%;
    font-size: 2rem; margin-bottom: 10px; transition: transform var(--dc-med) var(--dc-ease-bounce);
}
.dc-pos-tile:hover .dc-pos-tile__icon { transform: scale(1.08) rotate(-4deg); }
.dc-pos-tile__icon--rose { background: var(--dc-blush); color: var(--dc-rose-dark); }
.dc-pos-tile__icon--gold { background: #f7ecd4; color: var(--dc-gold); }
.dc-pos-tile h2 { margin: 4px 0 6px; }

@media (max-width: 640px) {
    .dc-pos-tile { padding: 30px 18px; }
}

/* ── POS: payment plan schedule preview ──────────────────────────── */
.dc-payment-schedule {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--dc-cream);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    animation: dc-fade-in-up var(--dc-med) var(--dc-ease);
}
.dc-payment-schedule__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dc-payment-schedule__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px dashed var(--dc-border);
}
.dc-payment-schedule__list li:last-child { border-bottom: none; }
.dc-payment-schedule__list li strong { color: var(--dc-rose-dark); font-family: var(--font-display); white-space: nowrap; }

/* ── Order notes / audit trail ───────────────────────────────────── */
.dc-notes-trail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dc-note {
    display: flex;
    gap: 10px;
}
.dc-note__icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--dc-cream);
    color: var(--dc-gold);
    font-size: 0.9rem;
}
.dc-note__icon--message { background: var(--dc-blush); color: var(--dc-rose-dark); }
.dc-note__body {
    flex: 1;
    min-width: 0;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--dc-border);
}
.dc-note:last-child .dc-note__body { border-bottom: none; padding-bottom: 0; }
