/* Override browser autofill yellow background for dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active,
.rz-inputtext:-webkit-autofill,
.rz-textbox:-webkit-autofill,
.rz-password:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
}

/* Blazor SSR wrapper elements must not break flex height chain */
blazor-ssr {
    display: contents;
}

/* Radzen layout fills full viewport */
.rz-layout {
    min-height: 100vh !important;
    height: 100vh !important;
}

/* Sidebar always visible at full height */
.rz-sidebar {
    height: 100% !important;
    min-height: 100vh !important;
}

/* ==================== ADMIN LAYOUT — MOBILE RESPONSIVE ==================== */

.admin-layout {
    position: relative;
    max-width: 100vw;
    overflow-x: hidden;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

.admin-header-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 0.25rem;
    min-height: 44px;
    height: auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.admin-sidebar-toggle {
    appearance: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: var(--rz-border-radius, 4px);
    background: transparent;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
    overflow: visible;
    position: relative;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.admin-sidebar-toggle .material-icons {
    font-size: 24px;
}

.admin-sidebar-toggle:hover,
.admin-sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.admin-sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--rz-border-radius, 4px);
    background: transparent;
    color: var(--rz-text-color, inherit);
    cursor: pointer;
}

.admin-sidebar-close-btn .material-icons {
    font-size: 22px;
}

.admin-header-title {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 0.25rem;
}

.admin-header-actions {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-logout-form {
    display: inline-flex;
    margin: 0;
}

.admin-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem 0.65rem;
    border: none;
    border-radius: var(--rz-border-radius, 4px);
    background: transparent;
    color: var(--rz-text-color, inherit);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    transition: background-color 0.15s ease;
    text-decoration: none;
}

.admin-logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-logout-btn .material-icons {
    font-size: 22px;
}

.admin-logout-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-body {
    overflow-x: hidden;
    min-width: 0;
}

.admin-content {
    padding: 1.5rem;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-sidebar-close {
    display: none;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 2.75rem;
    z-index: 1001;
    cursor: pointer;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55);
}

body.admin-sidebar-open .admin-sidebar-overlay {
    display: block;
    pointer-events: auto;
}

body.admin-sidebar-open {
    overflow: hidden;
}

/* Horizontal scroll wrapper for data tables */
.mmz-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mmz-table-scroll .rz-data-grid,
.mmz-table-scroll .rz-datatable {
    min-width: 640px;
}

/* Page / card toolbars stack on small screens */
.mmz-page-header,
.mmz-card-toolbar {
    flex-wrap: wrap;
    row-gap: 0.75rem;
}

@media (max-width: 767px) {
    .admin-sidebar-toggle {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .admin-content {
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    }

    .admin-content > .rz-stack.rz-orientation-horizontal,
    .admin-content > div > .rz-stack.rz-orientation-horizontal:first-child {
        flex-wrap: wrap !important;
        row-gap: 0.75rem;
    }

    .mmz-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .mmz-card-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .mmz-card-toolbar > .rz-stack.rz-orientation-horizontal {
        flex-wrap: wrap !important;
        width: 100%;
    }

    /* Mobile off-canvas sidebar (JS: body.admin-sidebar-open) */
    .admin-sidebar-close {
        display: flex;
    }

    .admin-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 2.75rem !important;
        height: calc(100dvh - 2.75rem) !important;
        width: min(280px, 88vw) !important;
        max-width: 88vw !important;
        transform: translateX(-105%) !important;
        transition: transform 0.2s ease !important;
        z-index: 1002 !important;
        opacity: 1 !important;
        box-shadow: none;
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
    }

    /* Touch-friendly tap targets (exclude header toggle — sized above) */
    .admin-layout .rz-button,
    .admin-layout .rz-panel-menu-item,
    .admin-layout .rz-panel-menu-item-content {
        min-height: 44px;
    }

    .admin-layout .admin-notif-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .admin-logout-label {
        display: none;
    }

    /* Data grids: horizontal scroll */
    .admin-content .rz-data-grid,
    .admin-content .rz-datatable {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .admin-content .rz-data-grid-data,
    .admin-content .rz-datatable-data {
        min-width: 600px;
    }

    /* Forms: full-width inputs */
    .admin-content .rz-textbox,
    .admin-content .rz-textarea,
    .admin-content .rz-dropdown,
    .admin-content .rz-numeric,
    .admin-content .rz-datepicker,
    .admin-content .rz-colorpicker,
    .admin-content .rz-html-editor {
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-content .rz-form-field {
        width: 100%;
    }

    /* Charts stay within viewport */
    .admin-content .rz-chart {
        max-width: 100%;
        overflow: hidden;
    }

    .admin-content .rz-chart svg {
        max-width: 100%;
        height: auto;
    }

    /* Dialogs nearly full-width on phones */
    .rz-dialog {
        max-width: calc(100vw - 1.5rem) !important;
        margin: 0.75rem !important;
    }

    .admin-not-found,
    .admin-access-denied {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .admin-header-title {
        font-size: 0.875rem;
    }

    .admin-content {
        padding: 0.75rem;
    }
}

@media (min-width: 768px) {
    .admin-sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        height: auto !important;
        transform: none !important;
        transition: none !important;
        width: var(--rz-sidebar-width) !important;
        max-width: none !important;
        box-shadow: none !important;
    }

    .admin-sidebar.rz-sidebar-collapsed {
        transform: none !important;
        width: var(--rz-sidebar-width) !important;
        opacity: 1 !important;
    }

    .admin-sidebar-toggle {
        display: none !important;
    }

    body.admin-sidebar-open .admin-sidebar-overlay,
    .admin-sidebar-overlay {
        display: none !important;
    }

    .admin-sidebar-close {
        display: none !important;
    }
}

.admin-not-found, .admin-access-denied {
    padding: 60px;
    text-align: center;
}

/* ==================== LOGIN PAGE ==================== */

.login-layout {
    height: 100%;
}

.login-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
    align-items: stretch;
}

/* Left Column — 66.67% light */
.login-left-col {
    flex: 0 0 66.67%;
    max-width: 66.67%;
    background: #f8fafc;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    box-sizing: border-box;
}

.login-left-content {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-brand {
    color: #1e293b;
    font-weight: 700;
    margin: 0;
}

.login-tagline {
    color: #64748b;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* Info Cards */
.info-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.info-icon {
    color: #3b82f6 !important;
    font-size: 1.5rem;
}

.info-title {
    color: #1e293b !important;
    font-weight: 600;
}

.info-text {
    color: #64748b !important;
    line-height: 1.6;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

/* Dark Login Card */
.login-card-dark {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.login-card-dark .login-title {
    color: #f1f5f9;
    font-weight: 700;
    margin: 0;
}

.login-card-dark .login-subtitle {
    color: #94a3b8;
    margin: 0;
}

.login-card-dark .login-footer {
    color: #64748b;
    text-align: center;
}

/* Simple Form Fields - Dark Theme */
.login-card-dark .field-label {
    color: #94a3b8 !important;
    font-weight: 500;
}

.login-card-dark .login-input {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    color: #f1f5f9 !important;
    width: 100%;
    padding: 12px 16px !important;
}

.login-card-dark .login-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    outline: none !important;
}

.login-card-dark .login-input::placeholder {
    color: #64748b !important;
}

.login-card-dark .login-btn {
    margin-top: 0.5rem;
}

.login-card-dark .rz-button {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    width: 100%;
}

.login-card-dark .rz-button:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

/* Right column — 33.33% dark */
.login-right-col {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Native form elements */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.login-card-dark form .login-input {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.login-card-dark form .login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.login-card-dark form .login-input::placeholder {
    color: #64748b;
}

.login-card-dark .login-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.login-card-dark .login-btn:hover {
    background: #2563eb;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #fca5a5;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.recent-users {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-users-label {
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0;
}

.recent-users-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.recent-user-chip:hover {
    border-color: #3b82f6;
    background: #111c33;
}

.recent-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #334155;
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.recent-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recent-user-name {
    color: #f1f5f9;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-user-email {
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-users-alt {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

.recent-users-alt:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.recent-users-alt-inline {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
}

.selected-user-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
}

.selected-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.login-card-dark .login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Info cards as block elements */
.info-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.info-card .info-title {
    color: #1e293b;
    font-weight: 600;
}

.info-card .info-text {
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .login-left-col {
        display: none;
    }

    .login-right-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Hero designer preview — storefront-matching stage + caption layout */
.hero-designer-preview {
    --hero-carousel-navy: #0f2a44;
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 1280 / 600;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rz-base-600);
    cursor: crosshair;
    user-select: none;
    container-type: inline-size;
    container-name: hero;
}

.hero-designer-preview__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.hero-designer-preview__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-designer-preview__guides {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-designer-preview__guide-v,
.hero-designer-preview__guide-h {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
}

.hero-designer-preview__guide-v {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

.hero-designer-preview__guide-h {
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.hero-designer-preview .hero-caption-stage--preview,
.hero-designer-preview .hero-caption-stage {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    color: white;
    pointer-events: none;
    opacity: 1;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow,
.hero-designer-preview .hero-caption-stage .slide-title,
.hero-designer-preview .hero-caption-stage .slide-subtitle {
    margin: 0;
    padding: 0;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 7px;
}

.hero-designer-preview .hero-caption-stage .slide-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.hero-designer-preview .hero-caption-stage .slide-title {
    font-size: clamp(var(--slide-title-size-min, 24px), 4.8cqi, var(--slide-title-size, 48px));
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
    margin-bottom: 9px;
}

.hero-designer-preview .hero-caption-stage .slide-title em {
    color: var(--slide-title-accent, #ffd966);
    font-style: italic;
}

.hero-designer-preview .hero-caption-stage .slide-subtitle {
    font-size: clamp(var(--slide-subtitle-size-min, 12px), 1.15cqi, var(--slide-subtitle-size, 17px));
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    opacity: var(--slide-subtitle-opacity, 1);
    margin-bottom: 0;
}

.hero-designer-preview .hero-caption-stage .hero-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-top: 17px;
    padding: 15px 32px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(43, 184, 200, 0.4);
    text-decoration: none;
    pointer-events: auto;
}

.hero-designer-preview .slide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    width: fit-content;
}

.hero-designer-preview .slide-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.hero-designer-preview .slide-title {
    font-weight: 800;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.hero-designer-preview .slide-title em {
    color: var(--slide-title-accent, #ffd966);
    font-style: italic;
}

.hero-designer-preview .slide-subtitle {
    font-weight: 500;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero-designer-preview .hero-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 15px 32px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(43, 184, 200, 0.4);
    text-decoration: none;
    pointer-events: auto;
}

.hero-designer-preview .carousel-arrow {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--hero-carousel-navy);
    z-index: 6;
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-designer-preview .carousel-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    background: white;
}

.hero-designer-preview .carousel-arrow.prev {
    left: 14px;
}

.hero-designer-preview .carousel-arrow.next {
    right: 14px;
}

.hero-designer-preview .carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
    pointer-events: auto;
}

.hero-designer-preview .carousel-indicators .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: default;
    transition: 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
}

.hero-designer-preview .carousel-indicators .dot.active {
    background: white;
    width: 24px;
    border-radius: 999px;
}

.hero-designer-preview .carousel-indicators .dot--clickable {
    cursor: pointer;
}

/* Return request — admin notes preview & editor (BackOffice dark theme) */
.return-admin-notes {
    padding: 0.75rem 1rem;
    border: 1px solid var(--rz-base-600);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-900);
    color: var(--rz-text-color);
    font-size: 0.875rem;
    line-height: 1.6;
}

.return-admin-notes p {
    margin: 0 0 0.75em;
    color: inherit;
    background: transparent !important;
}

.return-admin-notes p:last-child {
    margin-bottom: 0;
}

.return-admin-notes ul,
.return-admin-notes ol {
    margin: 0.5em 0 0.75em 1.25em;
    padding: 0;
}

.return-admin-notes li {
    margin-bottom: 0.25em;
}

.return-admin-notes a {
    color: var(--rz-info);
    text-decoration: underline;
}

.return-admin-notes a:hover {
    color: var(--rz-info-lighter);
}

.return-admin-notes strong,
.return-admin-notes b {
    color: var(--rz-base-0);
    font-weight: 600;
}

.return-admin-notes-helper {
    color: var(--rz-base-400) !important;
    line-height: 1.5;
}

.return-admin-notes-dialog .return-admin-notes-editor {
    min-height: 320px;
}

.return-admin-notes-dialog .return-admin-notes-editor .rz-html-editor-content {
    min-height: 260px;
}

/* ==================== ORDER DETAIL PANEL ==================== */

.order-detail-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-detail-section {
    background: var(--rz-base-800);
    border: 1px solid var(--rz-base-700);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.order-detail-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--rz-base-0);
    margin: 0 0 0.75rem;
}

.order-detail-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.order-detail-header-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.order-detail-header-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.order-detail-grid {
    display: grid;
    gap: 0.75rem;
}

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

.order-detail-grid > .order-detail-section {
    height: 100%;
    box-sizing: border-box;
}

.order-detail-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-detail-field-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-400);
    margin: 0 0 0.15rem;
}

.order-detail-field-value {
    font-size: 0.875rem;
    color: var(--rz-base-100);
    margin: 0;
    line-height: 1.45;
}

.order-detail-address {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.order-detail-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--rz-base-300);
    padding: 0.45rem 0.65rem;
    background: var(--rz-base-900);
    border-radius: 6px;
    border-left: 3px solid var(--rz-base-600);
    margin: 0;
}

.order-detail-hint .material-icons {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.85;
}

.order-detail-hint--info {
    border-left-color: var(--rz-info);
}

.order-detail-hint--warning {
    border-left-color: var(--rz-warning);
}

.order-detail-hint--success {
    border-left-color: var(--rz-success);
}

.order-detail-hint--danger {
    border-left-color: var(--rz-danger);
}

.order-detail-hint--muted {
    border-left: none;
    background: transparent;
    padding: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--rz-base-400);
}

.order-detail-subsection {
    background: var(--rz-base-900);
    border: 1px solid var(--rz-base-700);
    border-radius: 6px;
    padding: 0.875rem 1rem;
}

.order-detail-subsection + .order-detail-subsection {
    margin-top: 0.75rem;
}

.order-detail-subsection-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rz-base-0);
    margin: 0;
}

.order-detail-subsection-desc {
    font-size: 0.75rem;
    color: var(--rz-base-400);
    margin: 0.15rem 0 0;
    line-height: 1.4;
}

.order-items-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--rz-base-700);
    border-radius: 6px;
    background: var(--rz-base-900);
}

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

.order-items-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-400);
    border-bottom: 1px solid var(--rz-base-700);
    background: rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.order-items-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--rz-base-700);
    color: var(--rz-base-100);
    vertical-align: top;
}

.order-items-table tbody tr:last-child td {
    border-bottom: none;
}

.order-items-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.order-items-table .col-qty,
.order-items-table .col-price,
.order-items-table .col-total {
    text-align: right;
    white-space: nowrap;
}

.order-items-table .col-variant {
    color: var(--rz-base-300);
    font-size: 0.8125rem;
}

.order-totals-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rz-base-700);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.order-totals-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    max-width: 300px;
    font-size: 0.8125rem;
    color: var(--rz-base-300);
}

.order-totals-row span:last-child {
    color: var(--rz-base-100);
    font-variant-numeric: tabular-nums;
}

.order-totals-row--grand {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rz-base-600);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--rz-base-0);
}

.order-totals-row--grand span:last-child {
    color: var(--rz-success-lighter, #86efac);
}

.order-detail-shipment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--rz-base-200);
}

/* ==================== ORDER WORKFLOW STEPPER ==================== */

.order-workflow-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.workflow-step {
    flex: 1;
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-align: center;
}

.workflow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--rz-base-600);
    z-index: 0;
}

.workflow-step.completed:not(:last-child)::after {
    background: var(--rz-success);
}

.workflow-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--rz-success) 50%, var(--rz-base-600) 50%);
}

.workflow-step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-base-700);
    border: 2px solid var(--rz-base-600);
    z-index: 1;
    flex-shrink: 0;
}

.workflow-step-icon {
    font-size: 18px;
    color: var(--rz-base-300);
}

.workflow-step.completed .workflow-step-indicator {
    background: var(--rz-success);
    border-color: var(--rz-success);
}

.workflow-step.completed .workflow-step-icon {
    color: #fff;
}

.workflow-step.active .workflow-step-indicator {
    background: var(--rz-primary);
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.workflow-step.active .workflow-step-icon {
    color: #fff;
}

.workflow-step-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--rz-base-400);
    line-height: 1.2;
    max-width: 80px;
}

.workflow-step.active .workflow-step-label {
    color: var(--rz-base-0);
    font-weight: 600;
}

.workflow-step.completed .workflow-step-label {
    color: var(--rz-success-lighter, #86efac);
}

.order-detail-workflow .workflow-action-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rz-base-700);
}

.workflow-action-panel {
    padding: 0;
}

.workflow-step-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .order-detail-section {
        padding: 0.875rem 1rem;
    }

    .order-detail-grid--2col {
        grid-template-columns: 1fr;
    }

    .order-totals-row {
        max-width: 100%;
    }

    .workflow-step {
        min-width: 56px;
    }

    .workflow-step-label {
        font-size: 0.625rem;
        max-width: 56px;
    }

    .workflow-step-indicator {
        width: 32px;
        height: 32px;
    }

    .workflow-step-icon {
        font-size: 16px;
    }
}
