/* ============================================
   ReelsXpress CRM Styles
   Minimalist, clean, fast loading
   ============================================ */

:root {
    --rx-primary: #4f46e5;
    --rx-primary-dark: #4338ca;
    --rx-success: #10b981;
    --rx-warning: #f59e0b;
    --rx-danger: #ef4444;
    --rx-info: #3b82f6;
    --rx-gray-50: #f9fafb;
    --rx-gray-100: #f3f4f6;
    --rx-gray-200: #e5e7eb;
    --rx-gray-300: #d1d5db;
    --rx-gray-400: #9ca3af;
    --rx-gray-500: #6b7280;
    --rx-gray-600: #4b5563;
    --rx-gray-700: #374151;
    --rx-gray-800: #1f2937;
    --rx-gray-900: #111827;
    --rx-sidebar-width: 240px;
    --rx-topbar-height: 60px;
    --rx-radius: 8px;
    --rx-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --rx-shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --rx-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html:has(body.rx-crm-body),
body.rx-crm-body {
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
}

body.rx-crm-body,
body.rx-crm-body *,
body.rx-crm-body *::before,
body.rx-crm-body *::after {
    box-sizing: border-box;
}

body.rx-crm-body {
    -webkit-text-size-adjust: 100%;
    background: var(--rx-gray-50);
    color: var(--rx-gray-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Login */
body.rx-login-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f6f7fb;
    color: var(--rx-gray-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body.rx-login-body,
body.rx-login-body *,
body.rx-login-body *::before,
body.rx-login-body *::after {
    box-sizing: border-box;
}

.rx-login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
}

.rx-login-hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #111827;
    color: #fff;
}

.rx-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 42px;
    font-size: 20px;
    font-weight: 700;
}

.rx-login-brand span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--rx-primary);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.rx-login-hero h1 {
    max-width: 520px;
    margin: 0 0 18px;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: 0;
}

.rx-login-hero p {
    max-width: 480px;
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 16px;
}

.rx-login-panel {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
    background: #fff;
}

.rx-login-panel-header {
    max-width: 420px;
    margin: 0 auto 24px;
    width: 100%;
}

.rx-login-panel-header span {
    display: block;
    margin-bottom: 8px;
    color: var(--rx-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rx-login-panel-header h2 {
    margin: 0;
    color: var(--rx-gray-900);
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.rx-login-panel .rx-alert {
    max-width: 420px;
    width: 100%;
    margin: 0 auto 18px;
}

.rx-login-form {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.rx-login-form .rx-form-group {
    margin-bottom: 18px;
}

.rx-login-form .rx-form-input {
    min-height: 52px;
    font-size: 16px;
}

.rx-login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 22px;
    color: var(--rx-gray-600);
    font-weight: 500;
}

.rx-login-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--rx-primary);
}

.rx-login-submit {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    font-size: 15px;
}

/* Layout */
.rx-crm-wrapper {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Sidebar */
.rx-sidebar {
    width: var(--rx-sidebar-width);
    background: var(--rx-gray-900);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.rx-sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rx-sidebar-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rx-sidebar-brand strong {
    font-weight: 700;
}

.rx-sidebar-brand span {
    font-size: 12px;
    background: var(--rx-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.rx-sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.rx-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 10px 14px;
    color: var(--rx-gray-400);
    text-decoration: none;
    border-radius: var(--rx-radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.rx-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.rx-nav-item.rx-active {
    background: var(--rx-primary);
    color: #fff;
}

.rx-nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Main Area */
.rx-main-area {
    flex: 1;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--rx-sidebar-width);
    width: auto;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

/* Topbar */
.rx-topbar {
    width: 100%;
    max-width: none;
    height: var(--rx-topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--rx-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.rx-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rx-page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--rx-gray-800);
    margin: 0;
}

.rx-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rx-user-name {
    font-size: 14px;
    color: var(--rx-gray-600);
    font-weight: 500;
}


/* Mobile Toggle */
.rx-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--rx-radius);
}

.rx-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--rx-gray-700);
    border-radius: 2px;
}

/* Content */
.rx-content {
    flex: 1;
    width: 100%;
    max-width: none;
    padding: 28px 40px 28px 28px;
    background: var(--rx-gray-50);
}

.rx-content > * {
    max-width: none;
}

/* Footer */
.rx-footer {
    width: 100%;
    max-width: none;
    padding: 16px 40px 16px 28px;
    background: #fff;
    border-top: 1px solid var(--rx-gray-200);
    font-size: 12px;
    color: var(--rx-gray-400);
    text-align: center;
}

/* Cards */
.rx-card {
    background: #fff;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    max-width: 100%;
    min-width: 0;
    padding: 24px;
    box-shadow: var(--rx-shadow);
}

.rx-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rx-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--rx-gray-800);
    margin: 0;
}

.rx-header-actions,
.rx-actions,
.rx-actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rx-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.rx-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rx-detail-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.rx-detail-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rx-detail-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rx-detail-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--rx-gray-100);
    border-radius: var(--rx-radius);
    background: var(--rx-gray-50);
}

.rx-detail-grid span,
.rx-note-block span {
    display: block;
    color: var(--rx-gray-500);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.rx-detail-grid strong {
    color: var(--rx-gray-900);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.rx-note-block {
    margin-bottom: 20px;
    padding: 14px;
    background: var(--rx-gray-50);
    border-radius: var(--rx-radius);
    border: 1px solid var(--rx-gray-100);
}

.rx-note-block p {
    color: var(--rx-gray-700);
    overflow-wrap: anywhere;
}

.rx-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--rx-gray-200);
    color: var(--rx-gray-500);
    font-size: 12px;
}

.rx-subsection {
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    padding: 18px;
    margin: 20px 0;
    background: var(--rx-gray-50);
}

.rx-subsection h3 {
    font-size: 14px;
    color: var(--rx-gray-800);
    margin-bottom: 16px;
}

.rx-text-danger {
    color: var(--rx-danger) !important;
}

.rx-text-success {
    color: var(--rx-success) !important;
}

.rx-money-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 24px;
}

.rx-money-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    background: #fff;
}

.rx-money-card span {
    display: block;
    color: var(--rx-gray-500);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.rx-money-card strong {
    display: block;
    color: var(--rx-gray-900);
    font-size: 22px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.rx-money-finalized {
    border-left: 4px solid var(--rx-info);
}

.rx-money-paid {
    border-left: 4px solid var(--rx-success);
}

.rx-money-pending {
    border-left: 4px solid var(--rx-warning);
    background: #fffaf0;
}

.rx-money-pending strong {
    color: var(--rx-danger);
}

.rx-money-clear {
    border-left: 4px solid var(--rx-success);
    background: #f0fdf4;
}

.rx-money-clear strong {
    color: var(--rx-success);
}

.rx-money-status-card {
    border-left: 4px solid var(--rx-primary);
}

.rx-money-progress {
    grid-column: 1 / -1;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--rx-gray-200);
}

.rx-money-progress span,
.rx-money-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rx-success), var(--rx-info));
}

.rx-money-summary-form {
    padding: 14px;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    background: var(--rx-gray-50);
}

.rx-money-summary-detail {
    margin-top: 0;
}

.rx-money-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 10px;
    min-width: 280px;
}

.rx-money-mini div {
    min-width: 0;
}

.rx-money-mini span {
    display: block;
    color: var(--rx-gray-500);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.rx-money-mini strong {
    display: block;
    color: var(--rx-gray-900);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.rx-money-mini-progress {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--rx-gray-200);
}

/* Stats Grid */
.rx-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.rx-stat-card {
    background: #fff;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    display: block;
    min-width: 0;
    padding: 18px;
    box-shadow: var(--rx-shadow);
    text-decoration: none;
}

.rx-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--rx-gray-900);
    margin-bottom: 4px;
}

.rx-stat-label {
    font-size: 13px;
    color: var(--rx-gray-500);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.rx-stat-card.rx-stat-danger .rx-stat-value { color: var(--rx-danger); }
.rx-stat-card.rx-stat-warning .rx-stat-value { color: var(--rx-warning); }
.rx-stat-card.rx-stat-success .rx-stat-value { color: var(--rx-success); }
.rx-stat-card.rx-stat-info .rx-stat-value { color: var(--rx-info); }

/* Buttons */
.rx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--rx-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    min-height: 40px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    touch-action: manipulation;
    transition: all 0.15s ease;
    background: none;
}

.rx-btn-primary {
    background: var(--rx-primary);
    color: #fff;
    border-color: var(--rx-primary);
}

.rx-btn-primary:hover {
    background: var(--rx-primary-dark);
    border-color: var(--rx-primary-dark);
}

.rx-btn-ghost {
    background: transparent;
    color: var(--rx-gray-600);
    border-color: var(--rx-gray-300);
}

.rx-btn-ghost:hover {
    background: var(--rx-gray-100);
}

.rx-btn-danger {
    background: var(--rx-danger);
    color: #fff;
    border-color: var(--rx-danger);
}

.rx-btn-sm {
    padding: 5px 12px;
    font-size: 13px;
    min-height: 34px;
}

/* Tables */
.rx-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rx-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rx-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--rx-gray-50);
    border-bottom: 1px solid var(--rx-gray-200);
    white-space: nowrap;
}

.rx-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--rx-gray-100);
    color: var(--rx-gray-700);
    vertical-align: middle;
}

.rx-table tbody tr:hover {
    background: var(--rx-gray-50);
}

.rx-compact-table {
    font-size: 13px;
}

.rx-compact-table tbody td {
    padding: 10px 12px;
}

.rx-empty-copy {
    color: var(--rx-gray-400);
    font-size: 14px;
}

.rx-empty {
    color: var(--rx-gray-400);
    padding: 40px 16px !important;
    text-align: center;
}

.rx-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rx-dashboard-queues {
    align-items: start;
    margin-bottom: 28px;
}

.rx-table a {
    color: var(--rx-primary);
    text-decoration: none;
    font-weight: 500;
}

.rx-table a:hover {
    text-decoration: underline;
}

/* Badges */
.rx-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-teal   { background: #ccfbf1; color: #115e59; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* Forms */
.rx-form-group {
    margin-bottom: 20px;
}

.rx-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rx-gray-700);
    margin-bottom: 6px;
}

.rx-form-input,
.rx-form-select,
.rx-form-textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--rx-gray-300);
    border-radius: var(--rx-radius);
    font-size: 14px;
    color: var(--rx-gray-800);
    background: #fff;
    transition: border-color 0.15s ease;
}

.rx-form-input:focus,
.rx-form-select:focus,
.rx-form-textarea:focus {
    outline: none;
    border-color: var(--rx-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.rx-form-input[readonly] {
    background: var(--rx-gray-100);
    color: var(--rx-gray-500);
}

.rx-form-static {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    background: var(--rx-gray-50);
}

.rx-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.rx-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rx-simple-check {
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

.rx-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--rx-gray-200);
}


.rx-checkbox-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.rx-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--rx-gray-700);
}

.rx-checkbox-group {
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Alerts */
.rx-alert {
    padding: 14px 18px;
    border-radius: var(--rx-radius);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rx-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.rx-alert-warning {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.rx-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Pagination */
.rx-pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    justify-content: flex-end;
}

.rx-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--rx-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--rx-gray-600);
    background: #fff;
    border: 1px solid var(--rx-gray-200);
    transition: all 0.15s ease;
}

.rx-page-link:hover {
    background: var(--rx-gray-100);
}

.rx-page-link.rx-page-active {
    background: var(--rx-primary);
    color: #fff;
    border-color: var(--rx-primary);
}

/* Search */
.rx-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rx-search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 100%;
    flex-wrap: wrap;
}

.rx-search-form input[type="text"] {
    flex: 1;
    min-width: 220px;
}

.rx-search-form select {
    min-width: 170px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .rx-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rx-login-shell {
        grid-template-columns: 1fr;
    }

    .rx-login-hero {
        min-height: auto;
        padding: 36px 28px;
    }

    .rx-login-hero h1 {
        font-size: 32px;
    }

    .rx-login-panel {
        min-height: auto;
        padding: 36px 28px 48px;
    }
}

@media (max-width: 768px) {
    body.rx-sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(17, 24, 39, 0.42);
        pointer-events: none;
    }

    .rx-crm-wrapper {
        width: 100dvw;
        height: 100dvh;
    }

    .rx-sidebar {
        width: min(82vw, 280px);
        transform: translateX(-100%);
        box-shadow: var(--rx-shadow-md);
    }

    .rx-sidebar.rx-open {
        transform: translateX(0);
    }

    .rx-main-area {
        left: 0;
        width: 100%;
        margin-left: 0;
    }

    .rx-content {
        padding: 14px 14px calc(18px + var(--rx-safe-bottom));
    }

    .rx-footer {
        padding: 14px 16px;
    }

    .rx-login-hero {
        padding: 30px 20px;
    }

    .rx-login-brand {
        margin-bottom: 28px;
    }

    .rx-login-hero h1 {
        max-width: 360px;
        font-size: 28px;
    }

    .rx-login-panel {
        padding: 30px 20px 40px;
    }

    .rx-mobile-toggle {
        display: flex;
    }

    .rx-mobile-toggle:hover {
        background: var(--rx-gray-100);
    }

    .rx-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 18px;
    }

    .rx-stat-card {
        min-height: 76px;
        padding: 12px;
    }

    .rx-stat-value {
        font-size: 22px;
        line-height: 1;
        margin-bottom: 6px;
    }

    .rx-stat-label {
        font-size: 12px;
        line-height: 1.25;
    }

    .rx-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rx-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        height: 56px;
        min-height: 56px;
        align-items: center;
        gap: 12px;
        padding: 8px 14px;
    }

    .rx-topbar-left {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .rx-page-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rx-topbar-right {
        display: flex;
        width: auto;
        min-width: 0;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .rx-user-name {
        display: none;
    }

    .rx-topbar-right .rx-btn {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 7px 12px;
    }


    .rx-grid-2,
    .rx-detail-grid-3,
    .rx-detail-grid-4,
    .rx-meta-row,
    .rx-money-summary {
        grid-template-columns: 1fr;
    }

    .rx-money-card strong {
        font-size: 20px;
    }

    .rx-money-mini {
        min-width: 0;
        width: 100%;
    }

    .rx-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rx-search-form {
        max-width: none;
        flex-direction: column;
    }

    .rx-search-form input[type="text"],
    .rx-search-form select,
    .rx-search-form .rx-btn {
        width: 100%;
        min-width: 0;
    }

    .rx-form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .rx-form-actions .rx-btn {
        width: 100%;
    }

    .rx-form-input,
    .rx-form-select,
    .rx-form-textarea {
        font-size: 16px;
    }

    .rx-simple-check,
    .rx-checkbox-row {
        align-items: center;
        padding-bottom: 0;
    }

    .rx-subsection {
        padding: 14px;
        margin: 16px 0;
    }

    .rx-alert {
        align-items: flex-start;
        padding: 12px 14px;
    }

    .rx-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .rx-page-link {
        width: 40px;
        height: 40px;
    }

    .rx-quick-actions {
        flex-direction: column;
    }

    .rx-quick-actions .rx-btn {
        width: 100%;
    }

    .rx-card {
        padding: 18px;
    }

    .rx-card-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .rx-dashboard-queues .rx-card-header {
        align-items: center;
        flex-direction: row;
    }

    .rx-card-header .rx-btn,
    .rx-header-actions .rx-btn {
        width: 100%;
    }

    .rx-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .rx-dashboard-queues .rx-card-header .rx-btn {
        width: auto;
        min-width: 104px;
    }

    /* Mobile cards for tables */
    .rx-table-wrap {
        overflow-x: visible;
    }

    .rx-table {
        min-width: 0;
    }

    .rx-table thead {
        display: none;
    }

    .rx-table tbody {
        display: block;
    }

    .rx-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid var(--rx-gray-200);
        border-radius: var(--rx-radius);
        margin-bottom: 12px;
        padding: 16px;
    }

    .rx-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        align-items: flex-start;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid var(--rx-gray-100);
        overflow-wrap: anywhere;
        text-align: left;
    }

    .rx-table tbody td:last-child {
        border-bottom: none;
    }

    .rx-table tbody td.rx-empty,
    .rx-table tbody td[colspan] {
        display: block;
        padding: 28px 12px !important;
        text-align: center;
    }

    .rx-table tbody td.rx-empty::before,
    .rx-table tbody td[colspan]::before {
        display: none;
    }

    .rx-table tbody td::before {
        content: attr(data-label);
        min-width: 0;
        font-weight: 600;
        color: var(--rx-gray-500);
        font-size: 12px;
        text-align: left;
        text-transform: uppercase;
    }

    .rx-table tbody td > .rx-cell-value {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .rx-table tbody td > .rx-cell-value small {
        display: block;
        max-width: 100%;
        white-space: normal;
    }

    .rx-table tbody td[data-label="Payments"] > .rx-cell-value {
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .rx-table tbody td[data-label="Payments"] .rx-money-mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .rx-table tbody td[data-label="Payments"] .rx-badge {
        display: inline-flex;
        margin-top: 6px;
        max-width: 100%;
        white-space: normal;
    }

    .rx-table tbody td[data-label="Actions"] {
        display: block;
        justify-content: flex-start;
        text-align: left;
    }

    .rx-table tbody td[data-label="Actions"]::before {
        display: none;
    }

    .rx-actions-cell .rx-inline-form,
    .rx-table tbody td[data-label="Actions"] .rx-inline-form {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
    }

    .rx-table tbody td[data-label="Actions"] .rx-btn,
    .rx-actions-cell .rx-btn {
        flex: 1 1 88px;
    }

    .rx-table tbody td[data-label="Actions"] .rx-form-input-sm,
    .rx-actions-cell .rx-form-input-sm {
        flex: 1 1 100%;
        width: 100% !important;
        margin-right: 0 !important;
    }

    .rx-table tbody td[data-label="Phone"] a,
    .rx-table tbody td[data-label="Customer"] small a {
        display: inline-flex;
        min-height: 32px;
        align-items: center;
        margin-top: 4px;
    }

    .rx-dashboard-queues .rx-compact-table tbody tr {
        padding: 12px;
    }

    .rx-dashboard-queues .rx-compact-table tbody td {
        display: block;
        padding: 8px 0;
        text-align: left;
    }

    .rx-dashboard-queues .rx-compact-table tbody td::before {
        display: block;
        margin-bottom: 4px;
    }

    .rx-actions,
    .rx-actions-cell {
        width: 100%;
        justify-content: flex-start;
    }

    .rx-card + .rx-card {
        margin-top: 14px;
    }
}

/* ============================================
   Minimal / Login Page Styles
   ============================================ */

.rx-minimal-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--rx-gray-50);
}

.rx-minimal-header {
    background: #fff;
    border-bottom: 1px solid var(--rx-gray-200);
    padding: 16px 28px;
}

.rx-minimal-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--rx-gray-900);
    text-decoration: none;
}

.rx-minimal-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.rx-minimal-footer {
    padding: 16px 28px;
    background: #fff;
    border-top: 1px solid var(--rx-gray-200);
    font-size: 12px;
    color: var(--rx-gray-400);
    text-align: center;
}

.rx-login-card {
    background: #fff;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    padding: 48px;
    box-shadow: var(--rx-shadow);
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.rx-login-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rx-gray-900);
    margin-bottom: 12px;
}

.rx-login-card p {
    color: var(--rx-gray-500);
    margin-bottom: 28px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .rx-login-card {
        padding: 32px 24px;
    }
}

/* ============================================
   Sub-Navigation Tabs & Creator Tracking
   ============================================ */
.rx-sub-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--rx-gray-200);
    padding-bottom: 12px;
}

.rx-sub-nav-item {
    padding: 8px 16px;
    border-radius: var(--rx-radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--rx-gray-600);
    text-decoration: none;
    transition: all 0.15s ease;
}

.rx-sub-nav-item:hover {
    background: var(--rx-gray-100);
    color: var(--rx-gray-900);
}

.rx-sub-nav-item.rx-active {
    background: var(--rx-primary);
    color: #fff;
}

/* Tracking progress bar */
.rx-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--rx-gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.rx-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rx-success), var(--rx-info));
    border-radius: 4px;
}

/* Shoots Workload nesting styles */
.rx-creator-shoots-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 320px;
}

.rx-creator-shoot-item {
    padding: 12px;
    border: 1px solid var(--rx-gray-200);
    border-radius: var(--rx-radius);
    background-color: var(--rx-gray-50);
}

.rx-creator-shoot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
}

.rx-creator-shoot-header a {
    color: var(--rx-primary);
    text-decoration: none;
}

.rx-creator-shoot-header a:hover {
    text-decoration: underline;
}

.rx-creator-shoot-details {
    font-size: 12px;
    color: var(--rx-gray-600);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rx-creator-shoot-progress {
    margin-bottom: 8px;
}

.rx-creator-shoot-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.rx-payout-line {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    max-width: 260px;
}

.rx-payout-line + .rx-payout-line {
    margin-top: 6px;
}

.rx-payout-line span {
    color: var(--rx-gray-500);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.rx-payout-line code {
    display: inline-block;
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--rx-gray-100);
    color: var(--rx-gray-800);
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.rx-payout-bank small {
    color: var(--rx-gray-600);
    line-height: 1.45;
    white-space: pre-line;
}

.rx-delivery-link-container {
    width: 100%;
}

.rx-delivery-link-container .rx-creator-delivery-link {
    min-width: 0;
}

.rx-delivery-link-container .rx-creator-save-link {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .rx-creator-main .rx-tabs-headers {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .rx-creator-main .rx-tabs-headers .rx-btn {
        width: 100%;
        justify-content: center;
    }

    .rx-creator-main .rx-card {
        border-radius: 8px;
    }

    .rx-creator-main .rx-table tbody tr {
        padding: 18px;
        border-radius: 8px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .rx-creator-main .rx-table tbody td {
        display: block;
        padding: 14px 0;
    }

    .rx-creator-main .rx-table tbody td::before {
        display: block;
        margin-bottom: 7px;
        font-size: 11px;
        line-height: 1.35;
    }

    .rx-creator-main .rx-table tbody td[data-label="Client / Details"] strong {
        display: block;
        margin-bottom: 3px;
        font-size: 15px;
    }

    .rx-creator-main .rx-table tbody td[data-label="Location"] small,
    .rx-creator-main .rx-table tbody td[data-label="Client / Details"] small {
        display: block;
        line-height: 1.45;
    }

    .rx-creator-main .rx-table tbody td[data-label="Payout Info"] strong {
        display: block;
        margin-bottom: 8px;
        font-size: 17px;
    }

    .rx-delivery-control {
        width: 100%;
        gap: 10px !important;
    }

    .rx-delivery-link-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 8px !important;
    }

    .rx-delivery-link-container .rx-creator-delivery-link {
        width: 100% !important;
        height: 40px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .rx-delivery-link-container .rx-creator-save-link {
        min-width: 82px;
        height: 40px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        word-break: normal !important;
    }

    .rx-payout-line {
        grid-template-columns: 34px minmax(0, 1fr);
        max-width: none;
    }
}

@media (max-width: 520px) {
    .rx-creator-main .rx-table tbody tr {
        padding: 16px;
    }

    .rx-creator-main .rx-table tbody td {
        padding: 13px 0;
    }

    .rx-delivery-link-container {
        grid-template-columns: 1fr;
    }

    .rx-delivery-link-container .rx-creator-save-link {
        width: 100%;
    }
}
