:root {
    --rma-primary: #0f4c81;
    --rma-primary-deep: #093057;
    --rma-accent: #00a896;
    --rma-warning: #f59e0b;
    --rma-danger: #c1121f;
    --rma-surface: #f5f8fb;
    --rma-border: #d9e3ef;
    --rma-text: #1f2937;
}

/* Safety fallback: hide CI debug toolbar UI in deployed user/admin sessions. */
#debug-icon,
#debug-icon-link,
#debug-bar {
    display: none !important;
}

body.rma-auth,
body.rma-user {
    background: radial-gradient(circle at top right, #c9f3ef, transparent 35%),
        radial-gradient(circle at bottom left, #d8e7ff, transparent 45%),
        var(--rma-surface);
    color: var(--rma-text);
    min-height: 100vh;
}

html,
body.rma-auth {
    height: 100%;
}

body.rma-auth {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
}

.rma-auth-shell {
    height: 100dvh;
    padding: clamp(10px, 2.2vh, 20px) 0;
}

.rma-auth-shell .container {
    height: 100%;
}

.rma-auth-shell .row {
    margin-bottom: 0;
}

.rma-auth-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(9, 48, 87, 0.18);
    overflow: hidden;
}

.rma-auth-highlight {
    background: linear-gradient(145deg, var(--rma-primary), var(--rma-primary-deep));
    color: #fff;
}

.rma-auth-brand-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.rma-auth-brand-logo {
    width: min(220px, 80%);
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

@media (max-width: 768px) {
    .rma-auth-shell {
        padding: 8px 0;
    }

    .rma-auth-card {
        border-radius: 0.85rem;
        max-height: calc(100dvh - 16px);
    }

    .rma-auth-highlight {
        padding: 1rem !important;
    }

    .rma-auth-brand-title {
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }

    .rma-auth-brand-logo {
        width: min(132px, 52vw);
    }

    .rma-auth-card .col-md-7 {
        padding: 1rem !important;
    }

    .rma-auth-card .h4.rma-title {
        margin-bottom: 0.9rem !important;
    }
}

.rma-user-nav {
    background: linear-gradient(110deg, var(--rma-primary), var(--rma-primary-deep));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.rma-user-pro .rma-user-nav {
    position: sticky;
    top: 0;
    z-index: 1086;
}

body.rma-user-pro .user-install-btn {
    border-radius: 999px;
    min-width: 38px;
}

.rma-title {
    font-weight: 700;
    letter-spacing: 0.015em;
}

.rma-panel {
    border: 1px solid var(--rma-border);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.06);
}

.rma-step-badge {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 76, 129, 0.1);
    color: var(--rma-primary);
    font-weight: 700;
}

.rma-image-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.65rem;
    border: 1px dashed var(--rma-border);
    background: #f8fafc;
}

.rma-pill {
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.rma-pill.ok {
    background: rgba(0, 168, 150, 0.15);
    color: #087f72;
}

.rma-pill.bad {
    background: rgba(193, 18, 31, 0.15);
    color: #941b27;
}

.rma-annotate-canvas {
    width: 100%;
    min-height: 440px;
    border-radius: 0.75rem;
    border: 1px solid var(--rma-border);
    background: #fff;
}

.admin-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 0.45rem;
    border: 1px solid #cdd8e4;
}

.admin-table td,
.admin-table th {
    vertical-align: middle;
    white-space: nowrap;
}

body.admin-pro .admin-table {
    width: 100% !important;
    table-layout: auto;
    font-size: 0.82rem;
}

body.admin-pro .admin-table th,
body.admin-pro .admin-table td {
    white-space: nowrap;
    word-break: normal;
    padding: 0.45rem 0.5rem;
}

body.admin-pro .admin-table .btn {
    white-space: nowrap;
}

body.admin-pro .btn-icon-only {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.admin-pro .submitted-expand-col {
    width: 44px;
}

body.admin-pro .js-row-expand {
    border-radius: 999px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.admin-pro tr.shown .js-row-expand {
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
    border-color: var(--admin-border);
}

body.admin-pro .submitted-child-wrap {
    padding: 0.2rem 0;
}

body.admin-pro .submitted-row-details {
    border: 1px solid var(--admin-border);
    border-radius: 0.85rem;
    padding: 0.72rem;
    background: var(--admin-surface-soft);
}

body.admin-pro .submitted-detail-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 0.72rem;
}

body.admin-pro .submitted-detail-grid > div {
    border: 1px solid var(--admin-border);
    border-radius: 0.65rem;
    background: var(--admin-surface);
    padding: 0.5rem 0.6rem;
}

body.admin-pro .submitted-detail-grid span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--admin-muted);
}

body.admin-pro .submitted-detail-grid strong {
    font-size: 0.88rem;
}

body.admin-pro .submitted-detail-section + .submitted-detail-section {
    margin-top: 0.72rem;
}

body.admin-pro .submitted-detail-title {
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-muted);
    margin-bottom: 0.45rem;
}

body.admin-pro .submitted-images-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

body.admin-pro .submitted-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--admin-border);
    border-radius: 0.65rem;
    background: var(--admin-surface);
    padding: 0.35rem;
    gap: 5px;
}

body.admin-pro .submitted-image-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 0.45rem;
}

body.admin-pro .submitted-image-item span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--admin-muted);
}

body.admin-pro .submitted-image-item.is-empty small {
    font-size: 0.68rem;
    color: var(--admin-muted);
}

body.admin-pro .submitted-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.admin-pro .submitted-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 98px;
}

body.admin-pro .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.admin-pro .dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
}

.admin-thumb-xs {
    width: 36px;
    height: 36px;
    border-radius: 0.35rem;
}

.claim-images-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.claim-images-inline a {
    display: inline-flex;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.2rem 0.55rem;
}

.admin-anno-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid var(--rma-border);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.admin-anno-stage img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    position: relative;
    z-index: 1;
}

.admin-anno-stage .canvas-container {
    position: absolute !important;
    left: 0;
    top: 0;
    z-index: 2;
}

.admin-anno-stage canvas,
.admin-anno-stage .upper-canvas,
.admin-anno-stage .lower-canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.user-app-shell {
    max-width: 1100px;
}

.rma-hero {
    background: linear-gradient(125deg, rgba(15, 76, 129, 0.12), rgba(0, 168, 150, 0.1));
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.rma-step-card {
    border: 1px solid var(--rma-border);
    border-radius: 0.95rem;
    background: #fbfdff;
    padding: 1rem;
}

.network-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.network-pill.is-online {
    background: rgba(16, 185, 129, 0.16);
    color: #0f766e;
    border-color: rgba(16, 185, 129, 0.35);
}

.network-pill.is-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
}

body.rma-user-pro .rma-user-nav .network-pill {
    color: #ecf8ff;
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

body.rma-user-pro .rma-user-nav .network-pill.is-online {
    background: rgba(16, 185, 129, 0.28);
    color: #edfff5;
    border-color: rgba(134, 239, 172, 0.72);
}

body.rma-user-pro .rma-user-nav .network-pill.is-offline {
    background: rgba(239, 68, 68, 0.3);
    color: #ffe8e8;
    border-color: rgba(252, 165, 165, 0.75);
}

.rma-image-card {
    border: 1px solid var(--rma-border);
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.7rem;
    box-shadow: 0 6px 14px rgba(15, 76, 129, 0.06);
}

.mobile-submit-bar {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(215, 226, 238, 0.95);
    background: linear-gradient(180deg, rgba(7, 25, 49, 0.95), rgba(7, 25, 49, 0.98));
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: minmax(96px, 0.85fr) minmax(0, 1.15fr);
    gap: 8px;
}

.mobile-action-bar .btn {
    min-height: 46px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mobile-action-primary.btn-success,
.mobile-action-primary.btn-primary {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    body.rma-user {
        padding-bottom: 108px;
    }

    .rma-user-nav .navbar-brand {
        font-size: 0.98rem;
    }

    .rma-user-nav .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.78rem;
    }

    .rma-panel {
        border-radius: 1rem;
        padding-bottom: 1.2rem;
    }

    .rma-step-card {
        border-radius: 0.85rem;
        padding: 0.85rem;
    }

    .mobile-submit-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        padding: 0.6rem 0.75rem;
        border-top: 1px solid #d7e2ee;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .mobile-submit-bar .btn {
        width: 100%;
        font-size: 0.95rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .inline-submit-actions {
        display: none !important;
    }
}

body.admin-pro {
    --admin-bg: #eef3fb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f7faff;
    --admin-border: #d7e4f5;
    --admin-text: #1a2533;
    --admin-muted: #6f8094;
    --admin-accent: #2f7fff;
    --admin-accent-strong: #1d5ccc;
    --admin-accent-soft: rgba(47, 127, 255, 0.14);
    --admin-sidebar-bg: linear-gradient(180deg, #0f2748 0%, #0a1930 100%);
    --admin-sidebar-text: #c8d8ef;
    --admin-sidebar-active-text: #ffffff;
    --admin-sidebar-active-bg: rgba(47, 127, 255, 0.33);
    --admin-topbar-bg: rgba(255, 255, 255, 0.86);
    --admin-topbar-border: rgba(16, 31, 54, 0.08);
    --admin-shadow: 0 16px 38px rgba(13, 42, 81, 0.11);
    color: var(--admin-text);
}

body.admin-pro.theme-industrial-blue {
    --admin-bg: #eef3fb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f7faff;
    --admin-border: #d7e4f5;
    --admin-text: #1a2533;
    --admin-muted: #6f8094;
    --admin-accent: #2f7fff;
    --admin-accent-strong: #1d5ccc;
    --admin-accent-soft: rgba(47, 127, 255, 0.14);
    --admin-sidebar-bg: linear-gradient(180deg, #0f2748 0%, #0a1930 100%);
    --admin-sidebar-text: #c8d8ef;
    --admin-sidebar-active-text: #ffffff;
    --admin-sidebar-active-bg: rgba(47, 127, 255, 0.33);
    --admin-topbar-bg: rgba(255, 255, 255, 0.86);
    --admin-topbar-border: rgba(16, 31, 54, 0.08);
    --admin-shadow: 0 16px 38px rgba(13, 42, 81, 0.11);
}

body.admin-pro.theme-enterprise-light {
    --admin-bg: #f4f6fb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f9fbff;
    --admin-border: #dde4ef;
    --admin-text: #1b2430;
    --admin-muted: #68768a;
    --admin-accent: #145ccf;
    --admin-accent-strong: #0f4cae;
    --admin-accent-soft: rgba(20, 92, 207, 0.12);
    --admin-sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
    --admin-sidebar-text: #3a4a5f;
    --admin-sidebar-active-text: #0f3d85;
    --admin-sidebar-active-bg: rgba(20, 92, 207, 0.14);
    --admin-topbar-bg: rgba(255, 255, 255, 0.94);
    --admin-topbar-border: rgba(31, 41, 55, 0.09);
    --admin-shadow: 0 16px 40px rgba(16, 32, 52, 0.08);
}

body.admin-pro.theme-command-dark {
    --admin-bg: #0c141f;
    --admin-surface: #141f2d;
    --admin-surface-soft: #182738;
    --admin-border: #26384f;
    --admin-text: #d8e5f7;
    --admin-muted: #91a4bf;
    --admin-accent: #2dd4bf;
    --admin-accent-strong: #14b8a6;
    --admin-accent-soft: rgba(45, 212, 191, 0.16);
    --admin-sidebar-bg: linear-gradient(180deg, #070f18 0%, #030810 100%);
    --admin-sidebar-text: #91a8c5;
    --admin-sidebar-active-text: #f3fffe;
    --admin-sidebar-active-bg: rgba(45, 212, 191, 0.26);
    --admin-topbar-bg: rgba(14, 22, 34, 0.92);
    --admin-topbar-border: rgba(83, 109, 145, 0.2);
    --admin-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

body.admin-pro .content-wrapper {
    background: radial-gradient(circle at 90% -10%, rgba(47, 127, 255, 0.12), transparent 40%), var(--admin-bg);
    color: var(--admin-text);
}

body.admin-pro.theme-command-dark .content-wrapper {
    background: radial-gradient(circle at 90% -10%, rgba(45, 212, 191, 0.12), transparent 40%), var(--admin-bg);
}

body.admin-pro .main-header.admin-topbar {
    background: var(--admin-topbar-bg);
    border-bottom: 1px solid var(--admin-topbar-border);
    backdrop-filter: blur(8px);
}

body.admin-pro .admin-top-link {
    color: var(--admin-muted);
    font-weight: 600;
}

body.admin-pro .admin-user-chip {
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-weight: 700;
}

body.admin-pro .admin-theme-toggle {
    border-radius: 0.55rem;
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
}

body.admin-pro .admin-theme-menu {
    min-width: 220px;
    border-radius: 0.8rem;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
}

body.admin-pro .admin-theme-option {
    border-radius: 0.55rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.admin-pro .admin-theme-option.active {
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
}

body.admin-pro .theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-flex;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

body.admin-pro .dot-industrial {
    background: linear-gradient(135deg, #1e6bff, #0f2748);
}

body.admin-pro .dot-enterprise {
    background: linear-gradient(135deg, #f8fbff, #9ab2d8);
}

body.admin-pro .dot-command {
    background: linear-gradient(135deg, #0a121d, #26c7b1);
}

body.admin-pro .admin-sidebar {
    background: var(--admin-sidebar-bg);
    box-shadow: 6px 0 24px rgba(4, 14, 27, 0.24);
}

body.admin-pro .admin-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

body.admin-pro .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

body.admin-pro .main-sidebar .nav-header {
    color: var(--admin-muted);
    letter-spacing: 0.08em;
    font-size: 0.69rem;
    font-weight: 700;
}

body.admin-pro .nav-sidebar > .nav-item > .nav-link {
    border-radius: 0.75rem;
    margin: 0.12rem 0.4rem;
    color: var(--admin-sidebar-text);
    transition: all 0.2s ease;
    font-weight: 600;
}

body.admin-pro .nav-sidebar > .nav-item > .nav-link:hover {
    background: var(--admin-accent-soft);
    color: var(--admin-sidebar-active-text);
}

body.admin-pro .nav-sidebar .nav-link.active {
    background: var(--admin-sidebar-active-bg);
    color: var(--admin-sidebar-active-text);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.admin-pro.theme-enterprise-light .admin-brand {
    border-bottom: 1px solid rgba(24, 39, 61, 0.08);
}

body.admin-pro.theme-enterprise-light .nav-sidebar > .nav-item > .nav-link {
    color: var(--admin-sidebar-text);
}

body.admin-pro.theme-enterprise-light .nav-sidebar > .nav-item > .nav-link:hover,
body.admin-pro.theme-enterprise-light .nav-sidebar .nav-link.active {
    color: var(--admin-sidebar-active-text);
}

body.admin-pro .admin-sidebar-footer {
    margin: 0.75rem;
    padding: 0.8rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--admin-sidebar-text);
}

body.admin-pro.theme-enterprise-light .admin-sidebar-footer {
    background: rgba(20, 92, 207, 0.08);
    border-color: rgba(20, 92, 207, 0.12);
    color: var(--admin-text);
}

body.admin-pro .card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: var(--admin-shadow);
}

body.admin-pro .card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--admin-border);
}

body.admin-pro .card-title {
    font-weight: 700;
}

body.admin-pro .admin-hero-card {
    overflow: hidden;
    position: relative;
}

body.admin-pro .admin-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--admin-accent-soft), transparent 60%);
    pointer-events: none;
}

body.admin-pro .metric-card {
    border: 1px solid var(--admin-border);
    background: linear-gradient(145deg, var(--admin-surface), var(--admin-surface-soft));
    border-radius: 1rem;
    padding: 0.95rem;
    box-shadow: var(--admin-shadow);
    height: 100%;
}

body.admin-pro .metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.admin-pro .metric-label {
    color: var(--admin-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

body.admin-pro .metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-accent-strong);
    background: var(--admin-accent-soft);
}

body.admin-pro .metric-value {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 800;
    margin-top: 0.45rem;
    color: var(--admin-text);
}

body.admin-pro .metric-meta {
    margin-top: 0.25rem;
    color: var(--admin-muted);
    font-size: 0.86rem;
}

body.admin-pro .quick-action-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body.admin-pro .dashboard-range-label {
    font-size: 0.72rem;
    font-weight: 700;
}

body.admin-pro .dashboard-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

body.admin-pro .dashboard-chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    max-height: 300px;
}

body.admin-pro #claimsTrendChart {
    width: 100%;
    height: 100% !important;
    max-height: 300px;
}

body.admin-pro .dashboard-alert-item {
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 0.62rem 0.68rem;
    background: var(--admin-surface-soft);
}

body.admin-pro .dashboard-alert-item + .dashboard-alert-item {
    margin-top: 0.6rem;
}

body.admin-pro .dashboard-alert-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

body.admin-pro .dashboard-alert-ok {
    border-color: rgba(40, 167, 69, 0.35);
    background: rgba(40, 167, 69, 0.08);
}

body.admin-pro .dashboard-alert-warning {
    border-color: rgba(255, 193, 7, 0.4);
    background: rgba(255, 193, 7, 0.12);
}

body.admin-pro .dashboard-alert-danger {
    border-color: rgba(220, 53, 69, 0.35);
    background: rgba(220, 53, 69, 0.08);
}

body.admin-pro .dashboard-alert-info {
    border-color: rgba(23, 162, 184, 0.35);
    background: rgba(23, 162, 184, 0.1);
}

body.admin-pro .dashboard-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.admin-pro .dashboard-activity-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    padding: 0.52rem 0;
    border-bottom: 1px dashed var(--admin-border);
}

body.admin-pro .dashboard-activity-list li:last-child {
    border-bottom: 0;
}

body.admin-pro .dashboard-activity-icon {
    padding-top: 2px;
}

body.admin-pro .dashboard-activity-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

body.admin-pro .btn {
    border-radius: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 0.82rem;
    padding: 0.38rem 0.74rem;
    line-height: 1.2;
    box-shadow: none;
}

body.admin-pro .btn.btn-sm {
    font-size: 0.76rem;
    padding: 0.28rem 0.56rem;
}

body.admin-pro .btn.btn-lg {
    font-size: 0.9rem;
    padding: 0.54rem 0.95rem;
}

body.admin-pro .btn i {
    font-size: 0.88em;
}

body.rma-user-pro .btn {
    border-radius: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-width: 1px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background 0.2s ease;
}

body.rma-user-pro .btn:hover {
    transform: translateY(-1px);
}

body.rma-user-pro .btn:active {
    transform: translateY(0);
}

body.rma-user-pro .btn:disabled,
body.rma-user-pro .btn.disabled {
    transform: none !important;
    box-shadow: none !important;
    filter: saturate(0.75);
}

body.rma-user-pro .btn.btn-primary {
    border-color: #1157e6;
    background: linear-gradient(135deg, #2d81ff 0%, #1567f4 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(21, 103, 244, 0.28);
}

body.rma-user-pro .btn.btn-primary:hover,
body.rma-user-pro .btn.btn-primary:focus {
    background: linear-gradient(135deg, #3b8bff 0%, #1d6ff7 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(21, 103, 244, 0.34);
}

body.rma-user-pro .btn.btn-success {
    border-color: #08875e;
    background: linear-gradient(135deg, #16b889 0%, #089a70 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(8, 154, 112, 0.28);
}

body.rma-user-pro .btn.btn-success:hover,
body.rma-user-pro .btn.btn-success:focus {
    background: linear-gradient(135deg, #1fc595 0%, #0aa57a 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(8, 154, 112, 0.34);
}

body.rma-user-pro .btn.btn-outline-primary {
    border-color: #2e6de7;
    color: #1d5fd8;
    background: #f5f9ff;
}

body.rma-user-pro .btn.btn-outline-primary:hover,
body.rma-user-pro .btn.btn-outline-primary:focus {
    color: #fff;
    background: linear-gradient(135deg, #2d81ff 0%, #1567f4 100%);
    border-color: #1157e6;
}

body.rma-user-pro .btn.btn-outline-secondary {
    border-color: #7b8798;
    color: #4f5f74;
    background: #f8fafd;
}

body.rma-user-pro .btn.btn-outline-secondary:hover,
body.rma-user-pro .btn.btn-outline-secondary:focus {
    border-color: #5d6e84;
    color: #fff;
    background: linear-gradient(135deg, #71839d 0%, #5c6d85 100%);
}

body.rma-user-pro .btn.btn-light {
    border-color: #dce6f5;
    background: #fff;
    color: #16375f;
    box-shadow: 0 5px 12px rgba(12, 53, 108, 0.08);
}

body.rma-user-pro .btn.btn-light:hover,
body.rma-user-pro .btn.btn-light:focus {
    color: #0f2d51;
    border-color: #c8d8ef;
    background: #f7fbff;
}

body.rma-user-pro .btn.btn-sm {
    padding: 0.42rem 0.7rem;
    font-size: 0.8rem;
}

body.rma-user-pro .btn.btn-lg {
    padding: 0.62rem 1rem;
    font-size: 0.97rem;
}

body.rma-user-pro .btn i {
    font-size: 0.9em;
}

body.rma-user-pro .user-install-btn {
    min-width: 38px;
    border-color: rgba(175, 225, 255, 0.74);
    background: rgba(255, 255, 255, 0.1);
    color: #e9f4ff;
}

body.rma-user-pro .user-install-btn:hover,
body.rma-user-pro .user-install-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(198, 236, 255, 0.92);
    box-shadow: 0 7px 14px rgba(5, 23, 44, 0.3);
}

body.rma-user-pro .user-install-btn:disabled {
    opacity: 1;
    color: #cae7d6;
    border-color: rgba(143, 207, 173, 0.75);
    background: rgba(35, 133, 92, 0.22);
    box-shadow: none;
}

body.admin-pro .quick-action-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    padding: 0.72rem 0.78rem;
    color: var(--admin-text);
    text-decoration: none;
    font-weight: 600;
    background: var(--admin-surface-soft);
    transition: all 0.2s ease;
}

body.admin-pro .quick-action-tile:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent-strong);
    transform: translateY(-1px);
}

body.admin-pro .workflow-item .progress {
    border-radius: 999px;
    background: var(--admin-accent-soft);
}

body.admin-pro .admin-table td,
body.admin-pro .admin-table th {
    border-color: var(--admin-border);
}

body.admin-pro .table thead th {
    border-bottom-width: 1px;
    color: var(--admin-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.admin-pro.theme-command-dark .table {
    color: var(--admin-text);
}

body.admin-pro.theme-command-dark .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

body.admin-pro.theme-command-dark .dropdown-menu,
body.admin-pro.theme-command-dark .modal-content,
body.admin-pro.theme-command-dark .form-control,
body.admin-pro.theme-command-dark .form-control-file,
body.admin-pro.theme-command-dark .input-group-text {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

body.admin-pro.theme-command-dark .text-muted {
    color: var(--admin-muted) !important;
}

@media (max-width: 992px) {
    body.admin-pro .admin-user-chip {
        display: none;
    }

    body.admin-pro .dashboard-toolbar-row {
        justify-content: flex-start !important;
    }
}

body.rma-user-pro .user-app-shell {
    max-width: 1180px;
}

html,
body.rma-user-pro {
    overflow-x: hidden;
}

body.rma-user-pro .user-app-shell,
body.rma-user-pro .capture-shell,
body.rma-user-pro .rma-step-card,
body.rma-user-pro .rma-image-card {
    max-width: 100%;
}

body.rma-user-pro .capture-shell {
    position: relative;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.rma-user-pro .capture-shell.is-busy {
    opacity: 0.82;
}

body.rma-user-pro .capture-shell.is-mobile-experience .step-pane {
    display: none;
}

body.rma-user-pro .capture-shell.is-mobile-experience .step-pane.is-pane-active {
    display: block;
}

body.rma-user-pro .capture-hero {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.12), rgba(0, 168, 150, 0.12));
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
}

body.rma-user-pro .capture-status-bar {
    border: 1px solid #d8e4ef;
    border-radius: 0.78rem;
    background: #fff;
    padding: 0.42rem 0.68rem;
    min-height: 38px;
    display: flex;
    align-items: center;
}

body.rma-user-pro .capture-draft-status {
    color: #6a7f98;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.rma-user-pro .capture-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

body.rma-user-pro .capture-step {
    border: 1px solid #d8e4ef;
    background: #fff;
    border-radius: 0.9rem;
    padding: 0.55rem 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

body.rma-user-pro .capture-step span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

body.rma-user-pro .capture-step p {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
}

body.rma-user-pro .capture-step.is-locked {
    opacity: 0.66;
}

body.rma-user-pro .capture-step.is-locked span {
    background: #eff3f8;
    color: #6a788b;
}

body.rma-user-pro .capture-step.is-active {
    border-color: rgba(15, 76, 129, 0.35);
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.08);
}

body.rma-user-pro .capture-step.is-active span {
    background: rgba(15, 76, 129, 0.14);
    color: #0f4c81;
}

body.rma-user-pro .capture-step.is-done span {
    background: rgba(0, 168, 150, 0.16);
    color: #087f72;
}

body.rma-user-pro .capture-preview-grid {
    margin-top: 0.35rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.rma-user-pro .capture-preview-item {
    border: 1px solid #d8e4ef;
    border-radius: 0.75rem;
    background: #f8fbff;
    padding: 0.6rem 0.7rem;
    min-height: 64px;
}

body.rma-user-pro .capture-preview-item span {
    display: block;
    font-size: 0.73rem;
    color: #718299;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

body.rma-user-pro .capture-preview-item strong {
    font-size: 0.92rem;
    font-weight: 700;
}

body.rma-user-pro .capture-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.rma-user-pro .capture-checklist li {
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    border: 1px solid #d7e3ee;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.rma-user-pro .capture-checklist li.is-pending {
    background: #f8fafd;
    color: #66788f;
}

body.rma-user-pro .capture-checklist li.is-ready {
    background: rgba(0, 168, 150, 0.14);
    color: #087f72;
    border-color: rgba(0, 168, 150, 0.25);
}

body.rma-user-pro .capture-image-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.rma-user-pro .capture-image-card.is-ready {
    border-color: rgba(0, 168, 150, 0.4);
    box-shadow: 0 10px 24px rgba(0, 168, 150, 0.12);
}

body.rma-user-pro .capture-status-optional {
    background: #ffe8b3 !important;
    color: #7a4a00 !important;
    border: 1px solid #ffcf66 !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(122, 74, 0, 0.15);
}

body.rma-user-pro .capture-open-btn,
body.rma-user-pro .capture-reset-btn,
body.rma-user-pro #annotateBtn {
    min-height: 44px;
    font-weight: 700;
}

body.rma-user-pro .capture-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0.95rem;
}

body.rma-user-pro .capture-review-grid > div {
    border: 1px solid #d7e3ee;
    border-radius: 0.75rem;
    background: #f8fbff;
    padding: 0.58rem 0.66rem;
}

body.rma-user-pro .capture-review-grid span {
    display: block;
    font-size: 0.72rem;
    color: #72839a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.rma-user-pro .capture-review-grid strong {
    font-size: 0.93rem;
}

body.rma-user-pro .oc-scan-input-group .form-control {
    border-right: 0;
}

body.rma-user-pro .oc-scan-input-group .btn {
    min-width: 60px;
    border-left: 0;
}

body.rma-user-pro #ocAutoValidateWrap .form-check-input {
    cursor: pointer;
}

body.rma-user-pro #ocAutoValidateWrap .form-check-label {
    cursor: pointer;
}

body.rma-user-pro .oc-scanner-modal .modal-content {
    background: radial-gradient(circle at 15% 10%, rgba(15, 76, 129, 0.34), rgba(8, 20, 40, 0.94));
    color: #f5f9ff;
}

body.rma-user-pro .rma-crop-modal .modal-content {
    background: #f4f8fe;
}

body.rma-user-pro .rma-crop-modal .modal-body {
    padding: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1220;
}

body.rma-user-pro .rma-crop-modal .modal-body img {
    max-height: calc(100vh - 190px);
    object-fit: contain;
}

body.rma-user-pro.modal-open .mobile-action-bar,
body.rma-user-pro.modal-open .mobile-submit-bar {
    display: none !important;
}

body.rma-user-pro .oc-scanner-reader {
    width: 100%;
    max-width: 780px;
    min-height: 320px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #05090f;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

body.rma-user-pro #ocScannerReader video,
body.rma-user-pro #ocScannerReader canvas {
    width: 100% !important;
    height: auto !important;
}

body.rma-user-pro #ocScannerReader__dashboard_section,
body.rma-user-pro #ocScannerReader__dashboard_section_swaplink {
    display: none !important;
}

body.rma-user-pro .oc-scanner-status-wrap {
    display: flex;
    justify-content: center;
}

body.rma-user-pro .oc-scanner-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.rma-user-pro .oc-scanner-status.is-info {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.4);
    color: #c8f3ff;
}

body.rma-user-pro .oc-scanner-status.is-ok {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    color: #d9ffe8;
}

body.rma-user-pro .oc-scanner-status.is-bad {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.42);
    color: #ffe3e3;
}

body.rma-user-pro .oc-scanner-status.is-mute {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.34);
    color: #e4edf8;
}

body.rma-user-pro .rma-success-card {
    border: 1px solid rgba(0, 168, 150, 0.28);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 16px 36px rgba(9, 48, 87, 0.12);
    text-align: center;
    padding: 1.5rem 1.2rem;
}

body.rma-user-pro .rma-success-icon {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    margin: 0 auto 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: #087f72;
    background: rgba(0, 168, 150, 0.15);
}

body.rma-user-pro .rma-success-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.rma-user-pro .rma-success-meta > div {
    border: 1px solid #d7e4ef;
    border-radius: 0.7rem;
    background: #f8fbff;
    padding: 0.6rem;
}

body.rma-user-pro .rma-success-meta span {
    display: block;
    font-size: 0.72rem;
    color: #72839a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.rma-user-pro .swal2-container {
    z-index: 2100 !important;
}

body.rma-user-pro .swal2-container.swal2-top,
body.rma-user-pro .swal2-container.swal2-top-start,
body.rma-user-pro .swal2-container.swal2-top-end,
body.rma-user-pro .swal2-container.swal2-top-left,
body.rma-user-pro .swal2-container.swal2-top-right {
    padding-top: calc(74px + env(safe-area-inset-top)) !important;
}

@media (max-width: 768px) {
    body.rma-user-pro .swal2-container.swal2-top,
    body.rma-user-pro .swal2-container.swal2-top-start,
    body.rma-user-pro .swal2-container.swal2-top-end,
    body.rma-user-pro .swal2-container.swal2-top-left,
    body.rma-user-pro .swal2-container.swal2-top-right {
        padding-top: calc(88px + env(safe-area-inset-top)) !important;
    }

    body.rma-user-pro .rma-user-nav .container-fluid {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    body.rma-user-pro .rma-user-nav .navbar-brand {
        max-width: 54%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.rma-user-pro .user-nav-actions {
        gap: 0.35rem !important;
    }

    body.rma-user-pro .user-nav-ident,
    body.rma-user-pro .user-nav-mode {
        display: none;
    }

    body.rma-user-pro .rma-user-nav .btn {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body.rma-user-pro .user-install-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.rma-user-pro .capture-status-bar {
        margin-bottom: 0.55rem !important;
    }

    body.rma-user-pro .capture-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: sticky;
        top: 62px;
        z-index: 1028;
        background: rgba(245, 248, 251, 0.98);
        backdrop-filter: blur(6px);
        padding: 0.3rem;
        border-radius: 0.9rem;
        border: 1px solid #d7e4ef;
    }

    body.rma-user-pro .capture-preview-grid,
    body.rma-user-pro .capture-review-grid,
    body.rma-user-pro .rma-success-meta {
        grid-template-columns: 1fr;
    }

    body.rma-user-pro .oc-scanner-reader {
        min-height: 260px;
    }

    body.rma-user-pro .capture-open-btn,
    body.rma-user-pro .capture-reset-btn,
    body.rma-user-pro #annotateBtn {
        min-height: 48px;
    }

    body.rma-user-pro .rma-crop-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100dvh;
    }

    body.rma-user-pro .rma-crop-modal .modal-content {
        height: 100dvh;
        border-radius: 0;
    }

    body.rma-user-pro .rma-crop-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    body.rma-user-pro .rma-crop-modal .modal-body img {
        max-height: calc(100dvh - 220px);
    }

    body.rma-user-pro .rma-crop-modal .modal-footer {
        flex: 0 0 auto;
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #f4f8fe;
        border-top: 1px solid #d7e3ee;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
}
