:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #1e293b;
    --table-head: #f1f5f9;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #0b1220;
    --card: #111827;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #334155;
    --sidebar-bg: #020617;
    --sidebar-border: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #1e293b;
    --table-head: #1f2937;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

body.sidebar-open {
    overflow: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Auth Layout — legado; auth usa rb-auth-page em react-bits.css */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-height: 64px;
    max-width: 200px;
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Marca — ícone + nome (landing, login, etc.) */
.app-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.app-brand__mark {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.app-brand__logo {
    max-height: 2.5rem;
    max-width: 120px;
    width: auto;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.app-brand__name {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

.app-brand__name-accent {
    color: var(--primary);
}

.app-brand--auth {
    margin-bottom: 0.25rem;
}

.app-brand--auth .app-brand__name {
    font-size: 1.5rem;
}

.app-brand--caption {
    justify-content: flex-start;
    margin-bottom: 0.375rem;
}

.app-brand--caption .app-brand__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.app-brand--caption .app-brand__name-accent {
    color: #60a5fa;
}

.app-brand--nav .app-brand__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f8fafc;
}

.app-brand--nav .app-brand__name-accent {
    color: #3b82f6;
}

.app-brand--footer .app-brand__name {
    font-size: 1rem;
    font-weight: 700;
}

.app-brand--sidebar {
    justify-content: flex-start;
    gap: 0.625rem;
    width: 100%;
}

.app-brand--sidebar .app-brand__mark {
    width: 2.25rem;
    height: 2.25rem;
}

.app-brand--sidebar .app-brand__logo {
    max-height: 2.25rem;
    max-width: 100px;
}

.app-brand--sidebar .app-brand__name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
    word-break: break-word;
}

.app-brand--sidebar .app-brand__name-accent {
    color: #60a5fa;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}

.form-control.is-invalid { border-color: var(--danger); }

.input-group { position: relative; display: flex; }
.input-group .form-control { padding-right: 2.75rem; }
.input-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  transition: color 0.15s, background 0.15s;
}
.input-eye:hover { color: var(--text); background: rgb(15 23 42 / 0.06); }
.input-eye:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15); }

.form-text { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-info a { color: inherit; font-weight: 600; text-decoration: underline; }

[data-theme="dark"] .alert-success { background: #14532d; color: #bbf7d0; border-color: #166534; }
[data-theme="dark"] .alert-error { background: #7f1d1d; color: #fecaca; border-color: #991b1b; }
[data-theme="dark"] .alert-warning { background: #78350f; color: #fde68a; border-color: #92400e; }
[data-theme="dark"] .alert-info { background: #1e3a8a; color: #bfdbfe; border-color: #1e40af; }
[data-theme="dark"] .badge-success { background: #14532d; color: #bbf7d0; }
[data-theme="dark"] .badge-warning { background: #78350f; color: #fde68a; }
[data-theme="dark"] .badge-danger { background: #7f1d1d; color: #fecaca; }

/* Dashboard Layout */
:root {
    --sidebar-width: 260px;
    --sidebar-width-expanded: 260px;
    --sidebar-width-collapsed: 72px;
}

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.45);
    z-index: 90;
}

.sidebar-backdrop.visible {
    display: block;
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.sidebar-brand__stack {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
    min-width: 0;
}

.sidebar-brand__stack small {
    color: #94a3b8;
    font-size: 0.75rem;
    padding-left: 0.125rem;
}

.sidebar-brand-image {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgb(255 255 255 / 0.08);
}

.sidebar-brand-text h2 {
    font-size: 1rem;
    line-height: 1.3;
    word-break: break-word;
}

.sidebar-brand h2 { font-size: 1.125rem; }
.sidebar-brand small { color: #94a3b8; font-size: 0.75rem; }

.sidebar-nav-label {
    min-width: 0;
    flex: 1;
}

.sidebar-nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    min-height: 48px;
}

.sidebar-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.sidebar-nav-icon svg {
    width: 100%;
    height: 100%;
}

.sidebar-nav a:hover .sidebar-nav-icon,
.sidebar-nav a.active .sidebar-nav-icon {
    opacity: 1;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--sidebar-hover);
    color: white;
    text-decoration: none;
}

.sidebar-nav-group {
    border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.sidebar-nav-group:last-of-type {
    border-bottom: none;
}

.sidebar-nav-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1.5rem 0.5rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s;
    gap: 0.5rem;
}

.sidebar-nav-group__heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.sidebar-nav-group__heading .sidebar-nav-icon {
    width: 1rem;
    height: 1rem;
    opacity: 0.85;
}

.sidebar-nav-group__label {
    letter-spacing: 0.08em;
}

.sidebar-nav-group__toggle:hover,
.sidebar-nav-group.is-active-route .sidebar-nav-group__toggle {
    color: #e2e8f0;
}

.sidebar-nav-group__toggle:hover .sidebar-nav-icon,
.sidebar-nav-group.is-active-route .sidebar-nav-group__toggle .sidebar-nav-icon {
    opacity: 1;
}

.sidebar-nav-group__chevron {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-top: -0.15rem;
    opacity: 0.75;
}

.sidebar-nav-group.is-collapsed .sidebar-nav-group__chevron {
    transform: rotate(-45deg);
    margin-top: 0.1rem;
}

.sidebar-nav-group__items {
    overflow: hidden;
    max-height: 20rem;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.sidebar-nav-group.is-collapsed .sidebar-nav-group__items {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-nav-group__items a {
    padding-left: 1.75rem;
    font-size: 0.9rem;
}

.sidebar-nav-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-nav-logout:hover {
    background: var(--sidebar-hover);
    color: white;
    text-decoration: none;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    min-width: 0;
    transition: margin-left 0.3s ease;
}

.sidebar-collapse-toggle {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    z-index: 101;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-collapse-toggle:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-collapse-toggle__bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 14px;
    height: 14px;
}

.sidebar-collapse-toggle__bars span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 1px;
}

@media (min-width: 769px) {
    .tenant-app .sidebar-collapse-toggle {
        display: inline-flex;
    }

    body.tenant-app.sidebar-collapsed {
        --sidebar-width: var(--sidebar-width-collapsed);
    }

    body.tenant-app.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding: 2.25rem 0.5rem 1rem;
    }

    body.tenant-app.sidebar-collapsed .sidebar-brand-text {
        display: none;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-group {
        border-bottom: none;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-group__toggle {
        display: none;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-group__items,
    body.tenant-app.sidebar-collapsed .sidebar-nav-group.is-collapsed .sidebar-nav-group__items {
        max-height: none;
        opacity: 1;
        pointer-events: auto;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav a,
    body.tenant-app.sidebar-collapsed .sidebar-nav-logout {
        justify-content: center;
        padding: 0.875rem 0.5rem;
        gap: 0;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-group__items a {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-label {
        display: none;
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-impersonation {
        display: none;
    }

    body.tenant-app.sidebar-collapsed .sidebar-collapse-toggle {
        right: 50%;
        transform: translateX(50%);
    }

    body.tenant-app.sidebar-collapsed .sidebar-nav-icon {
        width: 1.375rem;
        height: 1.375rem;
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar h1 {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    line-height: 1.2;
}

.topbar-heading {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.topbar-subtitle {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user {
    font-size: 0.875rem;
    color: var(--muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

.branch-switcher__label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.6875rem;
}

.branch-switcher__select {
    font-size: 0.8125rem;
    padding: 0.3rem 1.75rem 0.3rem 0.5rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 8px;
    background-color: var(--surface, #fff);
    color: inherit;
    max-width: 180px;
    cursor: pointer;
}

.branch-switcher--static {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text, inherit);
    background-color: var(--surface, #fff);
}

.role-perms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.role-perm-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--surface, #fff);
}

.role-perm-item input {
    margin-top: 0.15rem;
}

.role-perm-item strong {
    display: block;
    font-size: 0.875rem;
}

.role-perm-item small {
    display: block;
    color: var(--muted);
    font-size: 0.6875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.pwa-install-status {
    color: var(--muted);
    font-size: 0.8125rem;
}

.pwa-install-steps {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.pwa-install-steps li {
    margin: 0.25rem 0;
}

.pwa-install-hint {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.8125rem;
}

.menu-toggle {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.125rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
    color: var(--text);
    background: var(--sidebar-hover, rgb(0 0 0 / 0.05));
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.theme-toggle .theme-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-card--icon {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card__icon-svg svg {
    width: 20px;
    height: 20px;
}

.stat-card__icon--gold { background: #fef3c7; color: #b45309; }
.stat-card__icon--primary { background: #dbeafe; color: #1d4ed8; }
.stat-card__icon--success { background: #dcfce7; color: #16a34a; }
.stat-card__icon--info { background: #cffafe; color: #0891b2; }
.stat-card__icon--warning { background: #fef3c7; color: #d97706; }
.stat-card__icon--danger { background: #fee2e2; color: #dc2626; }
.stat-card__icon--brand { background: #e0e7ff; color: #4338ca; }

.stat-card__body {
    flex: 1;
    min-width: 0;
}

.stat-card .label { font-size: 0.8125rem; color: var(--muted); }
.stat-card .value { font-size: 1.75rem; font-weight: 700; margin-top: 0.25rem; }
.stat-card.warning .value { color: var(--warning); }
.stat-card.success .value { color: var(--success); }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-body { padding: 1.25rem; }

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th { background: var(--table-head); font-weight: 600; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }

.table-head-primary th {
    background: var(--primary);
    color: #fff;
    border-bottom-color: var(--primary-dark);
}

.admin-tenants-page {
    max-width: 1200px;
}

.admin-tenants-toolbar {
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Sprint 3: caixa, dashboard, relatórios, alertas */
.pos-cash-banner {
    grid-column: 1 / -1;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.pos-cash-banner a {
    font-weight: 600;
    margin-left: 0.25rem;
}

.pos-cash-banner--open {
    background: rgb(34 197 94 / 0.12);
    border: 1px solid rgb(34 197 94 / 0.35);
    color: var(--text);
}

.pos-cash-banner--closed {
    background: rgb(217 119 6 / 0.12);
    border: 1px solid rgb(217 119 6 / 0.35);
    color: var(--text);
}

.dashboard-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-alert {
    display: inline-flex;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    background: rgb(217 119 6 / 0.12);
    border: 1px solid rgb(217 119 6 / 0.3);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.dashboard-alert:hover {
    background: rgb(217 119 6 / 0.18);
}

.dashboard-chart-card {
    margin-bottom: 1rem;
}

.dashboard-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-chart-compare {
    font-size: 0.8125rem;
    font-weight: 600;
}

.dashboard-chart-compare--up { color: var(--success); }
.dashboard-chart-compare--down { color: var(--danger); }

.dashboard-sales-chart {
    min-height: 180px;
}

.dashboard-chart-canvas {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 160px;
    padding-top: 0.5rem;
}

.dashboard-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.dashboard-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 130px;
    width: 100%;
}

.dashboard-chart-bar {
    width: 45%;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.2s;
}

.dashboard-chart-bar--current { background: var(--primary); }
.dashboard-chart-bar--previous { background: rgb(148 163 184 / 0.55); }

.dashboard-chart-label {
    font-size: 0.625rem;
    color: var(--muted);
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dashboard-chart-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

.dashboard-chart-legend__dot {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 2px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.dashboard-chart-legend__dot--current { background: var(--primary); }
.dashboard-chart-legend__dot--previous { background: rgb(148 163 184 / 0.55); }

.cash-register-page { max-width: 1100px; }

.cash-register-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.cash-register-status--open {
    background: rgb(34 197 94 / 0.12);
    border: 1px solid rgb(34 197 94 / 0.35);
}

.cash-register-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.cash-movement-form .form-group:last-of-type {
    margin-bottom: 0.75rem;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.report-date-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

.report-date-fields .form-group {
    margin-bottom: 0;
    min-width: 140px;
}

.report-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Sprint 4: PIX, tablet, PWA, dashboard Chart.js */
.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0 1rem;
}

.settings-section-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.dashboard-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-chart-card--half {
    margin-bottom: 0;
}

.dashboard-chart-wrap {
    position: relative;
    height: 220px;
}

.dashboard-chart-wrap--donut {
    height: 200px;
}

.dashboard-payment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

.dashboard-payment-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.dashboard-payment-legend__item i {
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    font-style: normal;
}

.pos-toolbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pos-operator-badge {
    display: none;
    margin-right: auto;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pos-tablet-mode .pos-operator-badge {
    display: inline-block;
}

.pos-pix-preview {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: rgb(37 99 235 / 0.08);
    border: 1px dashed rgb(37 99 235 / 0.35);
    margin-bottom: 0.75rem;
}

.pos-pix-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pos-pix-amount {
    text-align: center;
    font-size: 1.125rem;
    margin: 0;
}

.pos-pix-qr {
    display: flex;
    justify-content: center;
    min-height: 220px;
    padding: 0.5rem;
    background: #fff;
    border-radius: var(--radius);
}

.pos-pix-copy-row {
    display: flex;
    gap: 0.5rem;
}

.pos-pix-copy-row .form-control {
    flex: 1;
    font-size: 0.75rem;
}

.pos-modal__dialog--pix {
    max-width: 420px;
}

.pwa-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #d97706;
    color: #fff;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
}

body.pos-tablet-mode .sidebar,
body.pos-tablet-mode .sidebar-backdrop,
body.pos-tablet-mode .topbar {
    display: none !important;
}

body.pos-tablet-mode .main-content {
    margin-left: 0 !important;
    padding: 0.75rem !important;
    max-width: none;
}

body.pos-tablet-mode .pos-layout {
    height: calc(100vh - 1.5rem);
    grid-template-columns: 1fr 420px;
    gap: 1rem;
}

body.pos-tablet-mode .pos-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

body.pos-tablet-mode .pos-catalog-item {
    min-height: 120px;
    padding: 1rem;
}

body.pos-tablet-mode .pos-catalog-item__name {
    font-size: 1rem;
}

body.pos-tablet-mode .pos-catalog-item__price {
    font-size: 1.0625rem;
}

body.pos-tablet-mode .pos-cart {
    max-height: none;
    position: sticky;
    top: 0;
}

body.pos-tablet-mode .barcode-input {
    font-size: 1.375rem;
}

@media (min-width: 768px) and (max-width: 1180px) {
    body:not(.pos-tablet-mode) .pos-layout {
        grid-template-columns: 1fr 340px;
    }
}

@media (orientation: landscape) and (max-height: 820px) {
    body.pos-tablet-mode .pos-layout {
        grid-template-columns: 1.2fr 380px;
    }
}

/* POS */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1rem;
    height: calc(100vh - 120px);
}

.pos-products { overflow-y: auto; grid-column: 1; }
.pos-cart {
    grid-column: 2;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.barcode-input {
    font-size: 1.25rem;
    padding: 1rem;
    text-align: center;
    letter-spacing: 2px;
}

.cart-items { flex: 1; overflow-y: auto; padding: 1rem; }

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-qty-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.cart-qty-btn:hover {
    background: var(--card);
    border-color: var(--primary);
}

.cart-qty-input {
    width: 3rem;
    text-align: center;
    padding: 0.375rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex-shrink: 0;
}

.cart-item-line-total {
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

.cart-item-remove {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
}

.pos-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0;
    border-bottom: 1px solid var(--border);
}

.pos-cart-header .card-header {
    padding: 0;
    border: none;
    background: transparent;
}

.pos-shortcuts-btn {
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0;
    border-radius: 50%;
    font-weight: 700;
}

.cart-summary {
    padding: 0.75rem 1rem 0;
    border-top: 1px solid var(--border);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.375rem;
}

.cart-summary-row--discount {
    color: var(--success);
    font-weight: 600;
}

.cart-total {
    padding: 0.5rem 0 0.75rem;
    border-top: none;
    font-size: 1.625rem;
    font-weight: 800;
    text-align: right;
    color: var(--primary);
}

.pos-discount-group {
    margin-bottom: 0.75rem;
}

.pos-discount-row {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.5rem;
}

.pos-discount-type {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.pos-cash-fields {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    background: rgb(34 197 94 / 0.08);
    border: 1px solid rgb(34 197 94 / 0.25);
}

.pos-change-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius);
    background: var(--card);
    font-size: 0.9375rem;
}

.pos-change-display strong {
    font-size: 1.25rem;
    color: var(--success);
}

.pos-change-display--insufficient strong {
    color: var(--danger);
}

.pos-kbd {
    display: inline-block;
    margin-left: 0.375rem;
    padding: 0.125rem 0.375rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgb(255 255 255 / 0.15);
    font-size: 0.6875rem;
    font-family: inherit;
    font-weight: 600;
    vertical-align: middle;
}

.pos-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pos-modal[hidden] {
    display: none;
}

.pos-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 0.55);
}

.pos-modal__dialog {
    position: relative;
    width: min(420px, 100%);
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 20px 48px rgb(15 23 42 / 0.2);
    padding: 1.25rem;
}

.pos-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.pos-modal__header h2 {
    margin: 0;
    font-size: 1.125rem;
}

.pos-modal__close {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.pos-shortcuts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.pos-shortcuts-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.pos-shortcuts-list kbd {
    min-width: 2.5rem;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgb(15 23 42 / 0.18);
    opacity: 0;
    transform: translateX(1rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.toast--visible {
    opacity: 1;
    transform: translateX(0);
}

.toast--leaving {
    opacity: 0;
    transform: translateX(1rem);
}

.toast__icon {
    flex-shrink: 0;
    width: 1.375rem;
    height: 1.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.toast--success .toast__icon { background: #dcfce7; color: #166534; }
.toast--error .toast__icon { background: #fee2e2; color: #991b1b; }
.toast--warning .toast__icon { background: #fef3c7; color: #92400e; }
.toast--info .toast__icon { background: #dbeafe; color: #1e40af; }

.toast__message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.pos-modal__dialog--wide {
    width: min(560px, 100%);
}

.pos-mixed-fields {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
    background: rgb(37 99 235 / 0.06);
    border: 1px solid rgb(37 99 235 / 0.2);
}

.pos-mixed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
}

.pos-mixed-remaining--ok { color: var(--success); }
.pos-mixed-remaining--warn { color: var(--warning); }

.pos-mixed-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.pos-mixed-remove {
    min-width: 2rem;
    padding: 0;
}

.pos-selected-customer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 0.8125rem;
}

.pos-suspended-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 360px;
    overflow-y: auto;
}

.pos-suspended-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pos-suspended-item__main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.pos-suspended-item__main small {
    color: var(--muted);
    font-size: 0.75rem;
}

.pos-suspended-item__actions {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex-shrink: 0;
}

.sales-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.sales-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sales-pagination-info {
    font-size: 0.875rem;
    color: var(--muted);
}

.sales-pagination-actions {
    display: flex;
    gap: 0.5rem;
}

.sales-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sales-row--cancelled {
    opacity: 0.72;
}

.sales-row--cancelled td {
    text-decoration: line-through;
    text-decoration-color: var(--muted);
}

.sales-row--cancelled .sales-actions-cell,
.sales-row--cancelled .badge {
    text-decoration: none;
}

.pos-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pos-tab {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pos-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pos-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.pos-panel.active {
    display: flex;
}

.pos-search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.pos-search-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 280px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgb(15 23 42 / 0.14);
}

.pos-search-dropdown__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.pos-search-dropdown__item:last-child {
    border-bottom: none;
}

.pos-search-dropdown__item:hover,
.pos-search-dropdown__item:focus {
    background: var(--bg);
    outline: none;
}

.pos-search-dropdown__name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.pos-search-dropdown__meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.pos-search-dropdown__empty {
    padding: 0.875rem;
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center;
}

.pos-search {
    margin-bottom: 0;
}

.pos-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    max-height: 420px;
    overflow-y: auto;
}

.pos-catalog-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pos-catalog-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgb(15 23 42 / 0.08);
}

.pos-catalog-item--service {
    border-color: #93c5fd;
}

.pos-catalog-item__img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.pos-catalog-item__placeholder {
    font-size: 1.75rem;
    line-height: 1;
}

.pos-catalog-item__name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.pos-catalog-item__price {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 700;
}

.pos-catalog-item__meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.pos-empty {
    color: var(--muted);
    text-align: center;
    padding: 1rem;
}

.pos-empty--cart {
    margin: 0;
}

.pos-hint {
    margin-top: 0.5rem;
}

.pos-checkout-form {
    padding: 1rem;
}

.pos-credit-fields {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--table-head);
}

.pos-credit-fields .form-text {
    margin-top: 0.25rem;
}

.pos-clear-btn {
    margin-top: 0.5rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.cart-item-type {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    width: fit-content;
}

.cart-item-type--product {
    background: #dcfce7;
    color: #166534;
}

.cart-item-type--service {
    background: #dbeafe;
    color: #1e40af;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.report-section-title {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.services-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Sprint 5: toolbar unificada em listagens */
.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.list-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    min-width: min(100%, 520px);
    justify-content: flex-end;
}

.list-toolbar__filters .form-control {
    min-width: 140px;
    max-width: 220px;
}

.list-toolbar__filters input[type="search"] {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
}

.list-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.list-pagination-actions {
    display: flex;
    gap: 0.5rem;
}

.list-pagination-info {
    font-size: 0.875rem;
    color: var(--muted);
}

.list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.category-filter-chip.active {
    background: var(--chip-color, var(--primary));
    border-color: var(--chip-color, var(--primary));
    color: #fff;
}

.category-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--badge-color, #2563eb) 15%, transparent);
    color: var(--badge-color, #2563eb);
}

.category-color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgb(0 0 0 / 0.1);
}

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

.pos-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.pos-category-chip {
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pos-category-chip.active {
    background: var(--chip-color, var(--primary));
    border-color: var(--chip-color, var(--primary));
    color: #fff;
}

.pos-favorites-section {
    margin-bottom: 0.75rem;
}

.pos-favorites-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.pos-favorites-grid {
    margin-bottom: 0.5rem;
}

.pos-catalog-item__favorite {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    color: #f59e0b;
    font-size: 0.875rem;
}

.cart-item-qty-weighed {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pos-catalog-item--service {
    border-top: 3px solid var(--service-accent, #93c5fd);
}

.pos-catalog-item__category {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--service-accent, #2563eb);
}

.form-control-color {
    height: 42px;
    padding: 0.25rem;
}

.users-limit-text {
    margin: 0;
    color: var(--text);
}

.users-limit-alert {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.users-limit-link {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 600;
    color: inherit;
}

.users-form-card {
    margin-bottom: 1rem;
}

/* Banner */
.tenant-banner {
    width: 100%;
    height: clamp(90px, 22vw, 120px);
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

/* Tenant settings */
.settings-page {
    max-width: 760px;
}

.settings-card .card-body {
    padding: 1.5rem;
}

.brand-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-upload-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-upload-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.image-upload-actions .form-control {
    flex: 1 1 220px;
}

.image-remove-btn {
    flex: 0 0 auto;
}

.image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-preview-icon {
    width: 96px;
    height: 96px;
}

.image-preview-logo {
    width: 100%;
    min-height: 96px;
    max-height: 120px;
}

.image-preview-banner {
    width: 100%;
    min-height: 120px;
    max-height: 160px;
}

.image-preview-product {
    width: 140px;
    height: 140px;
}

.product-form-card {
    max-width: 600px;
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.product-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 0.75rem;
}

.image-placeholder {
    color: var(--muted);
    font-size: 0.875rem;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.theme-option {
    cursor: pointer;
}

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

.theme-option-card {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.theme-option-card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.theme-option-card small {
    color: var(--muted);
}

.theme-option input:checked + .theme-option-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}

.theme-option-preview {
    display: block;
    height: 56px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.theme-option-card--light .theme-option-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.8);
}

.theme-option-card--dark .theme-option-preview {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.settings-appearance-card {
    margin-bottom: 1rem;
}

.settings-appearance-hint {
    margin-bottom: 1rem;
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-actions {
    margin-top: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
}

/* Dashboard — cards vibrantes (empresa e gestor) */
.tenant-dashboard .stat-card,
.admin-dashboard .stat-card {
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tenant-dashboard .stat-card:hover,
.admin-dashboard .stat-card:hover {
    transform: translateY(-2px);
}

.tenant-dashboard .stat-card::before,
.admin-dashboard .stat-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.12);
    pointer-events: none;
}

.tenant-dashboard .stat-card .label,
.admin-dashboard .stat-card .label {
    color: rgb(255 255 255 / 0.88);
    font-weight: 500;
}

.tenant-dashboard .stat-card .value,
.admin-dashboard .stat-card .value {
    color: #fff;
}

.tenant-dashboard .stat-card small,
.admin-dashboard .stat-card small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgb(255 255 255 / 0.78);
}

.tenant-dashboard .stat-card__icon,
.admin-dashboard .stat-card__icon {
    background: rgb(255 255 255 / 0.18);
    color: #fff;
}

.tenant-dashboard .stat-card--success,
.admin-dashboard .stat-card--success {
    background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
    box-shadow: 0 6px 20px rgb(16 185 129 / 0.35);
}

.tenant-dashboard .stat-card--success:hover,
.admin-dashboard .stat-card--success:hover {
    box-shadow: 0 10px 28px rgb(16 185 129 / 0.42);
}

.tenant-dashboard .stat-card--primary,
.admin-dashboard .stat-card--primary {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #3b82f6 100%);
    box-shadow: 0 6px 20px rgb(37 99 235 / 0.35);
}

.tenant-dashboard .stat-card--primary:hover,
.admin-dashboard .stat-card--primary:hover {
    box-shadow: 0 10px 28px rgb(37 99 235 / 0.42);
}

.tenant-dashboard .stat-card--info,
.admin-dashboard .stat-card--info {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 45%, #8b5cf6 100%);
    box-shadow: 0 6px 20px rgb(124 58 237 / 0.35);
}

.tenant-dashboard .stat-card--info:hover,
.admin-dashboard .stat-card--info:hover {
    box-shadow: 0 10px 28px rgb(124 58 237 / 0.42);
}

.tenant-dashboard .stat-card--warning,
.admin-dashboard .stat-card--warning {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 45%, #f97316 100%);
    box-shadow: 0 6px 20px rgb(249 115 22 / 0.35);
}

.tenant-dashboard .stat-card--warning:hover,
.admin-dashboard .stat-card--warning:hover {
    box-shadow: 0 10px 28px rgb(249 115 22 / 0.42);
}

.tenant-dashboard .dashboard-card,
.admin-dashboard .dashboard-card {
    border: none;
    overflow: hidden;
}

.tenant-dashboard .dashboard-card .card-header,
.admin-dashboard .dashboard-card .card-header {
    border-bottom: none;
    color: #fff;
    font-size: 0.9375rem;
    padding: 1rem 1.25rem;
}

.tenant-dashboard .dashboard-card--products .card-header,
.admin-dashboard .dashboard-card--products .card-header,
.tenant-dashboard .dashboard-card--tenants .card-header,
.admin-dashboard .dashboard-card--tenants .card-header {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.tenant-dashboard .dashboard-card--stock .card-header,
.admin-dashboard .dashboard-card--stock .card-header {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

.tenant-dashboard .dashboard-card .card-body,
.admin-dashboard .dashboard-card .card-body {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.tenant-dashboard .dashboard-empty,
.admin-dashboard .dashboard-empty {
    color: var(--muted);
    font-size: 0.875rem;
}

.tenant-dashboard .dashboard-ok,
.admin-dashboard .dashboard-ok {
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 500;
}

.tenant-dashboard .dashboard-stock-alert,
.admin-dashboard .dashboard-stock-alert {
    margin-bottom: 0.5rem;
}

.tenant-dashboard .dashboard-stock-alert:last-child,
.admin-dashboard .dashboard-stock-alert:last-child {
    margin-bottom: 0;
}

.admin-dashboard .dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-dashboard .dashboard-card-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-dashboard .dashboard-card-link {
    color: #fff;
    border-color: rgb(255 255 255 / 0.45);
    background: rgb(255 255 255 / 0.08);
}

.admin-dashboard .dashboard-card-link:hover {
    background: rgb(255 255 255 / 0.16);
    color: #fff;
}

.view-toggle {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.15);
    border: 1px solid rgb(255 255 255 / 0.2);
}

.view-toggle__btn {
    border: none;
    background: transparent;
    color: rgb(255 255 255 / 0.85);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.view-toggle__btn:hover {
    color: #fff;
}

.view-toggle__btn.active {
    background: #fff;
    color: #1d4ed8;
}

.dashboard-tenants[data-view="list"] .tenants-view--cards {
    display: none;
}

.dashboard-tenants[data-view="cards"] .tenants-view--list {
    display: none;
}

.tenant-list-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.tenant-list-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}

.tenant-list-logo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg);
}

.tenant-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tenant-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tenant-card--clickable {
    position: relative;
    cursor: pointer;
}

.tenant-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-decoration: none;
}

.tenant-card--clickable .tenant-card__actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tenant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgb(15 23 42 / 0.08);
}

.tenant-card--inactive {
    opacity: 0.82;
}

.tenant-card--inactive .tenant-card__brand {
    background: var(--muted);
}

.tenant-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 1.25rem;
    background: var(--primary);
    border-bottom: none;
}

.tenant-card__logo {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

.tenant-card__logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--card);
    border: 1px dashed var(--border);
    color: var(--primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.tenant-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.125rem 1.125rem;
    flex: 1;
}

.tenant-card__name {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.tenant-card__email {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--muted);
    word-break: break-word;
}

.tenant-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.tenant-card__meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.tenant-card__label {
    color: var(--muted);
}

.tenant-card__actions {
    margin-top: auto;
    padding-top: 0.25rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    white-space: nowrap;
}

.sidebar-nav-impersonation {
    color: #2563eb !important;
    font-weight: 600;
}

[data-theme="dark"] .sidebar-nav-impersonation {
    color: #93c5fd !important;
}

/* Mensalidades (Gestor SaaS) */
.mensalidades-page {
    max-width: 1200px;
}

.mensalidades-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.mensalidades-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.mensalidades-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mensalidades-toggle-track {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s;
}

.mensalidades-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.mensalidades-toggle input:checked + .mensalidades-toggle-track {
    background: #b8860b;
}

.mensalidades-toggle input:checked + .mensalidades-toggle-track::after {
    transform: translateX(20px);
}

.mensalidades-card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.mensalidades-card-header p {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 400;
}

.mensalidades-table th {
    background: var(--primary);
    color: #fff;
    border-bottom-color: var(--primary-dark);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
}

.mensalidades-company strong,
.mensalidades-plan strong {
    display: block;
    font-size: 0.9375rem;
}

.mensalidades-company span,
.mensalidades-plan span {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.125rem;
}

.mensalidades-due {
    font-size: 0.875rem;
    white-space: nowrap;
}

.badge-billing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 4.75rem;
}

.mensalidades-table th:nth-child(4),
.mensalidades-table td:nth-child(4) {
    white-space: nowrap;
    min-width: 7rem;
}

.badge-billing-ok {
    background: #fef9e7;
    color: #92680b;
}

.badge-billing-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.badge-billing-due_soon {
    background: #fef3c7;
    color: #92400e;
}

.badge-billing-cancelled {
    background: #f1f5f9;
    color: #64748b;
}

.badge-billing-unknown {
    background: #e2e8f0;
    color: #475569;
}

.mensalidades-pay-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 320px;
}

.mensalidades-pay-form .btn {
    flex-shrink: 0;
    align-self: center;
}

.mensalidades-pay-form .form-control {
    width: auto;
    min-width: 0;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
}

.mensalidades-amount {
    width: 72px !important;
}

.mensalidades-pay-form select.form-control {
    width: 88px;
}

.mensalidades-empty,
.report-empty {
    color: var(--muted);
    font-size: 0.875rem;
    padding: 1rem 0;
}

/* Relatórios — toolbar, cabeçalho e impressão */
.report-page {
    max-width: 1100px;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.report-card {
    border: 1px solid var(--border);
}

.report-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--primary);
}

.report-header-logo {
    max-height: 64px;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
}

.report-header-company {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.report-header-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.report-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.report-table th {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: none;
}

.report-table th,
.report-table td {
    padding: 0.75rem 1rem;
}

.report-table tbody tr:nth-child(even) td {
    background: rgb(37 99 235 / 0.04);
}

[data-theme="dark"] .report-table tbody tr:nth-child(even) td {
    background: rgb(59 130 246 / 0.08);
}

@media print {
    body.tenant-app {
        background: #fff;
        color: #000;
    }

    .sidebar,
    .sidebar-backdrop,
    .topbar,
    .menu-toggle,
    .sidebar-collapse-toggle,
    .theme-toggle,
    .topbar-user,
    .no-print,
    .subscription-banner,
    .alert,
    .rb-app-shell::before {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .rb-app-shell {
        min-height: auto;
    }

    .report-page {
        max-width: none;
    }

    .report-card {
        border: none;
        box-shadow: none;
    }

    .report-card .card-body {
        padding: 0;
    }

    .report-header {
        border-bottom-color: #2563eb;
        page-break-inside: avoid;
    }

    .report-table th {
        background: #2563eb !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-status-badge {
        border: 1px solid #ccc;
        background: transparent !important;
        color: #000 !important;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
    }
}

/* Configurações — abas e planos */
.settings-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.settings-tab {
    display: inline-block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-tab:hover {
    color: var(--text);
    text-decoration: none;
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.settings-tab--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-current-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.billing-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.billing-summary-label {
    font-size: 0.8125rem;
    color: var(--muted);
}

.billing-pay-form {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.billing-pay-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.billing-pay-fields .form-group {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.payables-page .payables-stats {
    margin-bottom: 1rem;
}

.payables-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.payables-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.payable-note {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.payable-action-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.payable-action-form .form-control {
    width: auto;
    min-width: 110px;
}

.payable-cancel-form {
    display: inline;
}

.payable-paid-info {
    color: var(--muted);
    font-size: 0.8125rem;
}

.finance-page .finance-stats {
    margin-bottom: 1rem;
}

.finance-stat-card {
    position: relative;
}

.finance-stat-card small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.finance-stat-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
}

.finance-stat-link:hover {
    text-decoration: underline;
}

.finance-page .stat-card--brand {
    border-left: 3px solid #4338ca;
}

.finance-page .stat-card--danger {
    border-left: 3px solid #dc2626;
}

.finance-page .stat-card--gold {
    border-left: 3px solid #b45309;
}

.finance-page .stat-card--success {
    border-left: 3px solid #16a34a;
}

.finance-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.finance-month-item {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--table-head);
}

.finance-month-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.finance-month-value {
    font-size: 1.125rem;
}

.finance-month-value--success { color: #16a34a; }
.finance-month-value--danger { color: #dc2626; }

.balance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.balance-date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.balance-date-form label {
    font-size: 0.8125rem;
    color: var(--muted);
}

.balance-date-form .form-control {
    width: auto;
}

.balance-ref {
    margin-bottom: 1rem;
    color: var(--muted);
}

.balance-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.balance-breakdown-col h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.balance-breakdown-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.balance-breakdown-col li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.session-idle-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.session-idle-modal[hidden] {
    display: none !important;
}

.session-idle-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 0.55);
}

.session-idle-modal__card {
    position: relative;
    width: min(100%, 420px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgb(15 23 42 / 0.2);
}

.session-idle-modal__card h2 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.session-idle-modal__card p {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.session-idle-modal__countdown {
    margin-top: 0.75rem;
    color: var(--text) !important;
}

.session-idle-modal__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.stock-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.stock-page .stock-stats {
    margin-bottom: 1rem;
}

.stock-page .stat-card--gold {
    border-left: 3px solid #b45309;
}

.stock-page .stat-card--primary {
    border-left: 3px solid var(--primary);
}

.stock-page .stat-card--info {
    border-left: 3px solid #0891b2;
}

.stock-page .stat-card--success {
    border-left: 3px solid #16a34a;
}

.stock-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.stock-layout-main,
.stock-layout-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stock-ranking {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stock-rank-item {
    font-size: 0.875rem;
}

.stock-rank-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.stock-rank-pos {
    font-weight: 700;
    color: var(--primary);
    min-width: 1.5rem;
}

.stock-rank-name {
    flex: 1;
    font-weight: 600;
}

.stock-rank-qty {
    color: var(--muted);
    font-size: 0.75rem;
}

.stock-rank-bar {
    height: 6px;
    background: var(--table-head);
    border-radius: 999px;
    overflow: hidden;
}

.stock-rank-bar span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}

.stock-rank-val {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.stock-low-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stock-low-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.stock-low-list li:last-child {
    border-bottom: none;
}

.stock-recent-sales,
.stock-movements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stock-sale-item,
.stock-movement-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--table-head);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
}

.stock-sale-item small,
.stock-movement-item small {
    display: block;
    color: var(--muted);
    margin-top: 0.1rem;
}

.stock-sale-item__end {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stock-sale-item__end a {
    color: var(--primary);
    font-size: 0.75rem;
    text-decoration: none;
}

.stock-movement-date {
    color: var(--muted);
    white-space: nowrap;
}

@media (max-width: 960px) {
    .stock-layout {
        grid-template-columns: 1fr;
    }
}

.plan-payment-notice {
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.plan-payment-notice code {
    font-size: 0.75rem;
}

.plan-current-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.plan-current-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.plan-price span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
}

.plan-desc {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
    max-width: 520px;
}

.plan-expiry {
    text-align: right;
    font-size: 0.8125rem;
    color: var(--muted);
}

.plan-expiry strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
    margin-top: 0.125rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.plan-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.plan-card-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgb(37 99 235 / 0.15);
}

.plan-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: rgb(37 99 235 / 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.plan-badge-upgrade {
    color: #1d4ed8;
    background: rgb(37 99 235 / 0.12);
}

.plan-badge-downgrade {
    color: #b45309;
    background: rgb(217 119 6 / 0.12);
}

.plan-scheduled-notice {
    margin-bottom: 1rem;
}

.plan-card h4 {
    font-size: 1.0625rem;
    padding-right: 4rem;
}

.plan-card-price {
    font-size: 1.375rem;
    font-weight: 700;
}

.plan-card-price span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
}

.plan-card-desc {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}

.plan-features {
    list-style: none;
    margin: 0.5rem 0 0.75rem;
    padding: 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

.plan-features li {
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.plan-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.plan-card form {
    margin-top: auto;
}

.plan-pay-hint {
    margin-top: 0.375rem;
    text-align: center;
}

.role-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.role-profile-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-profile-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 100%;
}

.role-profile-option input:checked + .role-profile-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.role-profile-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.role-profile-card p {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    line-height: 1.45;
}

.role-profile-card ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.role-profile-card li {
    margin-bottom: 0.15rem;
}

.role-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge--tenant_admin { background: #dbeafe; color: #1d4ed8; }
.role-badge--tenant_user { background: #e0e7ff; color: #4338ca; }
.role-badge--cashier { background: #fef3c7; color: #b45309; }
.role-badge--branch_manager { background: #dcfce7; color: #15803d; }

.topbar-role {
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--table-head);
}

.plan-current-card {
    margin-bottom: 1rem;
}

/* Assinatura / trial */
.subscription-body {
    background: var(--bg);
}

.subscription-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 640px;
    width: 100%;
    margin: 0 auto 1.5rem;
    font-size: 0.875rem;
}

.subscription-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-header a {
    color: var(--muted);
}

/* Tema escuro — empresa e gestor SaaS */
[data-theme="dark"] .tenant-app,
[data-theme="dark"] .admin-app {
    color-scheme: dark;
}

[data-theme="dark"] .tenant-app .btn-outline,
[data-theme="dark"] .admin-app .btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}

[data-theme="dark"] .tenant-app .btn-outline:hover,
[data-theme="dark"] .admin-app .btn-outline:hover {
    background: var(--sidebar-hover);
    border-color: var(--muted);
}

[data-theme="dark"] .tenant-app .form-control,
[data-theme="dark"] .admin-app .form-control {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .tenant-app .form-control:focus,
[data-theme="dark"] .admin-app .form-control:focus {
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.2);
}

[data-theme="dark"] .tenant-app .image-preview,
[data-theme="dark"] .admin-app .image-preview {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .tenant-app .settings-tab,
[data-theme="dark"] .admin-app .settings-tab {
    color: var(--muted);
}

[data-theme="dark"] .tenant-app .settings-tab.active,
[data-theme="dark"] .admin-app .settings-tab.active {
    color: var(--primary);
}

[data-theme="dark"] .tenant-app .theme-option input:checked + .theme-option-card,
[data-theme="dark"] .admin-app .theme-option input:checked + .theme-option-card {
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.25);
}

[data-theme="dark"] .tenant-app .topbar h1,
[data-theme="dark"] .admin-app .topbar h1 {
    color: var(--text);
}

[data-theme="dark"] .tenant-app .product-thumb {
    border-color: var(--border);
}

[data-theme="dark"] .tenant-app .product-thumb-placeholder {
    border-color: var(--border);
    background: var(--bg);
}

.subscription-card {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.subscription-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subscription-icon-warning {
    background: #fef3c7;
    color: #92400e;
}

.subscription-icon-danger {
    background: #fee2e2;
    color: #991b1b;
}

.subscription-card h1 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

.subscription-lead {
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.subscription-note {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.subscription-actions {
    margin-bottom: 1.5rem;
}

.subscription-plans-preview {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.plan-card-compact {
    padding: 1rem;
}

.subscription-banner {
    margin-bottom: 1rem;
}

.subscription-banner a {
    font-weight: 600;
    margin-left: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .cart-item-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-side {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .menu-toggle { display: inline-flex; }
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .pos-cart {
        order: -1;
        position: sticky;
        top: 3.75rem;
        z-index: 20;
        max-height: min(46vh, 400px);
        box-shadow: 0 8px 28px rgb(0 0 0 / 0.12);
    }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .topbar-user { display: none; }
    .card-body { padding: 1rem; }
    th, td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
    .btn {
        min-height: 44px;
    }
    .btn-sm {
        min-height: 40px;
    }
    .form-grid-2,
    .brand-upload-grid,
    .theme-options,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .mensalidades-pay-form {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }
    .mensalidades-pay-form .form-control,
    .mensalidades-amount,
    .mensalidades-pay-form select.form-control {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem; }
    .brand-upload-grid,
    .theme-options,
    .form-grid-2,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .image-preview-logo,
    .image-preview-banner {
        min-height: 88px;
    }

    .mensalidades-pay-form {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }

    .mensalidades-pay-form .form-control,
    .mensalidades-amount,
    .mensalidades-pay-form select.form-control {
        width: 100% !important;
    }

    .mensalidades-table th:nth-child(3),
    .mensalidades-table td:nth-child(3) {
        min-width: 90px;
    }
}

/* ── Sprint 8: A11y, reduced motion, onboarding ── */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.tenant-app :focus {
    outline: none;
}

.tenant-app :focus-visible {
    outline: 3px solid rgb(37 99 235 / 0.55);
    outline-offset: 2px;
}

.tenant-app .btn:focus-visible,
.tenant-app .form-control:focus-visible,
.tenant-app a:focus-visible {
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.2);
}

.ui-icon {
    display: inline-block;
    width: 1.125rem;
    height: 1.125rem;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.ui-icon--menu {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
}

.ui-icon--moon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 14.5A8.5 8.5 0 1 1 9.5 3 6.5 6.5 0 0 0 21 14.5Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 14.5A8.5 8.5 0 1 1 9.5 3 6.5 6.5 0 0 0 21 14.5Z'/%3E%3C/svg%3E");
}

.ui-icon--sun {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
}

.pos-catalog-item__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: var(--bg-muted, #f1f5f9);
    color: var(--text-muted);
}

.pos-catalog-item__placeholder--product::before,
.pos-catalog-item__placeholder--service::before {
    content: '';
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.pos-catalog-item__placeholder--product::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8Z'/%3E%3C/svg%3E");
}

.pos-catalog-item__placeholder--service::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z'/%3E%3C/svg%3E");
}

.pos-catalog-item__favorite {
    width: 0.875rem;
    height: 0.875rem;
    background: #f59e0b;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2Z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

.onboarding-card {
    margin-bottom: 1.5rem;
}

.onboarding-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.onboarding-card__title {
    margin: 0;
    font-size: 1.125rem;
}

.onboarding-card__subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.onboarding-progress {
    height: 0.5rem;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.onboarding-progress__fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.onboarding-progress__label {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.onboarding-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.onboarding-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.onboarding-step__marker {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.onboarding-step--done .onboarding-step__marker {
    background: var(--success, #16a34a);
    border-color: var(--success, #16a34a);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    mask-size: 70%;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 70%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.onboarding-step__body p {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.onboarding-step__status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success, #16a34a);
}

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

    .toast--visible,
    .toast--leaving {
        transition: none !important;
    }

    .onboarding-progress__fill {
        transition: none;
    }
}
