/* Ramza Admin — design tokens aligned with ramza-admin-hub-main/src/styles.css */
:root {
    --radius: 0.75rem;
    --background: oklch(0.97 0.005 250);
    --foreground: oklch(0.18 0.02 260);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.18 0.02 260);
    --primary: oklch(0.58 0.22 27);
    --primary-foreground: oklch(0.99 0 0);
    --muted: oklch(0.96 0.008 250);
    --muted-foreground: oklch(0.5 0.02 260);
    --accent: oklch(0.72 0.19 145);
    --accent-foreground: oklch(0.2 0.06 145);
    --destructive: oklch(0.6 0.24 27);
    --destructive-foreground: oklch(0.99 0 0);
    --border: oklch(0.92 0.008 250);
    --input: oklch(0.92 0.008 250);
    --ring: oklch(0.62 0.18 145);
    --success: oklch(0.62 0.18 145);
    --warning: oklch(0.78 0.16 75);
    --warning-foreground: oklch(0.2 0.02 260);
    --info: oklch(0.6 0.18 245);
    --info-foreground: oklch(0.99 0 0);
    --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.06);
    --shadow-md: 0 4px 16px -4px oklch(0.2 0.02 260 / 0.08);
    --chart-1: oklch(0.62 0.18 145);
    --sidebar: oklch(0.99 0.002 250);
    --sidebar-foreground: oklch(0.22 0.02 260);
    --sidebar-primary: oklch(0.62 0.18 145);
    --sidebar-accent: oklch(0.95 0.02 145);
    --sidebar-accent-foreground: oklch(0.32 0.12 145);
    --sidebar-border: oklch(0.92 0.008 250);
    --sidebar-w: 15.5rem;
    --sidebar-collapsed: 4rem;
}

html.dark {
    --background: oklch(0.14 0.03 260);
    --foreground: oklch(0.96 0.01 260);
    --card: oklch(0.19 0.03 262);
    --card-foreground: oklch(0.96 0.01 260);
    --primary: oklch(0.66 0.2 27);
    --muted: oklch(0.24 0.03 260);
    --muted-foreground: oklch(0.74 0.04 260);
    --accent: oklch(0.58 0.16 145);
    --border: oklch(1 0 0 / 12%);
    --input: oklch(1 0 0 / 14%);
    --sidebar: oklch(0.16 0.025 265);
    --sidebar-foreground: oklch(0.94 0.02 260);
    --sidebar-accent: oklch(0.26 0.04 260);
    --sidebar-accent-foreground: oklch(0.96 0.01 260);
    --sidebar-border: oklch(1 0 0 / 12%);
}

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

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--foreground);
    background: var(--background);
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

/* ——— Shell ——— */
.ramza-shell {
    display: flex;
    min-height: 100vh;
}

@media (min-width: 901px) {
    .ramza-shell {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
}

.ramza-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
}

@media (min-width: 901px) {
    .ramza-sidebar {
        height: 100%;
        min-height: 0;
        max-height: 100vh;
        align-self: stretch;
        overflow: hidden;
    }

    /* Let profile flyout extend past the narrow rail when the menu is open */
    .ramza-sidebar:has(.ramza-profile-wrap.is-open) {
        overflow: visible;
        z-index: 200;
    }
}

.ramza-sidebar.collapsed, html.ramza-pref-sidebar-collapsed .ramza-sidebar {
    width: var(--sidebar-collapsed);
}

.ramza-sidebar-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.ramza-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.ramza-logo-mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.ramza-logo-text {
    min-width: 0;
}

.ramza-sidebar.collapsed .ramza-logo-text,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-logo-text,
.ramza-sidebar.collapsed .ramza-nav-label,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav-label,
.ramza-sidebar.collapsed .ramza-nav-group-title,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav-group-title {
    display: none;
}

.ramza-logo-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    font-size: 1.05rem;
    line-height: 1.2;
}

.ramza-logo-sub {
    font-size: 11px;
    color: var(--muted-foreground);
}

.ramza-sidebar-toggle {
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ramza-sidebar-toggle-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.ramza-sidebar-toggle:hover {
    background: var(--muted);
}

.ramza-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.ramza-nav-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    padding: 0.6rem 1rem 0.2rem;
}

.ramza-nav a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    margin: 0 0.35rem;
    border-radius: 10px;
    color: var(--sidebar-foreground);
    border-left: 3px solid transparent;
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.45) inset,
        0 -1px 0 oklch(0.2 0.02 260 / 0.04) inset,
        0 2px 4px oklch(0.2 0.02 260 / 0.04);
}

html.dark .ramza-nav a {
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.06) inset,
        0 -1px 0 oklch(0 0 0 / 0.35) inset,
        0 2px 6px oklch(0 0 0 / 0.25);
}

.ramza-nav a:hover:not(.active) {
    background: #e8f5e9;
    color: #1b5e20;
}

.ramza-nav a.active {
    background: #e8f5e9;
    color: #1b5e20;
    border-left-color: #2e7d32;
    font-weight: 600;
}

html.dark .ramza-nav a:hover:not(.active) {
    background: color-mix(in oklab, var(--accent) 16%, var(--sidebar));
    color: color-mix(in oklab, var(--accent) 72%, #fff);
}

html.dark .ramza-nav a.active {
    background: color-mix(in oklab, var(--accent) 22%, var(--sidebar));
    color: color-mix(in oklab, var(--accent) 78%, #fff);
    border-left-color: var(--accent);
}

/* Icon-only sidebar (matches narrow rail references) */
.ramza-sidebar.collapsed .ramza-sidebar-head,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-sidebar-head {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.35rem;
}

.ramza-sidebar.collapsed .ramza-logo,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-logo {
    justify-content: center;
}

.ramza-sidebar.collapsed .ramza-logo-mark,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-logo-mark {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

.ramza-sidebar.collapsed .ramza-nav,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav {
    padding: 0.2rem 0;
}

.ramza-sidebar.collapsed .ramza-nav a,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav a {
    justify-content: center;
    padding: 0.55rem 0.2rem;
    margin: 0.12rem 0.3rem;
    border-radius: 10px;
}

.ramza-sidebar.collapsed .ramza-nav a.active,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav a.active {
    border-left-width: 3px;
}

.ramza-sidebar.collapsed .ramza-nav-icon,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    opacity: 1;
}

.ramza-nav-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.ramza-profile-wrap {
    position: relative;
    margin-top: auto;
    border-top: 1px solid var(--sidebar-border);
    padding: 0.65rem 0.75rem 0.85rem;
}

.ramza-profile-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border: 0;
    border-radius: 12px;
    background: color-mix(in oklab, var(--accent) 14%, var(--sidebar));
    color: var(--sidebar-foreground);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.35) inset,
        0 -1px 0 oklch(0.2 0.02 260 / 0.06) inset,
        0 2px 6px oklch(0.2 0.02 260 / 0.06);
}

html.dark .ramza-profile-trigger {
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.08) inset,
        0 -1px 0 oklch(0 0 0 / 0.35) inset,
        0 2px 8px oklch(0 0 0 / 0.35);
}

.ramza-profile-trigger:hover {
    background: color-mix(in oklab, var(--accent) 22%, var(--sidebar));
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.45) inset,
        0 2px 8px oklch(0.2 0.02 260 / 0.08);
}

.ramza-profile-chevron {
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.55;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ramza-profile-wrap.is-open .ramza-profile-chevron {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
}

.ramza-profile-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0.65rem;
    right: 0.65rem;
    min-width: 11rem;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.ramza-profile-menu[hidden] {
    display: none !important;
}

.ramza-profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--foreground);
    cursor: pointer;
    text-align: left;
}

.ramza-profile-menu-item:hover {
    background: var(--muted);
}

.ramza-profile-menu-row {
    cursor: default;
    justify-content: space-between;
}

.ramza-profile-menu-row:hover {
    background: transparent;
}

.ramza-profile-menu-row-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ramza-profile-menu-danger {
    color: var(--destructive);
}

.ramza-profile-menu-danger:hover {
    background: color-mix(in oklab, var(--destructive) 10%, transparent);
}

.ramza-profile-menu-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0.25rem 0;
}

.ramza-switch {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 1.35rem;
    flex-shrink: 0;
    cursor: pointer;
}

.ramza-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ramza-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--border);
    transition: background 0.2s;
}

.ramza-switch-slider::before {
    content: '';
    position: absolute;
    width: 1.05rem;
    height: 1.05rem;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.ramza-switch input:checked + .ramza-switch-slider {
    background: var(--accent);
}

.ramza-switch input:checked + .ramza-switch-slider::before {
    transform: translate(1.1rem, -50%);
}

.ramza-profile-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

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

.ramza-profile-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ramza-profile-phone {
    font-size: 12px;
    color: var(--muted-foreground);
}

.ramza-btn-ghost {
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 12px;
    padding: 0.25rem 0.35rem;
    border-radius: 6px;
}

.ramza-btn-ghost:hover {
    color: var(--foreground);
    background: var(--muted);
}

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

@media (min-width: 901px) {
    .ramza-main {
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

.ramza-page {
    padding: 1.5rem 1.75rem 2.5rem;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    container-type: inline-size;
    container-name: ramza-page;
}

/* Data pages: header/search stay put; only the table card scrolls */
@media (min-width: 901px) {
    .ramza-page:has(.ramza-table-card) {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .ramza-page:has(.ramza-table-card) > *:not(.ramza-table-card) {
        flex-shrink: 0;
    }

    .ramza-page:has(.ramza-table-card) > .ramza-table-card {
        flex: 1 1 auto;
        min-height: 0;
    }
}

@media (max-width: 900px) {
    .ramza-page:has(.ramza-table-card) > .ramza-table-card {
        max-height: min(28rem, 72vh);
    }
}

@media (max-width: 900px) {
    .ramza-shell {
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
        min-height: 100vh;
    }

    .ramza-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--sidebar-border);
    }

    .ramza-sidebar.collapsed, html.ramza-pref-sidebar-collapsed .ramza-sidebar {
        width: 100%;
    }

    .ramza-main {
        overflow: visible;
    }
}

/* ——— Page header (matches React PageHeader + red button) ——— */
.ramza-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ramza-page-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--foreground);
}

.ramza-page-header p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 14px;
    max-width: 42rem;
}

.ramza-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    background: var(--primary);
    color: var(--primary-foreground);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.ramza-btn-primary:hover {
    filter: brightness(1.05);
}

.ramza-btn-primary.ramza-btn-primary-pill {
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.25) inset,
        0 2px 8px oklch(0.35 0.15 27 / 0.25);
}

.ramza-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ramza-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
}

.ramza-btn-destructive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    background: var(--destructive);
    color: var(--destructive-foreground);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.ramza-btn-destructive:hover {
    filter: brightness(1.05);
}

.ramza-btn-destructive:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Modal footers: pill-shaped actions (Cancel + Save match) */
.ramza-modal-footer .ramza-btn-outline,
.ramza-modal-footer .ramza-btn-destructive,
.ramza-modal-footer .ramza-btn-primary {
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
}

/* ——— Search ——— */
.ramza-search-wrap {
    position: relative;
    max-width: 24rem;
    margin-bottom: 1.25rem;
}

.ramza-search-wrap.ramza-search-wrap--full {
    max-width: none;
}

.ramza-search-wrap svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.ramza-input {
    width: 100%;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    background: var(--card);
    color: var(--foreground);
}

.ramza-input.has-icon {
    padding-left: 2.25rem;
}

.ramza-input.ramza-input--pill {
    border-radius: 999px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.ramza-input.ramza-input--pill.has-icon {
    padding-left: 2.5rem;
}

.ramza-input:focus {
    outline: 2px solid color-mix(in oklab, var(--ring) 45%, transparent);
    outline-offset: 0;
}

/* ——— Table card ——— */
.ramza-table-card {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.55) inset,
        0 -1px 0 oklch(0.2 0.02 260 / 0.05) inset,
        0 2px 6px oklch(0.2 0.02 260 / 0.06),
        0 12px 28px -10px oklch(0.2 0.02 260 / 0.1);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

html.dark .ramza-table-card {
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.06) inset,
        0 4px 14px oklch(0 0 0 / 0.35);
}

table.ramza-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    table-layout: auto;
}

.ramza-table th,
.ramza-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.ramza-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    background: color-mix(in oklab, var(--muted) 38%, var(--card));
    white-space: nowrap;
}

.ramza-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--border);
}

.ramza-table th.ramza-table__actions,
.ramza-table td.ramza-table__actions {
    text-align: center;
    width: 1%;
}

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

/* Neon pulse loader (tables & panels while fetching) */
.ramza-table-loading-row td {
    padding: 2.5rem 1rem !important;
    text-align: center;
    vertical-align: middle;
    border-bottom: none;
}

.ramza-panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 10rem;
    padding: 2rem 1rem;
}

.ramza-neon-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
}

.ramza-neon-loader__block {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 4px;
    background: color-mix(in oklab, var(--accent) 88%, oklch(0.72 0.14 195));
    animation: ramza-neon-pulse 1s infinite ease-in-out;
    box-shadow:
        0 0 8px color-mix(in oklab, var(--accent) 45%, transparent),
        0 0 14px color-mix(in oklab, var(--accent) 25%, transparent);
}

.ramza-neon-loader__block:nth-child(2) {
    animation-delay: 0.15s;
}

.ramza-neon-loader__block:nth-child(3) {
    animation-delay: 0.3s;
}

.ramza-neon-loader__block:nth-child(4) {
    animation-delay: 0.45s;
}

.ramza-neon-loader__text {
    margin-top: 0.9rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in oklab, var(--accent) 75%, var(--foreground));
}

@keyframes ramza-neon-pulse {
    0%,
    100% {
        transform: scale(0.82);
        opacity: 0.45;
        box-shadow: 0 0 4px color-mix(in oklab, var(--accent) 35%, transparent);
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow:
            0 0 10px color-mix(in oklab, var(--accent) 55%, transparent),
            0 0 18px color-mix(in oklab, var(--accent) 30%, transparent);
    }
}

html.dark .ramza-neon-loader__block {
    background: oklch(0.78 0.14 195);
    box-shadow:
        0 0 10px oklch(0.72 0.16 195 / 0.65),
        0 0 20px oklch(0.72 0.16 195 / 0.35);
}

html.dark .ramza-neon-loader__text {
    color: oklch(0.82 0.12 195);
}

.ramza-cell-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: color-mix(in oklab, var(--accent) 18%, transparent);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    margin-right: 0.5rem;
}

.ramza-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    object-fit: cover;
    background: var(--muted);
}

/* ——— Status badges ——— */
.ramza-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.ramza-badge-success {
    background: color-mix(in oklab, var(--success) 22%, transparent);
    color: color-mix(in oklab, var(--success) 55%, var(--foreground));
}

.ramza-badge-muted {
    background: var(--muted);
    color: var(--muted-foreground);
}

.ramza-badge-warning {
    background: color-mix(in oklab, var(--warning) 35%, transparent);
    color: var(--warning-foreground);
}

.ramza-badge-danger {
    background: color-mix(in oklab, var(--destructive) 22%, transparent);
    color: var(--destructive);
}

.ramza-badge-info {
    background: color-mix(in oklab, var(--info) 22%, transparent);
    color: var(--info);
}

.ramza-badge-teal {
    background: color-mix(in oklab, oklch(0.65 0.12 195) 22%, transparent);
    color: oklch(0.42 0.1 195);
}

/* ——— Row actions (circular icon buttons — matches React admin) ——— */
.ramza-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

.ramza-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.ramza-icon-btn-svg {
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

.ramza-icon-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.ramza-icon-btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.ramza-icon-btn.view {
    background: color-mix(in oklab, oklch(0.62 0.16 245) 18%, var(--card));
    color: oklch(0.45 0.14 245);
    border-color: color-mix(in oklab, oklch(0.62 0.16 245) 22%, var(--border));
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.5) inset,
        0 2px 5px oklch(0.2 0.02 260 / 0.06);
}

.ramza-icon-btn.edit {
    background: color-mix(in oklab, oklch(0.88 0.12 85) 55%, var(--card));
    color: oklch(0.35 0.08 75);
    border-color: color-mix(in oklab, oklch(0.78 0.14 85) 35%, var(--border));
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.55) inset,
        0 2px 5px oklch(0.2 0.02 260 / 0.06);
}

.ramza-icon-btn.del {
    background: color-mix(in oklab, var(--destructive) 14%, var(--card));
    color: var(--destructive);
    border-color: color-mix(in oklab, var(--destructive) 22%, var(--border));
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.45) inset,
        0 2px 5px oklch(0.35 0.15 27 / 0.08);
}

html.dark .ramza-icon-btn.view {
    color: oklch(0.78 0.1 245);
    background: color-mix(in oklab, oklch(0.62 0.16 245) 22%, var(--card));
}

html.dark .ramza-icon-btn.edit {
    color: oklch(0.88 0.1 85);
    background: color-mix(in oklab, oklch(0.55 0.1 85) 18%, var(--card));
}

html.dark .ramza-icon-btn.del {
    background: color-mix(in oklab, var(--destructive) 18%, var(--card));
}

/* ——— Modal ——— */
.ramza-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ramza-modal-layer-nested {
    z-index: 250;
}

.ramza-modal-location {
    max-width: 32rem;
}

.ramza-modal-header--closable h2 {
    margin-bottom: 0;
}

.ramza-modal-floating-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: none !important;
    align-items: center;
    justify-content: center;
}

.ramza-modal-floating-close:hover {
    background: color-mix(in oklab, var(--muted) 45%, transparent);
    color: var(--foreground);
}

.ramza-label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.ramza-field-icon {
    width: 1rem;
    height: 1rem;
    color: var(--accent);
    flex-shrink: 0;
}

.ramza-location-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.ramza-input-grow {
    flex: 1;
    min-width: 0;
}

.ramza-location-pin-btn {
    flex-shrink: 0;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 10%, transparent);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.ramza-location-pin-btn:hover {
    background: color-mix(in oklab, var(--accent) 18%, transparent);
}

.ramza-location-pin-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ramza-cnic-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.ramza-cnic-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 10rem;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: color-mix(in oklab, var(--muted) 28%, transparent);
    text-align: center;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s;
}

.ramza-cnic-dropzone:hover {
    border-color: var(--accent);
    background: color-mix(in oklab, var(--accent) 7%, transparent);
}

.ramza-cnic-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.ramza-cnic-preview {
    max-height: 6.5rem;
    border-radius: 8px;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.ramza-cnic-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.ramza-cnic-camera {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
}

.ramza-cat-type-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.35rem;
    background: color-mix(in oklab, var(--muted) 40%, transparent);
}

.ramza-cat-type-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}

.ramza-cat-type-row:hover {
    background: color-mix(in oklab, var(--muted) 55%, transparent);
}

.ramza-cat-type-row input {
    accent-color: var(--destructive);
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
}

.ramza-switch-row--tight {
    margin-top: 0.25rem;
}

.ramza-place-search-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 15px;
    background: var(--card);
    color: var(--foreground);
}

.ramza-place-search-input:focus {
    outline: 2px solid color-mix(in oklab, var(--accent) 55%, transparent);
    outline-offset: 0;
    border-color: var(--accent);
}

.ramza-place-map-wrap {
    margin-top: 0.65rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.ramza-place-map-frame {
    width: 100%;
    height: 14rem;
    border: 0;
    display: block;
}

.ramza-place-results {
    margin-top: 0.65rem;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.ramza-place-row {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-size: 13px;
    color: var(--foreground);
    cursor: pointer;
}

.ramza-place-row:last-child {
    border-bottom: 0;
}

.ramza-place-row:hover {
    background: color-mix(in oklab, var(--muted) 35%, transparent);
}

.ramza-place-hint {
    padding: 0.85rem 1rem;
    font-size: 13px;
    color: var(--muted-foreground);
    margin: 0;
}

.ramza-modal-dealer .ramza-switch input:checked + .ramza-switch-slider,
.ramza-modal-technician .ramza-switch input:checked + .ramza-switch-slider {
    background: var(--destructive);
}

.ramza-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: oklch(0.2 0.02 260 / 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.ramza-modal {
    width: 100%;
    max-width: 48rem;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--card);
    color: var(--card-foreground);
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.ramza-modal-wide {
    max-width: 56rem;
}

.ramza-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.ramza-modal-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ramza-modal-title-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
}

.ramza-form-callout {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 38%, transparent);
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.ramza-form-callout-title {
    margin: 0 0 0.25rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--foreground);
}

.ramza-form-callout ul {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
}

.ramza-modal-header p {
    margin: 0;
    font-size: 13px;
    color: var(--muted-foreground);
}

.ramza-modal-body {
    padding: 1.25rem 1.5rem;
}

.ramza-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ramza-form-section {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.ramza-form-section h3 {
    margin: 0 0 1rem;
    padding-left: 0.65rem;
    border-left: 4px solid var(--accent);
    font-size: 1rem;
    font-weight: 600;
}

.ramza-form-grid {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .ramza-form-grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.ramza-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.ramza-field input[type='text'],
.ramza-field input[type='number'],
.ramza-field input[type='password'],
.ramza-field input[type='tel'],
.ramza-field select,
.ramza-field textarea {
    width: 100%;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.65rem;
    font-size: 14px;
    background: var(--background);
    color: var(--foreground);
}

.ramza-field textarea {
    min-height: 5rem;
    resize: vertical;
}

.ramza-field input:disabled,
.ramza-field select:disabled,
.ramza-field textarea:disabled {
    opacity: 0.65;
}

.ramza-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

.ramza-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.ramza-switch-row > span {
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    line-height: 1.2;
}

.ramza-form-section--compact {
    padding: 0.85rem 1rem;
    margin-bottom: 0;
}

.ramza-form-section--compact:last-child {
    margin-bottom: 0;
}

.ramza-hex-inline-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 2.25rem;
}

.ramza-hex-swatch-btn {
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    line-height: 0;
}

.ramza-hex-swatch-btn:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--ring) 55%, transparent);
    outline-offset: 2px;
}

.ramza-hex-swatch {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    border: 1px solid color-mix(in oklab, var(--foreground) 14%, var(--border));
    box-shadow:
        inset 0 0 0 1px oklch(1 0 0 / 0.22),
        0 1px 2px oklch(0.2 0.02 260 / 0.08);
}

.ramza-field .ramza-hex-inline-row input[type='text'] {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
}

.ramza-error-text {
    color: var(--destructive);
    font-size: 13px;
    margin: 0 0 0.75rem;
}

.ramza-req {
    color: var(--destructive);
    font-weight: 600;
}

.ramza-form-callout--info {
    border-color: color-mix(in oklab, var(--info) 40%, var(--border));
    background: color-mix(in oklab, var(--info) 10%, var(--card));
}

.ramza-field-label-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
}

.ramza-field-label-row label {
    margin-bottom: 0;
}

.ramza-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--info) 22%, transparent);
    color: var(--info);
    flex-shrink: 0;
}

.ramza-info-icon svg {
    width: 0.65rem;
    height: 0.65rem;
}

.ramza-modal-vehicle .ramza-switch input:checked + .ramza-switch-slider,
.ramza-modal-part .ramza-switch input:checked + .ramza-switch-slider,
.ramza-modal-color .ramza-switch input:checked + .ramza-switch-slider,
.ramza-modal-city .ramza-switch input:checked + .ramza-switch-slider,
.ramza-modal-category .ramza-switch input:checked + .ramza-switch-slider {
    background: var(--destructive);
}

.ramza-product-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 8.5rem;
    padding: 1.1rem 1rem;
    border: 2px dashed color-mix(in oklab, var(--accent) 55%, var(--border));
    border-radius: 12px;
    background: color-mix(in oklab, var(--accent) 6%, var(--card));
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
}

.ramza-product-dropzone:hover {
    border-color: var(--accent);
    background: color-mix(in oklab, var(--accent) 11%, var(--card));
}

.ramza-product-dropzone-inner {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
}

.ramza-product-dropzone-inner strong {
    font-size: 15px;
    font-weight: 600;
}

.ramza-product-dropzone-inner span {
    font-size: 12px;
    opacity: 0.9;
}

.ramza-product-dropzone .ramza-cnic-dropzone-input {
    z-index: 2;
}

.ramza-product-image-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
    align-items: flex-start;
}

.ramza-product-thumb-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.ramza-product-thumb-wrap .ramza-thumb {
    display: block;
}

.ramza-product-thumb-remove {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--destructive);
    color: var(--destructive-foreground);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.ramza-product-thumb-remove:hover {
    filter: brightness(1.08);
}

.ramza-product-image-strip .ramza-thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.ramza-product-image-empty {
    margin-top: 0.65rem;
    padding: 1.5rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--muted-foreground);
    background: color-mix(in oklab, var(--muted) 35%, transparent);
}

.ramza-product-image-empty svg {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.35rem;
    opacity: 0.45;
}

.ramza-modal-header--product-view {
    display: grid;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.ramza-modal-header--product-view h2 {
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    justify-self: center;
}

.ramza-product-view-back {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ramza-product-view-back:hover {
    background: color-mix(in oklab, var(--accent) 12%, transparent);
}

.ramza-modal-header--product-view .ramza-modal-floating-close {
    position: static;
    justify-self: end;
}

.ramza-product-view {
    padding: 0 0 0.5rem;
}

.ramza-product-view-hero {
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.1rem;
}

.ramza-product-view-stock-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(
        180deg,
        color-mix(in oklab, var(--muted) 55%, var(--card)) 0%,
        color-mix(in oklab, var(--muted) 28%, var(--card)) 100%
    );
    border-bottom: 1px solid var(--border);
}

.ramza-product-stock-badge {
    position: static;
    font-size: 12px;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    box-shadow: 0 1px 2px oklch(0.2 0.02 260 / 0.08);
}

.ramza-product-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 13rem;
    max-height: min(52vh, 22rem);
    padding: 0.85rem 0.75rem 1rem;
    background: linear-gradient(
        180deg,
        color-mix(in oklab, var(--muted) 22%, var(--card)),
        color-mix(in oklab, var(--muted) 42%, var(--card))
    );
}

.ramza-product-gallery-stage {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 11rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel: arrows sit outside the image (flex siblings) */
.ramza-product-gallery-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
}

.ramza-product-gallery-carousel .ramza-product-gallery-media {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 6rem);
    display: block;
    line-height: 0;
    text-align: center;
}

.ramza-product-gallery-media img {
    max-width: 100%;
    max-height: min(48vh, 20rem);
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    border-radius: 0.65rem;
    box-shadow: 0 2px 12px oklch(0.2 0.02 260 / 0.1);
}

.ramza-product-gallery-media img.hidden {
    display: none;
}

.ramza-product-gallery-carousel .ramza-product-gallery-nav {
    position: relative;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    top: auto;
    transform: none;
    z-index: 2;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--card) 96%, transparent);
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.ramza-product-gallery-carousel .ramza-product-gallery-nav:hover {
    background: var(--card);
}

.ramza-product-gallery-carousel .ramza-product-gallery-nav[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.ramza-product-view-brand {
    margin: 0 0 0.15rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ramza-product-view-name {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ramza-product-view-price {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
}

.ramza-product-view-short {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--border));
    background: linear-gradient(
        135deg,
        color-mix(in oklab, var(--accent) 9%, var(--card)),
        color-mix(in oklab, var(--muted) 25%, var(--card))
    );
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--foreground);
    letter-spacing: -0.01em;
}

.ramza-product-view-desc {
    margin: 0 0 1rem;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.ramza-product-view-desc--body {
    color: var(--muted-foreground);
    font-weight: 400;
    padding: 0.35rem 0;
    border-left: 3px solid color-mix(in oklab, var(--border) 70%, var(--accent));
    padding-left: 0.75rem;
}

.ramza-color-dropdown-panel-hint {
    margin: 0 0 0.5rem;
    padding: 0 0.15rem 0.35rem;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
}

.ramza-color-dropdown {
    position: relative;
    z-index: 25;
}

.ramza-color-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: var(--background);
    color: var(--foreground);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.ramza-color-dropdown-trigger:hover {
    border-color: color-mix(in oklab, var(--accent) 45%, var(--input));
}

.ramza-color-dropdown-trigger[aria-expanded='true'] {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}

.ramza-color-dropdown-chevron {
    flex-shrink: 0;
    color: var(--muted-foreground);
    transition: transform 0.2s;
}

.ramza-color-dropdown-trigger[aria-expanded='true'] .ramza-color-dropdown-chevron {
    transform: rotate(180deg);
}

.ramza-color-dropdown-panel {
    position: absolute;
    z-index: 200;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: min(22rem, 70vh);
    overflow-y: auto;
    padding: 0.55rem 0.6rem 0.65rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid color-mix(in oklab, var(--accent) 22%, var(--border));
    background: var(--card);
    box-shadow: var(--shadow-md);
}

.ramza-color-dropdown-grid {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding-top: 0.15rem;
}

.ramza-color-dropdown-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--foreground);
    border: 1px solid transparent;
    transition:
        background 0.12s,
        border-color 0.12s;
}

.ramza-color-dropdown-item:hover {
    background: color-mix(in oklab, var(--muted) 40%, transparent);
}

.ramza-color-dropdown-item input:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--ring) 55%, transparent);
    outline-offset: 2px;
}

.ramza-color-dropdown-item input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
    justify-self: start;
    align-self: center;
}

.ramza-color-swatch {
    flex: none;
    justify-self: center;
    align-self: center;
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
    min-height: 1.35rem;
    border-radius: 999px;
    border: 2px solid color-mix(in oklab, var(--foreground) 18%, transparent);
    box-shadow:
        inset 0 0 0 1px oklch(1 0 0 / 0.35),
        0 1px 2px oklch(0.2 0.02 260 / 0.12);
}

.ramza-color-dropdown-item-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: center;
}

.ramza-detail-card {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ramza-detail-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.ramza-detail-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ramza-detail-card-icon--purple {
    background: color-mix(in oklab, oklch(0.72 0.14 290) 18%, var(--card));
    color: oklch(0.55 0.18 290);
}

.ramza-detail-card-icon--blue {
    background: color-mix(in oklab, var(--info) 14%, var(--card));
    color: var(--info);
}

.ramza-detail-card-icon--violet {
    background: color-mix(in oklab, oklch(0.65 0.16 290) 16%, var(--card));
    color: oklch(0.5 0.2 290);
}

.ramza-detail-rows {
    padding: 0.15rem 0;
}

.ramza-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.85rem;
    font-size: 13px;
    border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
}

.ramza-detail-row:last-child {
    border-bottom: 0;
}

.ramza-detail-row span:first-child {
    color: var(--muted-foreground);
}

.ramza-detail-row strong {
    font-weight: 700;
    color: var(--foreground);
    text-align: right;
}

.ramza-detail-color-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    max-width: 60%;
}

.ramza-detail-color-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    background: var(--background);
}

.ramza-detail-color-pill i {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    border: 1px solid color-mix(in oklab, var(--foreground) 15%, transparent);
}

.ramza-modal-footer--product-view {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.ramza-btn-success {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: calc(var(--radius) + 2px);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    background: var(--success);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.ramza-btn-success:hover {
    filter: brightness(1.06);
}

.ramza-btn-icon-danger {
    width: 3.1rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--radius) + 2px);
    border: 0;
    background: var(--destructive);
    color: var(--destructive-foreground);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.ramza-btn-icon-danger:hover {
    filter: brightness(1.05);
}

.ramza-bogo-offer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in oklab, var(--muted) 28%, var(--card));
}

.ramza-bogo-offer-box strong {
    display: block;
    font-size: 14px;
}

.ramza-bogo-offer-box span {
    font-size: 12px;
    color: var(--muted-foreground);
    font-weight: 400;
}

/* ——— Dashboard ——— */
.ramza-stat-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
    /* Tracks shrink with the main column (sidebar open/closed); never force 4×220px */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}

/* Prefer exactly four columns only when the *content* area is wide enough (not viewport) */
@container ramza-page (min-width: 50rem) {
    .ramza-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@container ramza-page (min-width: 26rem) and (max-width: 49.99rem) {
    .ramza-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ramza-stat-card {
    border-radius: 1rem;
    padding: 1.15rem 1.2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.ramza-stat-card.info {
    background: linear-gradient(135deg, oklch(0.58 0.18 245), oklch(0.52 0.16 260));
}

.ramza-stat-card.accent {
    background: linear-gradient(135deg, oklch(0.58 0.2 145), oklch(0.5 0.16 160));
}

.ramza-stat-card.warm {
    background: linear-gradient(135deg, oklch(0.72 0.16 60), oklch(0.62 0.18 40));
}

.ramza-stat-card.primary {
    background: linear-gradient(135deg, oklch(0.58 0.22 27), oklch(0.5 0.2 15));
}

.ramza-stat-card .label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.92;
}

.ramza-stat-card .value {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 0.25rem;
    letter-spacing: -0.02em;
}

.ramza-stat-card .hint {
    font-size: 12px;
    margin-top: 0.35rem;
    opacity: 0.88;
}

/* ——— Dashboard board (drag slots + responsive rows) ——— */
.ramza-dash-board {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.ramza-dash-top-row,
.ramza-dash-bottom-row {
    display: grid;
    gap: 1.25rem;
    align-items: stretch;
    min-width: 0;
}

.ramza-dash-top-row {
    grid-template-columns: 1fr;
}

.ramza-dash-bottom-row {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .ramza-dash-top-row {
        grid-template-columns: 2fr 1fr;
    }

    .ramza-dash-bottom-row {
        grid-template-columns: 1fr 1fr;
    }
}

.ramza-dash-slot {
    min-width: 0;
    min-height: 0;
}

.ramza-dash-slot .ramza-card {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ramza-dash-slot .ramza-chart-area {
    flex: 1;
    min-height: 220px;
}

.ramza-dash-slot .ramza-quick-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.ramza-dash-drag-handle {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: 0.35rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in oklab, var(--muted) 88%, var(--card));
    color: var(--muted-foreground);
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 0 oklch(1 0 0 / 0.5) inset, 0 2px 4px oklch(0.2 0.02 260 / 0.06);
}

.ramza-dash-drag-handle:active {
    cursor: grabbing;
}

.ramza-dash-drag-handle svg {
    width: 0.85rem;
    height: 0.85rem;
    opacity: 0.85;
}

.ramza-dash-slot--dragging {
    opacity: 0.55;
}

.ramza-card {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.25rem;
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.55) inset,
        0 -1px 0 oklch(0.2 0.02 260 / 0.05) inset,
        0 2px 4px oklch(0.2 0.02 260 / 0.05),
        0 12px 28px -8px oklch(0.2 0.02 260 / 0.12);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

html.dark .ramza-card {
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.08) inset,
        0 -1px 0 oklch(0 0 0 / 0.45) inset,
        0 4px 12px oklch(0 0 0 / 0.35),
        0 18px 40px -12px oklch(0 0 0 / 0.55);
}

.ramza-dash-board .ramza-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.6) inset,
        0 -1px 0 oklch(0.2 0.02 260 / 0.06) inset,
        0 4px 8px oklch(0.2 0.02 260 / 0.06),
        0 16px 36px -8px oklch(0.2 0.02 260 / 0.16);
}

html.dark .ramza-dash-board .ramza-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.1) inset,
        0 -1px 0 oklch(0 0 0 / 0.5) inset,
        0 6px 16px oklch(0 0 0 / 0.45),
        0 22px 48px -10px oklch(0 0 0 / 0.65);
}

.ramza-page .ramza-stat-card {
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.2) inset,
        0 -1px 0 oklch(0 0 0 / 0.08) inset,
        0 4px 12px oklch(0.2 0.02 260 / 0.12);
    transform: translateZ(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ramza-page .ramza-stat-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 oklch(1 0 0 / 0.25) inset,
        0 6px 18px oklch(0.2 0.02 260 / 0.18);
}

.ramza-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ramza-card-head-end {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.ramza-card-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.ramza-link {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    background: none;
    padding: 0;
}

.ramza-chart-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.ramza-chart-toggle button {
    border: 0;
    background: var(--muted);
    color: var(--muted-foreground);
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ramza-chart-toggle button.active {
    background: var(--accent);
    color: var(--accent-foreground);
}

.ramza-chart-area {
    height: 220px;
    margin-top: 0.5rem;
    position: relative;
}

.ramza-chart-tooltip {
    position: absolute;
    z-index: 5;
    padding: 0.4rem 0.65rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--foreground);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -8px;
}

.ramza-chart-tooltip[hidden] {
    display: none !important;
}

.ramza-chart-area svg {
    width: 100%;
    height: 100%;
}

.ramza-quick-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ramza-quick-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.ramza-quick-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    background: color-mix(in oklab, var(--accent) 18%, transparent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.ramza-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.ramza-list-row:last-child {
    border-bottom: 0;
}

.ramza-list-meta {
    color: var(--muted-foreground);
    font-size: 12px;
}

/* ——— Sign-in ——— */
.ramza-sign-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.5rem 1rem;
    background: var(--background);
    position: relative;
    overflow: hidden;
}

.ramza-sign-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.35;
    pointer-events: none;
}

.ramza-sign-blob.a {
    width: 18rem;
    height: 18rem;
    top: -4rem;
    left: 50%;
    transform: translateX(-50%);
    background: color-mix(in oklab, var(--accent) 40%, transparent);
}

.ramza-sign-blob.b {
    width: 16rem;
    height: 16rem;
    bottom: -3rem;
    right: 5%;
    background: color-mix(in oklab, var(--primary) 35%, transparent);
}

.ramza-sign-card {
    position: relative;
    width: 100%;
    max-width: 28rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 25px 50px -12px oklch(0.2 0.02 260 / 0.12);
}

.ramza-sign-brand {
    text-align: center;
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--primary);
    margin: 0;
}

.ramza-sign-title {
    text-align: center;
    margin: 1.75rem 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
}

.ramza-sign-sub {
    text-align: center;
    margin: 0 0 1.75rem;
    font-size: 14px;
    color: var(--muted-foreground);
}

.ramza-sign-field {
    margin-bottom: 1.1rem;
}

.ramza-sign-field label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.ramza-input-icon-wrap {
    position: relative;
}

.ramza-input-icon-wrap .icon-left {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    pointer-events: none;
}

.ramza-input-icon-wrap input {
    width: 100%;
    height: 3rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    font-size: 16px;
    background: color-mix(in oklab, var(--muted) 45%, var(--card));
}

.ramza-input-icon-wrap .icon-right.ramza-pw-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
}

.ramza-input-icon-wrap .icon-right.ramza-pw-toggle:hover {
    background: color-mix(in oklab, var(--accent) 12%, transparent);
}

.ramza-pw-toggle .ramza-pw-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.ramza-pw-toggle .ramza-pw-icon svg {
    display: block;
}

.ramza-sign-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 16px;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ramza-sign-footer {
    text-align: center;
    font-size: 13px;
    color: var(--muted-foreground);
    margin-top: 1.25rem;
}

/* ——— Toasts ——— */
.ramza-toast-host {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ramza-toast {
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    animation: ramza-toast-in 0.2s ease;
}

@keyframes ramza-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ramza-toast.ok {
    background: color-mix(in oklab, var(--success) 15%, var(--card));
    color: var(--foreground);
    border: 1px solid color-mix(in oklab, var(--success) 40%, transparent);
}

.ramza-toast.err {
    background: color-mix(in oklab, var(--destructive) 12%, var(--card));
    color: var(--destructive);
    border: 1px solid color-mix(in oklab, var(--destructive) 35%, transparent);
}

.ramza-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    vertical-align: middle;
    margin-right: 0.2rem;
}

.ramza-table td > .ramza-swatch {
    margin-right: 0;
}

/* Technician (and similar) name + coloured initial avatar */
.ramza-tech-name-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: 100%;
}

.ramza-tech-name-initial {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: color-mix(in oklab, var(--accent) 22%, var(--muted));
    color: color-mix(in oklab, var(--accent) 72%, var(--foreground));
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 28%, transparent);
}

html.dark .ramza-tech-name-initial {
    background: color-mix(in oklab, var(--accent) 26%, var(--muted));
    color: color-mix(in oklab, var(--accent) 88%, var(--foreground));
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent);
}

.ramza-tech-name-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--foreground);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ramza-tech-name-label--muted {
    font-weight: 500;
    color: var(--muted-foreground);
}

.ramza-tech-name-live {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
    min-height: 2.25rem;
}

.ramza-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.ramza-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.ramza-filters-row label {
    display: block;
    font-size: 12px;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

/* ——— Warranties & sale orders (card lists) ——— */
.ramza-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

.ramza-page-toolbar__search {
    flex: 1 1 16rem;
    min-width: 0;
}

.ramza-page-toolbar__field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.3rem;
}

.ramza-page-toolbar__field--date {
    flex: 0 0 auto;
}

.ramza-toolbar-select,
.ramza-toolbar-date {
    min-width: 10.5rem;
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 0.65rem;
    font-size: 14px;
}

.ramza-claim-list,
.ramza-sale-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ramza-claim-card,
.ramza-sale-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.ramza-claim-card:hover,
.ramza-sale-card:hover {
    border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
    box-shadow:
        var(--shadow-sm),
        0 0 0 1px color-mix(in oklab, var(--accent) 12%, transparent);
}

.ramza-claim-card--hidden,
.ramza-sale-card--hidden {
    display: none !important;
}

.ramza-claim-card__head,
.ramza-sale-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.ramza-claim-card__title-row,
.ramza-sale-card__title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.ramza-claim-card__icon,
.ramza-sale-card__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ramza-claim-card__icon--approved,
.ramza-sale-card__icon--completed {
    background: color-mix(in oklab, var(--success, oklch(0.55 0.14 145)) 18%, var(--card));
    color: color-mix(in oklab, var(--success, oklch(0.45 0.14 145)) 85%, var(--foreground));
}

.ramza-claim-card__icon--rejected,
.ramza-sale-card__icon--cancelled {
    background: color-mix(in oklab, var(--destructive) 14%, var(--card));
    color: color-mix(in oklab, var(--destructive) 88%, var(--foreground));
}

.ramza-claim-card__icon--pending,
.ramza-sale-card__icon--pending {
    background: color-mix(in oklab, var(--warning, oklch(0.75 0.12 85)) 22%, var(--card));
    color: color-mix(in oklab, var(--foreground) 70%, var(--warning));
}

.ramza-claim-card__icon--completed {
    background: color-mix(in oklab, var(--accent) 16%, var(--muted));
    color: color-mix(in oklab, var(--accent) 75%, var(--foreground));
}

.ramza-sale-card__icon--assigned {
    background: color-mix(in oklab, var(--info) 18%, var(--card));
    color: color-mix(in oklab, var(--info) 80%, var(--foreground));
}

.ramza-claim-card__titles,
.ramza-sale-card__titles {
    min-width: 0;
}

.ramza-claim-card__name,
.ramza-sale-card__refline {
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.25;
}

.ramza-claim-card__id,
.ramza-sale-card__customer {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
}

.ramza-claim-card__head-right,
.ramza-sale-card__head-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ramza-claim-card__desc,
.ramza-sale-card__desc {
    margin: 0 0 0.75rem;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.ramza-claim-card__foot,
.ramza-sale-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
    font-size: 12px;
    color: var(--muted-foreground);
}

.ramza-claim-card__ref,
.ramza-sale-card__order-id {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ramza-claim-card__date,
.ramza-sale-card__date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ramza-sale-card__pickrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ramza-sale-card__pickup {
    font-size: 11px;
    padding: 0.15rem 0.45rem;
}

/* ——— Inventory hub ——— */
.ramza-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
    gap: 1.1rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.ramza-inventory-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    min-height: 15rem;
    padding: 1.35rem 1.4rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.15s,
        border-color 0.15s,
        box-shadow 0.15s;
}

.ramza-inventory-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
    box-shadow:
        var(--shadow-md),
        0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent);
}

.ramza-inventory-card--vehicles .ramza-inventory-card__icon {
    background: color-mix(in oklab, var(--accent) 18%, var(--muted));
    color: color-mix(in oklab, var(--accent) 85%, var(--foreground));
}

.ramza-inventory-card--parts .ramza-inventory-card__icon {
    background: color-mix(in oklab, var(--destructive) 12%, var(--muted));
    color: color-mix(in oklab, var(--destructive) 88%, var(--foreground));
}

.ramza-inventory-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.ramza-inventory-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.ramza-inventory-card__sub {
    margin: 0.35rem 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.ramza-inventory-card__meta {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.ramza-inventory-card__count {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--foreground);
}

.ramza-inventory-card__count-label {
    font-size: 12px;
    color: var(--muted-foreground);
}

.ramza-inventory-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.ramza-inventory-card:hover .ramza-inventory-card__cta {
    text-decoration: underline;
}

.ramza-inventory-hint {
    font-size: 12px;
    color: var(--muted-foreground);
    line-height: 1.45;
}

.ramza-inventory-hint p {
    margin: 0;
}

.ramza-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ramza-inventory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
    padding: 0.25rem;
    border-radius: 12px;
    background: color-mix(in oklab, var(--muted) 45%, transparent);
    border: 1px solid var(--border);
}

.ramza-inventory-tab {
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 9px;
    cursor: pointer;
    transition:
        background 0.12s,
        color 0.12s;
}

.ramza-inventory-tab:hover {
    color: var(--foreground);
    background: color-mix(in oklab, var(--card) 70%, transparent);
}

.ramza-inventory-tab.active {
    background: var(--card);
    color: #1b5e20;
    box-shadow: var(--shadow-sm);
}

.ramza-inventory-panel.hidden {
    display: none !important;
}

.ramza-btn-sm {
    padding: 0.3rem 0.55rem;
    font-size: 12px;
    border-radius: 8px;
}

.ramza-modal-intro {
    margin: 0 0 1rem;
    font-size: 13px;
    color: var(--muted-foreground);
    line-height: 1.45;
}

.ramza-invoice-sheet {
    font-size: 13px;
}

.ramza-invoice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: color-mix(in oklab, var(--muted) 35%, var(--card));
    border: 1px solid var(--border);
}

.ramza-invoice-meta-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    margin-bottom: 0.2rem;
}

.ramza-invoice-parties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
}

.ramza-invoice-party h3 {
    margin: 0 0 0.35rem;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
}

.ramza-invoice-party p {
    margin: 0.15rem 0;
}

.ramza-invoice-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 2px solid var(--border);
    font-size: 1.05rem;
}

.ramza-modal-invoice {
    max-width: 42rem;
}

/* ——— Sidebar collapsed: profile ——— */
.ramza-sidebar.collapsed .ramza-profile-meta,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-profile-meta,
.ramza-sidebar.collapsed .ramza-profile-chevron,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-profile-chevron {
    display: none !important;
}

.ramza-sidebar.collapsed .ramza-profile-trigger,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-profile-trigger {
    justify-content: center;
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ramza-sidebar.collapsed .ramza-profile-wrap,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-profile-wrap {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    min-width: 0;
}

/* Collapsed rail is ~4rem: menu cannot sit inside left+right + min-width 11rem — fly out beside sidebar */
.ramza-sidebar.collapsed .ramza-profile-menu,
html.ramza-pref-sidebar-collapsed .ramza-sidebar .ramza-profile-menu {
    left: calc(100% + 10px);
    right: auto;
    bottom: 0;
    top: auto;
    min-width: 11rem;
    width: min(16rem, calc(100vw - var(--sidebar-collapsed) - 1.25rem));
    max-width: min(16rem, calc(100vw - var(--sidebar-collapsed) - 1.25rem));
}

/* ——— Stat cards (icon row + corner link) ——— */
.ramza-stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.ramza-stat-card-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: rgb(255 255 255 / 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.ramza-stat-card-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    opacity: 0.95;
}

.ramza-stat-card-out {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    background: rgb(255 255 255 / 0.15);
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;
}

.ramza-stat-card-out:hover {
    opacity: 1;
    background: rgb(255 255 255 / 0.25);
}

.ramza-stat-card-out svg {
    width: 0.85rem;
    height: 0.85rem;
}

/* ——— Dashboard list row (orders + PKR) ——— */
.ramza-list-row-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.ramza-list-price {
    font-weight: 700;
    font-size: 13px;
    color: var(--foreground);
}

/* ——— Quick list SVG icons ——— */
.ramza-quick-svg {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 10px;
    background: color-mix(in oklab, var(--accent) 18%, transparent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ramza-quick-svg svg {
    width: 1rem;
    height: 1rem;
}

/* ——— Admin profile modal ——— */
.ramza-admin-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ramza-admin-profile-modal[hidden] {
    display: none !important;
}

.ramza-admin-profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: oklch(0.15 0.02 260 / 0.55);
    backdrop-filter: blur(2px);
}

.ramza-admin-profile-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    border-radius: 1.15rem;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px oklch(0.2 0.02 260 / 0.25);
}

.ramza-admin-profile-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(135deg, oklch(0.55 0.18 150), oklch(0.48 0.16 155));
    color: #fff;
}

.ramza-admin-profile-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: -0.02em;
}

.ramza-admin-profile-modal-spark {
    flex-shrink: 0;
    opacity: 0.95;
}

.ramza-admin-profile-modal-sub {
    margin: 0.45rem 0 0;
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.45;
    max-width: 20rem;
}

.ramza-admin-profile-modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 0;
    background: rgb(255 255 255 / 0.2);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ramza-admin-profile-modal-close:hover {
    background: rgb(255 255 255 / 0.3);
}

.ramza-admin-profile-modal-body {
    padding: 1.35rem 1.35rem 1.5rem;
}

.ramza-admin-profile-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in oklab, var(--muted) 40%, var(--card));
    margin-bottom: 1rem;
}

.ramza-admin-profile-modal-avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.1rem;
}

.ramza-admin-profile-summary-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--foreground);
}

.ramza-admin-profile-summary-role {
    font-size: 13px;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
}

.ramza-admin-profile-fields {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ramza-admin-profile-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 35%, var(--card));
    font-size: 14px;
    color: var(--foreground);
}

.ramza-admin-profile-field svg {
    flex-shrink: 0;
    color: var(--muted-foreground);
}

/* ——— Sign-in below line ——— */
.ramza-sign-below {
    text-align: center;
    margin: 0;
    max-width: 28rem;
    width: 100%;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted-foreground);
}

.ramza-sign-below a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.ramza-sign-below a:hover {
    text-decoration: underline;
}

.ramza-sign-below-muted {
    color: var(--muted-foreground);
    font-weight: 400;
}

/* ——— Chart grid lines (stroke in SVG) ——— */
.ramza-chart-grid-line {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.85;
}

/* Collapsed sidebar: red pill label (matches reference tooltips) */
.ramza-sidebar-tip {
    position: fixed;
    z-index: 300;
    padding: 0.4rem 0.95rem;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 4px 14px oklch(0.2 0.02 260 / 0.2);
    pointer-events: none;
    white-space: nowrap;
    transform: translateY(-50%);
}

.ramza-sidebar-tip[hidden] {
    display: none !important;
}
